Order Feed
Live order status events from the history service
Last updated
Was this helpful?
Was this helpful?
import asyncio, json, websockets
def auth_message(api_key, signature, timestamp):
return {
"t": "AUTH",
"d": {
"apiKey": api_key,
"signature": signature,
"timestamp": timestamp,
},
}
async def order_feed(api_key, signature, timestamp):
uri = "wss://history-service.outpoll.com/order/ws"
async with websockets.connect(uri) as ws:
await ws.send(json.dumps(auth_message(api_key, signature, timestamp)))
async for msg in ws:
print(json.loads(msg))