Messages
{
"topic": "user_trades:0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"trades": [
{
"asset_type": "perp",
"account": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"action": "Open Long",
"source": "OrderFill",
"trade_id": "3647276",
"size": 1.5,
"price": 50125.75,
"is_profit": true,
"realized_pnl_amount": 187.5,
"realized_funding_amount": -12.3,
"is_rebate": true,
"fee_amount": 25.06,
"order_id": "45678",
"client_order_id": "order_123",
"transaction_unix_ms": 1699564800000,
"transaction_version": 3647276285,
"counter_party_account": "0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210"
}
]
}Websockets
User trades
User’s perp and spot trade fills. Each trade row carries asset_type. Spot rows use action values Buy or Sell, leave client_order_id empty, and zero realized_pnl_amount, realized_funding_amount, and fee_amount because spot has no positions/funding and per-side fee attribution is unavailable.
WSS
user_trades:
{userAddr}
Messages
{
"topic": "user_trades:0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"trades": [
{
"asset_type": "perp",
"account": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"action": "Open Long",
"source": "OrderFill",
"trade_id": "3647276",
"size": 1.5,
"price": 50125.75,
"is_profit": true,
"realized_pnl_amount": 187.5,
"realized_funding_amount": -12.3,
"is_rebate": true,
"fee_amount": 25.06,
"order_id": "45678",
"client_order_id": "order_123",
"transaction_unix_ms": 1699564800000,
"transaction_version": 3647276285,
"counter_party_account": "0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210"
}
]
}userAddr
type:string
required
User wallet address (Aptos address format, e.g. 0x123...)
UserTradesMessage
type:object
User's perp and spot trade fills. Each trade row carries asset_type. Spot rows use action values Buy or Sell, leave client_order_id empty, and zero realized_pnl_amount, realized_funding_amount, and fee_amount because spot has no positions/funding and per-side fee attribution is unavailable.
⌘I

