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

Trades

Streams all trades as they occur in a chosen market.

PreviousOrderbookNextCandle

Last updated 1 day ago

Refer to for establishing the websocket connection.

Params

{
    "method": "subscribe",
    "params": {
        "source": "trades",
        "symbol": "SOL"
    }
}

Stream

{
  "channel": "trades",
  "data": [
      {
        "a": "0.16",
        "c": "6TUfbNv7...",
        "d": "open_long",
        "e": "fulfill_maker",
        "p": "157.43",
        "s": "SOL",
        "t": 1749052438829,
        "tc": "normal",
        "u": "C1obSQwr..."
      },
       // ... other trades
  ]
}
Field
Type
Description

'a'

decimal string

Amount

'c'

string

Counter party address

'd'

string

Trade side

open_long

open_short

close_long

close_short

'e'

string

Trade event

fulfill_taker

fulfill_maker

'p'

decimal string

Price

's'

string

Symbol

't'

number

Timestamp in milliseconds

'tc'

string

Trade cause

normal market_liquidation backstop_liquidation settlement

'u'

string

Account address

Websocket