Subscriptions are the mechanism for streaming live data over a Pacifica WebSocket connection. After sending a subscribe message, the server pushes events to your client as they occur — no polling required. This page documents every available channel, the subscribe message format, and the shape of each data event. Market data channels (prices, book, BBO, trades, candle, mark price candle) are open to anyone. Account data channels (account_margin, account_leverage, account_info, account_positions, account_order_updates, account_trades, account_transfers) stream private data and require you to provide the account address in the subscription params.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pacifica-fi/docs-migrate/llms.txt
Use this file to discover all available pages before exploring further.
Account data channels do not require a cryptographic signature to subscribe — you provide only your wallet address in
params.account. However, you should only subscribe to your own account. Trading operations that modify state (placing or cancelling orders) do require a full Ed25519 signature; see Trading Operations.Prices
Streams live price information for all symbols on Pacifica, including mark price, oracle price, funding rate, open interest, and 24-hour volume. The stream updates whenever any symbol’s price data changes. SubscribeCurrent funding rate.
Mark price.
Mid price (midpoint of best bid and best ask).
Predicted next funding rate.
Total open interest amount.
Oracle price.
Asset symbol, e.g.
BTC.Event timestamp in milliseconds.
Rolling 24-hour trading volume in USD.
Previous day’s closing price.
Orderbook
Streams aggregated order book snapshots for a single symbol at a configurable price aggregation level. The stream updates every 250 ms. SubscribeMust be
"book".The market symbol to subscribe to, e.g.
"SOL".Price aggregation level. Accepted values:
1, 10, 100, 1000, 10000.Two-element array
[bids, asks]. Each element is an array of aggregated price levels.Total amount at this aggregation level.
Number of individual orders within this aggregation level.
In the bids array: the highest price in the aggregation level. In the asks array: the lowest price in the aggregation level.
Symbol.
Timestamp in milliseconds.
Exchange-wide nonce. Sequential, not subject to clock drift. Use this to reliably determine the ordering of exchange events.
Best Bid / Offer (BBO)
Streams real-time updates to the best bid and ask prices and amounts for a single symbol. An event is sent whenever the top of book changes. SubscribeMust be
"bbo".The market symbol to subscribe to, e.g.
"BTC".Symbol.
Order ID of the top-of-book order that triggered this update.
Exchange-wide nonce (last order ID). Sequential, not subject to clock drift.
Timestamp in milliseconds.
Best bid price.
Best bid amount (in token units).
Best ask price.
Best ask amount (in token units).
Trades
Streams all executed trades from the taker side as they occur in a chosen market. SubscribeMust be
"trades".The market symbol to subscribe to, e.g.
"SOL".History ID.
Symbol.
Trade amount.
Trade price.
Trade side. One of:
open_long, open_short, close_long, close_short.Trade cause. One of:
normal, market_liquidation, backstop_liquidation, settlement.Timestamp in milliseconds.
Exchange-wide nonce. Sequential, not subject to clock drift.
Candle
Streams live candlestick data for a specific symbol and time interval. A new event is emitted each time a candle is updated within the current period. SubscribeMust be
"candle".The market symbol to subscribe to, e.g.
"SOL".Candle interval. Accepted values:
1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d.Candle start time in milliseconds.
Candle end time in milliseconds.
Symbol.
Candle interval.
Open price.
Close price.
High price.
Low price.
Volume for the period.
Number of trades in the period.
Mark Price Candle
Streams real-time mark price candlestick data for a specific symbol and time interval. The shape is identical to the trade price candle but reflects the mark price series rather than last trade price. SubscribeMust be
"mark_price_candle".The market symbol to subscribe to, e.g.
"BTC".Candle interval. Accepted values:
1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d.Candle start time in milliseconds.
Candle end time in milliseconds.
Symbol.
Candle interval.
Open mark price.
Close mark price.
High mark price.
Low mark price.
Volume. Always
"0" for mark price candles.Number of trades in the period. Always
0 for mark price candles.Account Margin
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.Must be
"account_margin".The wallet address to subscribe to.
Account address.
Symbol for which the margin mode changed.
New margin mode.
true = isolated; false = cross.Timestamp in milliseconds.
Account Leverage
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.Must be
"account_leverage".The wallet address to subscribe to.
Account address.
Symbol for which leverage changed.
New leverage setting.
Timestamp in milliseconds.
Account Info
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.Must be
"account_info".The wallet address to subscribe to.
Account equity.
Available to spend.
Available to withdraw.
Account balance.
Account fee tier.
Total margin in use.
Maintenance margin required in cross mode.
Open orders count.
Pending balance.
Open positions count.
Stop order count.
Spot asset balances. Each entry contains:
| Field | Type | Description |
|---|---|---|
s | string | Spot asset symbol |
a | string | Total amount held |
lr | string | Loan-to-value ratio |
aw | string | Available to withdraw |
pb | string | Pending balance |
dw | string | Daily withdrawal amount (USD) |
dd | string | Effective daily deposit limit (USD) |
wd | string | Effective daily withdrawal limit (USD) |
Timestamp in milliseconds.
Account Positions
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.account_positions to seed initial state and account_trades to apply subsequent changes.
Subscribe
Must be
"account_positions".The wallet address to subscribe to.
Symbol.
Position side:
bid (long) or ask (short).Position size.
Average entry price.
Position margin.
Accumulated funding fee for this position.
Whether the position is in isolated margin mode.
Liquidation price in USD.
null if not applicable.Timestamp in milliseconds.
Exchange-wide nonce. Sequential, not subject to clock drift.
Account Order Updates
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.Must be
"account_order_updates".The wallet address to subscribe to.
Order ID.
Client order ID (full UUID), or
null if not provided.Account address (base58 encoded).
Symbol.
Order side:
bid or ask.Average filled price.
Initial (submitted) price.
Last filled price.
Original order amount.
Amount filled so far.
Order event that triggered this update. Possible values:
| Value | Meaning |
|---|---|
make | Order placed on the book |
stop_created | Stop order created |
fulfill_market | Filled by a market order |
fulfill_limit | Filled by a limit order |
adjust | Order modified |
stop_parent_order_filled | Parent order was filled |
stop_triggered | Stop order activated |
stop_upgrade | Stop order upgraded |
cancel | Cancelled by user |
force_cancel | Cancelled by the system |
expired | Time-in-force expired |
post_only_rejected | ALO order would have crossed |
self_trade_prevented | Self-trade prevention triggered |
Order status. One of:
open, partially_filled, filled, cancelled, rejected.Order type. One of:
limit, market, stop_limit, stop_market, take_profit_limit, stop_loss_limit, take_profit_market, stop_loss_market.Stop price (for stop orders), or
null.Stop parent order ID, or
null.Stop trigger price type:
last_trade_price, mark_price, or mid_price. null if not a stop order.Whether the order is reduce-only.
Order creation time in milliseconds.
Last update time in milliseconds.
Exchange-wide nonce. Sequential, not subject to clock drift.
Account Trades
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.account_positions to maintain an accurate real-time view of open positions.
Subscribe
Must be
"account_trades".The wallet address to subscribe to.
History ID.
Order ID associated with this trade.
Client order ID (full UUID), or
null.Account address.
Symbol.
Fill price.
Position entry price.
Trade amount.
Trade execution role:
fulfill_maker (provided liquidity) or fulfill_taker (took liquidity).Trade side:
open_long, open_short, close_long, or close_short.Trade cause:
normal, market_liquidation, backstop_liquidation, or settlement.Trading fee charged.
Realised PnL for this trade.
Timestamp in milliseconds.
Exchange-wide nonce. Sequential, not subject to clock drift.
Account Transfers
This is an account data channel. Pass your wallet address in
params.account. Events are scoped to that account only.Must be
"account_transfers".The wallet address to subscribe to.
Account address.
Transfer event type:
deposit, subaccount_transfer, withdrawal_pending, or withdrawal_confirmed.Asset symbol (e.g.
USDC).Transfer amount.
Timestamp in milliseconds.
On-chain transaction ID, or
null if not yet confirmed.Source address, or
null if not applicable.Receiver address, or
null if not applicable.Batch nonce (used for withdrawals), or
null.Requested amount before fees, or
null.Fee amount deducted, or
null.