Welcome to the Integral REST API reference.
Our REST API is for less latency-sensitive participants and has resource-oriented URLs, accepts JSON-encoded requests, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Contact Integral’s account management team to get connection details and credentials for access.
You can choose between two authentication methods:
An ID and password will be issued to you to generate and refresh/renew an access token. All REST API calls should pass this token to access authenticated services.
Users should use /v2/sso/login to get an access token. The access token is in SSO_TOKEN
of the response header. Your token is valid for a limited time.
To keep your session alive, you can renew your token with /sso/tokens/renew. If your token is expired, you are issued a new token.
In this authentication method, you must sign each API request with a 'secret'. The 'secret' and 'userId' are issued to you during set up.
All REST requests must contain following header information:
Header attribute | Description |
---|---|
Authorization | The base64-encoded signature. |
Date | A date and time as standard UTC string. |
Digest | SHA-256=base64(sha256(<body>)) If there is no request body, Digest should be set to the digest of a body of 0 length. |
type | Set to hmac . |
You must send an authorization header with the following parameterization:
credentials := "hmac" params
params := userId "," algorithm ", " headers ", " signature
userId := "username" "=" plain-string
algorithm := "algorithm" "=" DQUOTE (hmac-sha256) DQUOTE
headers := "headers" "=" plain-string
signature := "signature" "=" plain-string
plain-string = DQUOTE *( %x20-21 / %x23-5B / %x5D-7E ) DQUOTE
Parameter | Description |
---|---|
username | The ID of the credential. |
algorithm | Digital signature algorithm used to create the signature. You should use hmac-sha256 . |
headers | List of HTTP header names, separated by a single space character, used to sign the request. |
signature | Base64 encoded digital signature generated by the client. |
To generate the string that is signed with a secret, the client must take the values of each HTTP header specified by headers in the order they appear.
request-line
, then append the lowercase header name followed with an ASCII colon :
and an ASCII space ' '
.request-line
, then append the HTTP request line (in ASCII format), otherwise append the header value.\n
. The string must not include a trailing ASCII newline.You can set X-Request-ID
on the request's HTTP header to trace each API call. The system echos back this header in the response.
All Integral REST APIs use the following general status codes. See endpoints for specific codes.
HTTP code | HTTP status | Meaning |
---|---|---|
200 | OK | Successful submission. |
202 | ACCEPTED | Request accepted by the system. You are expected to make another API call. Refer to individual API sections and endpoints for subsequent action. |
400 | BAD REQUEST | There is an issue with request parameters. May have a message body that indicates the error. Refer to individual API sections and endpoints for specific errors. |
401 | UNAUTHORIZED | Your IntegralAPI user is not authorized. May have a message body that indicates the error. |
404 | NOT FOUND | The endpoint could not be found. Either your valid request did not return any results or your request was malformed. May have a message body that indicates the error. Refer to individual API endpoints to confirm that the endpoint URL and parameters are correct. |
500 | INTERNAL SERVER ERROR | Stop trading immediately and contact Integral Business Support with a complete error message and full details of the HTTP request and response. May have a message body that indicates the error. |
4xx and 5xx status codes may return a JSON response body with the message
parameter.
You determine the status of any call with a combination of:
200
and 404
).Use the following codes to interpret and act on status responses.
Reason code | Description |
---|---|
RequestValidationError.amount | Order size is invalid. |
RequestValidationError.CoIdNotSpecified | Client order ID not specified. |
RequestValidationError.DuplicateOrder | Order already exists for the given client order ID. |
RequestValidationError.TypeNotSpecified | Order type not specified. |
RequestValidationError.TIFNotSpecified | Time in force not specified. |
RequestValidationError.SideNotSpecified | Order side (buy or sell) not specified. |
RequestValidationError.CurrencyNotSpecified | Order dealt currency not specified. |
RequestValidationError.InvalidDealtCcy | Dealt currency is neither base currency nor term currency. |
RequestValidationError.SymbolNotSpecified | Symbol not specified. |
RequestValidationError.InvalidCurrencyPair | Symbol not valid or not supported by the system. |
RequestValidationError.SizeNotSpecified | Order size not specified. |
RequestValidationError.InvalidOrderQty | Order size not valid. |
RequestValidationError.InvalidPrice | Accepted price invalid. Zero is invalid price. |
RequestValidationError.BuySellMismatch | Buy/Sell side of the accepted price is incorrect. |
RequestValidationError.InvalidQuoteID | The rateId of the previously quoted (PQ) order is invalid. |
RequestValidationError.LegalEntitySetIncorrectly | Account field incorrect. |
RequestValidationError.OrderTypeNotSupported | Order type not supported. |
RequestValidationError.PriceMismatch | Accepted price not the same as previously quoted price. |
RequestValidationError.QuoteExpired | Rate associated with the rateId not found. It has expired. Price is no longer valid. |
RequestValidationError.tradingDisabled | Trading is disabled. |
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/
The RFS/RFQ endpoints provide API access to two trading workflows:
You receive responses against your RFS and RFQ requests using the Query request response API and can choose to either accept the quote, withdraw your quote request, or you can allow the your request or quote to expire.
Request for Stream (RFS) workflow:
Request for Quote (RFQ) workflow:
Send a quote request to receive firm quotes from liquidity providers for the specified symbol, tenor, amount, and direction (bid, ask, two-way) for a given price type.
After the initial success response REQUEST_RECEIVED
, you must query the status of your request to receive the latest quotes and status (see Query quote request (server ID) and Query quote request (client ID)).
When you receive a quote, you can then accept it (Accept quote).
Base and term currency separated by a slash /
(for example EUR/USD
).
The definition of this property depends on the rfq
property (rfq):
rfq=false
or not included (RFS workflow) Request expiry time in seconds when the request is received.rfq=true
(RFQ workflow) Duration time in seconds for a single quote. Minimum 30 seconds. Maximum 86400 seconds (24 hours). This value must match exactly the value configured on the server.Quote workflow of the request:
false
=RFS workflow: request a stream of quotes. The (expiry) property specifies the expiry time of the request.true
=RFQ workflow: request a single quote that is valid for a duration specified by the (expiry) property. The server must be configured to enable the RFQ workflow. Please contact your Technical Account Manager to discuss settings.Tenor or broken date in the format YYYY-MM-DD
fixingDate
not specified.Required for swaps, fwd/fwds, NDF swaps. Tenor or broken date in the format YYYY-MM-DD
.
farFixingDate
not specified.NDF fixing date, tenor or broken date in the format YYYY-MM-DD
. Required if nearValueDate
not specified.
NDF swap far leg fixing date, tenor or broken date in the format YYYY-MM-DD
. Required if farValueDate
not specified.
BUY
, SELL
, or TWO_WAY
from the requester’s perspective and always for the dealt currency.
ID of the legal entity for which quote request is being executed.
ID of the organization for which quote request is being executed.
Whether quotes from all liquidity providers are collected into a single response (recommended) or each provider quote is sent as separate response:
Requested depth-of-book starting with the top of the book. For example, if set to 5, you receive a maximum of 5 quotes on each side (buy/sell) is 5 as long as providers respond with 5 or more quotes.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rfs
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs
{ "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" ] }
Confirmation with your request ID clOrderId
, the server request ID requestId
, and request status in the event
field.
ID assigned to your request by the server. Use this ID to accept a quote. You need to use this ID or your ID clOrderId
to query your request to get quotes and status.
ID assigned by you from your request. You need to use this ID or the server ID requestId
to query your request to get quotes and status.
{ "clOrderId": "view1MultiLP5", "requestId": "G4796976d517b17818a0021e", "event": "REQUEST_RECEIVED" }
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rfs
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs
No request payload
A JSON object with the quote status. May include quotes and trades.
ID assigned by you from your request. You need to use this ID or the server ID requestId
to query your request to get quotes and status.
Request ID assigned by Integral. Use this ID to accept a quote. You need to use this ID or your ID clOrderId
to query your request to get quotes and status. Returned in requestId
of Request quote.
Request transaction ID assigned by Integral. Must be included on quote acceptance in the RFQ workflow.
QUOTE
: a quote in response to your request for quote.
{ "clOrderId": "rjv_566", "requestId": "G4796976d5_228bd_19587256c877", "transactionId": "FXI9445344076", "ttl": 7200, "event": "QUOTE", "quotes": [ { … } ] }
Request ID assigned by Integral. Returned in requestId
of the response to Request quote.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rfs/{requestId}
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs/{requestId}
No request payload
A JSON object with the quote status. May include quotes and trades.
ID assigned by you from your request. You need to use this ID or the server ID requestId
to query your request to get quotes and status.
Request ID assigned by Integral. Use this ID to accept a quote. You need to use this ID or your ID clOrderId
to query your request to get quotes and status. Returned in requestId
of Request quote.
Request transaction ID assigned by Integral. Must be included on quote acceptance in the RFQ workflow.
QUOTE
: a quote in response to your request for quote.
{ "clOrderId": "rjv_566", "requestId": "G4796976d5_228bd_19587256c877", "transactionId": "FXI9445344076", "ttl": 7200, "event": "QUOTE", "quotes": [ { … } ] }
Accept a quote from liquidity providers that you requested (Request quote).
Request ID assigned by Integral. Returned in requestId
of the response to Request quote.
Quote ID from one of the quotes received in response to a Query Request.
BUY
or SELL
from the requester's perspective and always for the dealt currency. For multi-leg requests this is the side of far leg.
Base and term currency separated by a slash /
(for example EUR/USD
).
Request transaction ID assigned by Integral from the quote you are accepting.
Required for quote acceptance in the RFQ workflow (rfq=true
on your request Request quote).
Quote workflow of your request.
Required for quote acceptance in the RFQ workflow (rfq=true
on your request Request quote).
false
or not included=RFS workflowtrue
=RFQ workflow.https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rfs/{requestId}
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs/{requestId}
{ "quoteId": "G-4796976cf-17b1781b062", "side": "BUY", "symbol": "GBP/USD", "dealtCurrency": "USD", "clOrderId": "view1MultiLP5" }
Request ID assigned by Integral. Returned in requestId
of the response to Request quote.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rfs/{requestId}
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rfs/{requestId}
No request payload
Get executed trades that have not been downloaded before.
To get trades that have been previously downloaded, you must first call the Prepare trades to resend endpoint.