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

Candle

Streams candle information for given symbol and candle time interval

PreviousTradesNextOrder updates

Last updated 1 day ago

Refer to for establishing the websocket connection.

Params

{
    "method": "subscribe",
    "params": {
        "source": "candle",
        "symbol": "SOL",
        "interval": "1m"  
    }
}

Where "interval" can be 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d

Stream

{
  "channel": "candle",
  "data": {
    "t": 1749052260000,
    "T": 1749052320000,
    "s": "SOL",
    "i": "1m",
    "o": "157.3",
    "c": "157.32",
    "h": "157.32",
    "l": "157.3",
    "v": "1.22",
    "n": 8
  }
}
Field
Type
Description

't'

number

Start time (milliseconds)

'T'

number

End time (milliseconds)

's'

string

Symbol

'i'

string

Candle interval

'o'

decimal string

Open price

'c'

decimal string

Close price

'h'

decimal string

High price

'l'

decimal string

Low price

'v'

decimal string

Volume

'n'

number

Number of trades in this period

Websocket