Request quotes
Goal
Request a quote from a stream (RFS).
Prerequisites
- Your REST API app.
- Integral API login with trading permission.
- Your organization provisioned with at least one provider who streams RFS prices.
Steps
Step 1: Login
Use the Login and get token endpoint.
See the related Login tutorial.
Your access token is in SSO_TOKEN
of the response header. Your token is valid for limited time.
Pass the SSO_TOKEN
cookie value with all of your subsequent API requests.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/sso/login
- Payload
- JavaScript
{ "user": "apiUserId", "pass": "This is a long password!", "org": "apiOrganizationId" }
{ "status": "OK", "errorCode": null, "responseTuples": null, "expiryTime": 1665490480729, "serverUTCTime": 1665490420730 }
Step 2: Request quote
Use the Request quote endpoint.
You must query your request for its status. After the initial success/fail response, status updates are not pushed to you.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs
- Payload
- JavaScript
{ "clOrderId": "view1MultiLP5", "symbol": "EUR/USD", "amount": 1000000, "dealtCurrency": "EUR", "expiry": 140, "nearValueDate": "1W", "farDealtAmount": 1000000, "farValueDate": "2W", "side": "TWO_WAY", "priceType": "FwdFwd", "customerAccount": "pfOrgLE", "customerOrg": "pfOrg", "providers": [ "ProvA", "ProvB", "ProvC" ] }
{ "clOrderId": "view1MultiLP5", "requestId": "G4796976d517b17818a0021e", "event": "REQUEST_RECEIVED" }
Step 3: Query quote request for status
Use the Query quote request endpoint.
Query the state of quote request by the RFS ID clOrderId
assigned by you when you sent the request. The response can include quotes and state of the quote request.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs
- Payload
- JavaScript
No request payload
{ "clOrderId": "rjv_566", "requestId": "G4796976d5_228bd_19587256c877", "transactionId": "FXI9445344076", "ttl": 7200, "event": "QUOTE", "quotes": [ { … } ] }
Step 4: Accept quote
Use the Accept quote endpoint.
Accept a quote with the request ID assigned by Integral returned in requestId
of the query quote response.
You must query your quote request to get any trades after accepting the quote.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs/{requestId}
- Payload
- JavaScript
{ "quoteId": "G-4796976cf-17b1781b062", "side": "BUY", "symbol": "GBP/USD", "dealtCurrency": "USD", "clOrderId": "view1MultiLP5" }
Step 5: Query quote request for trades
Use the Query quote request endpoint.
After you accept a quote, you must query your quote request to get any trades.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs
- Payload
- JavaScript
No request payload
{ "clOrderId": "rjv_566", "requestId": "G4796976d5_228bd_19587256c877", "transactionId": "FXI9445344076", "ttl": 7200, "event": "QUOTE", "quotes": [ { … } ] }