Stream over WebSocket
From an open socket to a live book and your own fills — the fastest path to streaming Native Core.
1. Connect
wscat -c wss://api.native.org/ws2. Subscribe to a market
{"method":"subscribe","subscription":{"type":"bbo","coin":"2"}}
{"method":"subscribe","subscription":{"type":"trades","coin":"2"}}
{"method":"subscribe","subscription":{"type":"l2Book","coin":"2"}}{
"channel": "bbo",
"data": {
"coin": "2",
"time": 1785332059496,
"bbo": [
{ "px": "1903.49", "sz": "24.8254", "n": 1 },
{ "px": "1904.56", "sz": "57.71", "n": 1 }
]
}
}3. Subscribe to your account
4. Keep it alive
5. Reconnect and backfill
Trade on the same socket
Next steps
Last updated