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

Orderbook

PreviousWebsocketNextTrades

Last updated 1 month ago

Refer to for establishing the websocket connection.

Params

{
    "source": "book",
    "symbol": "<token_symbol>",
    "aggLevel": <aggregation_level>
}

where aggLevelcan be one of 1, 2, 5, 10, 100, 1000.

Stream


{
  'channel': 'book',
  'data': {
    'l': [
            [
                {
                    "a": "<bid_size>",
                    "n": "<num_orders>",
                    "p": "<bid_price>"
                },
                ...
            ],
            [
                {
                    "a": "<ask_size>",
                    "n": "<num_orders>",
                    "p": "<ask_price>"
                },
                ...
            ]
        ],
    's': '<symbol>'
  }
}
Field
Type
Description

'a'

string

Total size (quantity) of all orders at this price level

'n'

string

Number of individual orders aggregated at this price level

'p'

string

Price level of the order

Websocket