Skip to main content
The quote WebSocket pushes the rate, or a full quote, every time it changes. It uses the same pricing rules as Get Quote, so a quote received through the socket can be used to create an operation. 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 the auth payload as token, or in the Authorization: Bearer <token> header. Your IP allowlist also applies to the socket.
The token is validated once, when connecting. An open connection stays active after the token expires; only a reconnection needs a valid token.

Subscribe

Emit subscribe with the same body as Get Quote.
FieldTypeRequiredDescription
amountfloatYesThis is the amount you will operate and send.
directionstringYesThe type of order/ ramp you will create (“DEPOSIT”: if you have Fiat and want to receive stablecoin; “WITHDRAWAL”: if you have stablecoin and want to receive Fiat).
symbolOriginstringYesThe symbol of the token/fiat you will send us (COP, USDC, USDT).
symbolDestinationstringYesThe symbol of the token/fiat we will send you (COP,USDC, USDT).
paymentMethodstringNoThe channel used to move the funds. Select the value that matches your operation type and currency. Allowed values: BREB and PSE for deposit and ACH and BREB for withdrawal. Predefined values: PSE if deposit, ACH if withdrawal.
The acknowledgement is {"status": "ok"}, or an error:
Each connection has one subscription: emitting subscribe again replaces it. Emit unsubscribe to stop receiving updates without disconnecting.

Updates

If a quote cannot be calculated, 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

A quoteId 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.