Multi Session Handling
This API allows you to maintain multiple API sessions (i.e. concurrent WebSocket connections) with Anthic's endpoint. However, in most aspects, the distinct sessions are not treated separately - on the contrary, they represent your single account on Anthic's backend.
In particular:
- Pricebooks sent over session B overwrite any previous pricing sent over session A
(i.e. it does not matter which session sent which token pairs and prices - a single aggregate
pricebook list is built from all pricebook updates that you send).
- For this reason, special care must be taken if multiple concurrent sessions update the pricebook of the same pair: the ordering of messages sent over the network is not deterministic, and the last update that Anthic processes overwrites any previous one.
- The same live new orders are broadcasted to all your active sessions.
- To be specific: this means all active sessions which have started the new orders stream.
- To clarify: even if session A only provides pricing for BTC/USDC while session B only provides pricing for ETH/USDC, both sessions will receive new orders for BTC/USDC and both sessions will receive new orders for ETH/USDC.
- Fill execution updates are broadcasted to all of your active sessions.
- To be specific: this means all active sessions which have started the fill execution stream.
- To clarify: even if session A has filled an order ID=abc123, both session A and session B will receive fill updates for order ID=abc123.