Documentation Index
Fetch the complete documentation index at: https://docs.ostium.com/llms.txt
Use this file to discover all available pages before exploring further.
Connect to:
wss://builder.ostium.io/v1/prices/stream
Subscribe:
{
"type": "subscribe",
"pairs": ["BTC-USD", "ETH-USD"]
}
SDK equivalent:
const stream = client.streamPrices([0, 1]);
Message schemas
Subscribe:
interface SubscribeMessage {
type: 'subscribe';
pairs: string[];
}
Unsubscribe:
interface UnsubscribeMessage {
type: 'unsubscribe';
pairs: string[];
}
Snapshot:
interface SnapshotMessage {
type: 'snapshot';
data: PriceTick[];
}
Tick:
interface TickMessage {
type: 'tick';
data: PriceTick;
}
interface PriceTick {
feed_id: string;
pair: string;
from: string;
to: string;
bid: number;
mid: number;
ask: number;
isMarketOpen: boolean;
isDayTradingClosed: boolean;
secondsToToggleIsDayTradingClosed: number;
timestampSeconds: number;
}