The server uses Socket.IO (protocol v4). Use an official Socket.IO client, such as
socket.io-client for JavaScript or python-socketio for Python.
Connect
Authenticate with the same access token you use for the REST API (see Authentication). Send it in theauth payload as token, or in the Authorization: Bearer <token> header. Your IP allowlist also applies to the socket.
Subscribe
Emitsubscribe with the same body as Get Quote. Unlike the REST endpoint, amount is optional, and it selects what you receive:
{"status": "ok"}, or an error:
subscribe again replaces it. Emit unsubscribe to stop receiving updates without disconnecting.
Updates
rate_update carries {"status": "error", "reason": "..."}. Validation problems show their message; other failures show Quote unavailable.
When updates are sent
- Immediately after you subscribe.
- Every time the market rate changes.
- In addition, every 60 seconds between 8:00 and 22:00 (Bogotá time), so a firm quote always has a valid
quoteId.
Use a firm quote
AquoteId is valid for 60 seconds and for the same amount and assets it was issued for. Send it in the quoteId field when you create a withdrawal or a deposit to apply that exact quote. Every new update replaces the previous quoteId, so always use the latest one.
