Pacifica
  • Getting Started
    • Closed Alpha Guide
      • Link To Guide PDF
    • Closed Alpha Trading Competition
  • Trading on Pacifica
    • Overview
    • Contract Specifications
      • Oracle Price & Mark Price
      • Settlement Mechanism
    • Order Types
      • Market Order
      • Limit Order
      • Order Rules & Constraints
    • Margin & Leverage
    • Funding Rates
    • Liquidations
  • API Documentation
    • API
      • REST API
        • Markets
          • Get market info
          • Get prices
          • Get kline (candle) data
          • Get recent trades
        • Account
          • Get account info
          • Get account settings
          • Update leverage
          • Update margin mode
          • Get positions
          • Get trade history
          • Get funding history
          • Get account equity history
          • Create subaccount
          • Request withdrawal
        • Orders
          • Get open orders
          • Get order history
          • Get order history by ID
          • Create order
          • Create stop order
          • Create position TP/SL
          • Cancel order
          • Cancel all orders
          • Cancel stop order
          • Batch orders
      • Websocket
        • Subscriptions
          • Prices
          • Orderbook
          • Trades
          • Candle
          • Order updates
          • Account balance
          • Account margin
          • Account leverage
          • Account positions
          • Account orders
          • Account order updates
          • Account trades
        • Trading operations
          • Create order
          • Cancel order
          • Cancel all orders
      • Signing
      • Rate limits
    • Specification
  • Other
    • Audits
    • Brand Assets
    • Contact Us
    • Glossary of Terms
Powered by GitBook
On this page
  • Params
  • Stream
  1. API Documentation
  2. API
  3. Websocket
  4. Subscriptions

Account trades

Streams all trades that take place for an account

PreviousAccount order updatesNextTrading operations

Last updated 1 day ago

Refer to for establishing the websocket connection.

Params

{
    "method": "subscribe",
    "params": {
        "source": "account_trades",
        "account": "42trU9A5..."
    }
}

Stream

{
  "channel": "account_trades",
  "data": [
    {
      "I": null,
      "a": "7.8",
      "c": "C1obSQwry...",
      "f": "0.00501618",
      "i": 484871,
      "n": "-0.00501618",
      "o": "3.215567",
      "p": "3.2155",
      "s": "SUI",
      "t": 1749053764375,
      "tc": "normal",
      "te": "fulfill_maker",
      "ts": "open_long",
      "u": "42trU9A5..."
    },
    // ... other trades
  ]
}
Field
Type
Description

'I'

string

Client order ID

'i'

integer

Order ID

's'

string

Symbol

'ts'

string

Trade side

'p'

decimal string

Price

'a'

decimal string

Trade amount

'u'

sting

Account address

't'

number

Timestamp in milliseconds

'c'

string

Counter party address

'o'

decimal string

Entry price

'te'

string

Trade event

'tc'

string

Trade cause

'n'

decimal string

PnL

'f'

decimal string

Trade fee

Websocket