RFQ
RFQ trading API
Connection and authorization flow:
Connecting to the WS endpoint
wss://trade.finerymarkets.com/ws/rfq
{ "event": "CONNECTED" }Authorize (if authorization headers were not provided in step 1).
Trading flow:
Send the
RFQ session requestevent to create an RFQ session. The server responds withSuccessful 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 aQuote response.
{
"event": "CREATE",
"reqId": int,
"instrument": string,
"providers": int[],
"side": string ("BUY"/"SELL"),
"size": int,
"clientId": int (optional, required only if request is authorized)
}For getting providers use:
getProviders{ "event": "CREATED", "reqId": int }{
"event": "QUOTE",
"reqId": int,
"status": string, ("SUCCESS", "REJECT", "ERROR")
"expiresAt": datetime,
"providerId": int,
"quotes": [
{
"side": string ("BUY"/"SELL"),
"price": int
}
],
"error": string
}Send an
Order confirmation requestto 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 anOrder confirmation responsewith different statuses:SUCCESSif the provider approved the deal.REJECTif the provider rejected the deal.ERRORif there was an error during the request.
{
"event": "COMMIT",
"reqId": int,
"providerId": int,
"side": string ("BUY"/"SELL")
}{
"event": "COMMITTED",
"reqId": int,
"status": string, ("SUCCESS", "REJECT", "ERROR"),
"error": string
}RFQ session statuses include:
CREATED– The session has been initialized.COMMITTED– The session has been successfully finished with the committed order.CANCELED– The session was canceled.EXPIRED– The session expired without commitment.REJECTED– Commitment to the LP was rejected due to insufficient trading limits or other risk management checks.FAILED– The commitment to the LP failed due to technical errors or issues during processing.
Send a
Cancel requestto cancel the RFQ completely. After you will receiveCancel responsefrom the server. Then the RFQ session may be restarted.
{
"event": "CANCEL",
"reqId": int
}{
"event": "CANCELED",
"reqId": int
}If an internal error occurs, you will receive an
Error responseevent.
{
"event": "ERROR",
"reqId": int,
"error": int,
"errors": string
}Last updated