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
        • Account
        • Agent
        • Funding
        • Info
        • Kline
        • Orders
        • Portfolio
        • Positions
        • Models
      • Websocket
        • Orderbook
        • Trades
        • Orders
        • Positions
        • User Order History
        • User Trade History
        • Candle
        • Account Data
    • Specification
  • Other
    • Brand Assets
    • Contact Us
    • Glossary of Terms
Powered by GitBook
On this page
  • Params
  • Stream
  1. API Documentation
  2. API
  3. Websocket

Trades

PreviousOrderbookNextOrders

Last updated 1 month ago

Refer to for establishing the websocket connection.

Params

{
    "source": "trades",
    "symbol": "<token_symbol>"
}

Stream

{
    "s": "<token_symbol>",
    "a": "<trade_amount>",
    "p": "<filled_price>",
    "e": "<trade_event>",
    "t": <timestamp>
}

where trade_eventis one of open_long, open_short, close_long, close_short, force_close_long, force_close_short and timestamp is in milliseconds.

Websocket