RFQ

RFQ trading API

Connection and authorization flow:

Read the Websocket API description first

Use the auth headers EFX-Key and EFX-Sign when connecting to the WebSocket. If you sign without them, you will need to authorize afterward

  1. Connecting to the WS endpoint wss://trade.finerymarkets.com/ws/

{ "event": "CONNECTED" }
  1. Authorize (if authorization headers were not provided in step 1).

{
"event": "AUTH",
"key": string,
"signature": string,
"content": string
} 

For "content": string refer to Websocket API description

Trading flow:

Endpoint for trading: wss://trade.finerymarkets.com/ws/rfq

  1. Send the RFQ session request event to create an RFQ session. The server responds with Successful RFQ session response, indicating that the RFQ session has been created. The service sends requests to external providers (from the list specified by the client in the request). Upon receiving an answer from any provider, the server sends a Quote response.

{
"event": "CREATE",
"reqId": int,
"instrument": string,
"providers": int[],
"side": string ("BUY"/"SELL"),
"size": int
}

For getting providers use:

getProviders
  1. Send an Order confirmation request to approve the deal with the provider specified in the request. The server sends another request to the specified provider, and depending on its response, the server can respond with an Order confirmation response with different statuses:

    • SUCCESS if the provider approved the deal.

    • REJECT if the provider rejected the deal.

    • ERROR if there was an error during the request.

{
"event": "COMMIT",
"reqId": int,
"providerId": int,
"side": string ("BUY"/"SELL")
}
  1. Send a Cancel request to cancel the RFQ completely. After you will receive Cancel response from the server. Then the RFQ session may be restarted.

{
"event": "CANCEL",
"reqId": int
}
  1. If an internal error occurs, you will receive an Error response event.

{
"event": "ERROR",
"reqId": int,
"error": int,
"errors": string
}

Last updated