Info client covers every read: market data, account and order queries, and
realtime WebSocket streams. It needs no wallet and signs nothing. Every method
returns the raw parsed JSON — see the Info API pages for the
exact response shapes.
skip_ws=True to construct a REST-only client (no background WebSocket
thread). Call info.close() when you are done to stop the WebSocket cleanly.
Market data
configs is the source of truth for contract IDs, coin IDs, and the
priceScale / qtyScale / tickSize / stepSize you need to convert display
values to the raw integers the API expects. Fetch it once and cache it.Account & orders
account_id accepts an int or string; ids that are not found are simply omitted
from the orders_by_ids / orders_by_cloids results.
WebSocket streams
TheInfo client manages one shared WebSocket connection. Subscribe with a
subscription dict and a callback; the callback receives each decoded message.
subscribe returns an integer subscription id you pass back to unsubscribe.
The client pings every 30 seconds and automatically reconnects, replaying its
active subscriptions. The WebSocket does not push position or balance
changes — poll
user_account for those.