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 workflow that originated the request. For reference in monitoring and reports. Values provided by Integral as applicable.
ID of the book trade request assigned by you. Returned in the success response so that you can associate the request and booked trade.
Free text for additional information and the ID, if any, assigned to the trade by the trade entry organization for their reference.
Any notes on the trade. These notes are sent via STP if the trade is eligible for STP (stp=true).
Counterparty user ID. If not specified, the organization's default user as configured in the Integral system is used.
Customer user ID. If not specified, the default user of the customer organization is used.
The dealt instrument, typically three-character ISO code (for example, AUD
).
All-in rate to the precision of the currency pair’s quote convention. Trades with rates that are higher precision than allowed are rejected.
The side of the order from the customerOrg
perspective, either BUY
or SELL
.
The dealt instrument pair (currency, metal, energy, index, crypto), seven-character ISO code (for example, AUD/USD
).
Trade tenor. You must specify either valueDate
or tenor
. If you specify both, tenor
is ignored.
Today
: todayTOD
: todayON
: overnight (today)TN
: tomorrowSP
: spotSPOT
: spotSN
: spot next (spot+1)D
: a number of days after the current business date (for example, 1D, 2D, 10D)W
: a number of weeks after the current business date (for example, 1W, 2W, 3W)M
: a number of months after the current business date (for example, 1M, 2M, 3M)Y
: a number of years after the current business date (for example, 1Y, 2Y, 3Y)IMM
: The next International Monetary Market (IMM) settlement date. IMM dates are the third Wednesday of the last month of every quarter (March, June, September, December). IMM
results in the next IMM date on or after the spot date. 2IMM
results in two IMM dates after the spot date.S
nIMM
: (spot + IMM) for swapsT
nIMM
: (tomorrow + IMM) for swapsValue date for the trade or near leg of swaps in the format YYYY-MM-DD
. You must specify either valueDate
or tenor
. If you specify both, tenor
is ignored.
Fixing date for NDFs in the format YYYY-MM-DD
. Required if fixingTenor
not specified.
Fixing tenor for NDFs in the format YYYY-MM-DD
. Required if fixingDate
not specified.
Spot rate of the trade or near leg of the trade. Required for outrights, swaps, and NDFs.
Required for outrights, near leg of forward/forward swaps, and NDFs. Forward points for outrights and near leg of forward/forward swaps.
All-in rate at which the trade or near leg was hedged by the trader in the market.
Required for swaps. BUY
or SELL
(case sensitive), the side of the far-leg dealt currency from the customerOrg
perspective.
Required for swaps. Far-leg tenor. Must be later than the near-leg value date in valueDate
or tenor
. You must specify either farValueDate
or farTenor
. If you specify both, farTenor
is ignored.
Required for swaps. Value date for the far leg of swaps in the format YYYY-MM-DD
. Must be later than the near-leg value date in valueDate
or tenor
. You must specify either farValueDate
or farTenor
. If you specify both, farTenor
is ignored.
NDF far-leg fixing date in the format YYYY-MM-DD
. Required if farFixingTenor
not specified.
NDF far-leg fixing tenor. Required if farFixingDate
not specified.
Only applicable to FX Yield Manager. If FX Yield Manager is used to manage positions, this is the name of the book, if any, to which the trade is entered.
How the trade is considered for credit by Integral:
0
= CreditCheck: Trade request is rejected if credit is not available.1
= CreditOvershoot: Trade request is accepted even if credit is not available. Credit can overshoot the available limit.2
= CreditIgnore: Credit is not taken.Credit valuation factor of customerOrg
provided by counterparty
.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades
{ "type": "Spot", "channel": "1", "clientRequestId": "req Spot 644", "counterparty": "BrokerOrg", "counterpartyAccount": "BrokerOrgLE", "counterpartyTrader": "BrokerOrgUser", "coverRate": 1.1234, "creditMode": 2, "creditValuationAdjustment": 1.44, "customerAccount": "CustOrg1le1", "customerOrg": "CustOrg1", "trader": "CustOrg1User", "dealtAmount": 2000000, "dealtIns": "USD", "note": "Notes on trade", "rate": 1.09706, "rateId": "2022-05-12-GBPUSD-SP-435cd558", "referenceId": "ref A4f2", "side": "SELL", "spotRate": 1.09696, "stp": true, "symbol": "GBP/USD", "tradeDate": "2022-05-12", "valueDate": "2022-05-17" }
{ "tradeId": "FXI30501001", "createdTime": "2022-01-19 12:36:27,200 +0000", "clientRequestId": "req swap 1" }
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades
No request payload
An array of trade objects. If an empty array, no trades were done for the given server order ID.
Trade tenor:
Today
: todayTOD
: todayON
: overnight (today)TN
: tomorrowSP
: spotSPOT
: spotSN
: spot next (spot+1)D
: a number of days after the current business date (for example, 1D, 2D, 10D)W
: a number of weeks after the current business date (for example, 1W, 2W, 3W)M
: a number of months after the current business date (for example, 1M, 2M, 3M)Y
: a number of years after the current business date (for example, 1Y, 2Y, 3Y)IMM
: The next International Monetary Market (IMM) settlement date. IMM dates are the third Wednesday of the last month of every quarter (March, June, September, December). IMM
results in the next IMM date on or after the spot date. 2IMM
results in two IMM dates after the spot date.S
nIMM
: (spot + IMM) for swapsT
nIMM
: (tomorrow + IMM) for swapsDate and time trade was done in the format yyyy-MM-dd HH:mm:ss,SSS Z
.
true
: Maker (the deal was initiated by submitting a request or from working the balance on an outstanding order).false
: Taker (the deal was initiated by taking a dealable price in the app).Status of the trade when the message was created:
Dealt instrument pair (currency, metal, energy, index, crypto), seven-character ISO code (for example, AUD/USD
).
The ID of the originating request for price from a system external to Integral.
Far-leg International Securities Identification Number for multi-leg trades.
Near-leg International Securities Identification Number for multi-leg trades.
[ { "orderId": "4821376492", "tradeId": "FXI9222972502", "tradeType": "Spot", "tenor": "SPOT", "tradeDate": "2022-08-16", "valueDate": "2022-08-18", "executionTime": "2022-08-16 08:24:13,239 +0000", "maker": false, "orderSide": "Sell", "status": "Verified", "symbol": "EUR/USD", "dealtIns": "EUR", "customerAccount": "Cust12LE", "customerOrg": "Cust12", "trader": "MD", "counterparty": "SOR4", "cptyLongName": "SOR4", "coverTradeIds": [], "cptyTradeId": "Exec-db08b0657900eb", "counterpartyAccount": "SOR4LE", "counterpartyALEI": "549300YLYOXGEYO4YK89", "externalRequestId": "FXI9222877130", "benchmarkRate": 0, "dealtAmount": 2000000, "settledAmount": 2372460, "baseAmount": 2000000, "termAmount": 2372460, "spotRate": 1.18623, "rate": 1.18623, "fees": 0, "initialSettledAmount": 2372460, "midMarket": false, "upi": "EUR_USD_SPOT", "uti": "MCQRZU5ST1INP9222972502" }, { "orderId": "4821376492", "tradeId": "FXI9222972501", "tradeType": "Spot", "tenor": "SPOT", "tradeDate": "2022-08-16", "valueDate": "2022-08-18", "executionTime": "2022-08-16 08:24:15,882 +0000", "maker": false, "orderSide": "Sell", "status": "Verified", "symbol": "EUR/USD", "dealtIns": "EUR", "customerAccount": "Cust12LE", "customerOrg": "Cust12", "trader": "MD", "counterparty": "SOR4", "cptyLongName": "SOR4", "coverTradeIds": [], "cptyTradeId": "Exec-db08b064811338", "counterpartyAccount": "SOR4LE", "counterpartyALEI": "549300YLYOXGEYO4YK89", "externalRequestId": "FXI9222877130", "benchmarkRate": 0, "dealtAmount": 1000000, "settledAmount": 1186240, "baseAmount": 1000000, "termAmount": 1186240, "spotRate": 1.18624, "rate": 1.18624, "regulatory": { … }, "fees": 0, "initialSettledAmount": 1186240, "midMarket": false, "upi": "EUR_USD_SPOT", "uti": "MCQRZU5ST1INP9222972501" } ]
Amend a verified trade by amount, rate, customer, or all three. Available to broker users and sales dealer users.
You must specify at least one property in addition to id
.
Work with your Integral Technical Account Manager to configure the following trade amendment restrictions:
spotRate
, forwardPoints
) counts against the total allowed.dealtAmount
, the value must be greater than zero and less than this maximum.New amount of the dealt instrument. Must be greater than zero and less than the maximum percentage change allowed, if configured.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades/amendment
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades/amendment
Amend a trade by customer, rate, and amount.
{ "id": "FXI9271593184", "spotRate": 1.18631, "dealtAmount": 21000, "customerAccount": "BrokerCustOrg1le1", "forwardPoints": 0.0001, "note": "Sales: done after cover" }
{ "originalTradeId": "string", "tradeId": "string", "createdTime": "string" }
New fixing date for the rolled NDF trade in the format YYYY-MM-DD
. Required for trades in non-deliverable instruments.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades/roll
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades/roll
Roll a trade to a forward date.
{ "id": "FXI9339324216", "forwardPoints": 0.0002, "valueDate": "2024-10-05", "note": "Daily roll" }
{ "originalTradeId": "FXI30500922", "tradeId": "FXI30501001", "createdTime": "2025-01-10 12:36:27,200 +0000" }
Your reference ID for the allocation. Must be unique in the scope of the allocate request. Not validated for global uniqueness.
The direction of the allocation from the perspective of the customerAccount
(case sensitive):
The customer account of the allocation.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades/allocations
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades/allocations
Divide a trade amongst multiple organizations.
{ "id": "FXI9270827222", "allocations": [ { … }, { … } ] }
{ "originalTradeId": "FXI9270827222", "trades": [ { … }, { … } ] }
ID of trade to cancel. If specified, all other parameters are ignored.
Your reference ID for the request to trade that resulted in the trades you want to cancel. Multiple trades may be cancelled.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades/cancel
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades/cancel
Cancel a single trade by trade ID.
{ "customerOrg": "BrokerCustOrgDle5", "tradeId": "FXI73879011" }
{ "customerOrg": "string", "tradeId": "string" }
Integral trade ID. Returned as tradeId
param in query order fills or book trade.
https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/trades/{id}
https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/trades/{id}
No request payload
The trade object. If empty, no trade matched the given Integral trade ID.
Trade tenor:
Today
: todayTOD
: todayON
: overnight (today)TN
: tomorrowSP
: spotSPOT
: spotSN
: spot next (spot+1)D
: a number of days after the current business date (for example, 1D, 2D, 10D)W
: a number of weeks after the current business date (for example, 1W, 2W, 3W)M
: a number of months after the current business date (for example, 1M, 2M, 3M)Y
: a number of years after the current business date (for example, 1Y, 2Y, 3Y)IMM
: The next International Monetary Market (IMM) settlement date. IMM dates are the third Wednesday of the last month of every quarter (March, June, September, December). IMM
results in the next IMM date on or after the spot date. 2IMM
results in two IMM dates after the spot date.S
nIMM
: (spot + IMM) for swapsT
nIMM
: (tomorrow + IMM) for swapsDate and time trade was done in the format yyyy-MM-dd HH:mm:ss,SSS Z
.
true
: Maker (the deal was initiated by submitting a request or from working the balance on an outstanding order).false
: Taker (the deal was initiated by taking a dealable price in the app).Status of the trade when the message was created:
Dealt instrument pair (currency, metal, energy, index, crypto), seven-character ISO code (for example, AUD/USD
).
The ID of the originating request for price from a system external to Integral.
Far-leg International Securities Identification Number for multi-leg trades.
Near-leg International Securities Identification Number for multi-leg trades.
{ "orderId": "4820926010", "tradeId": "FXI9222877182", "tradeType": "Spot", "tenor": "SPOT", "tradeDate": "2022-03-01", "valueDate": "2022-03-03", "maker": false, "orderSide": "Sell", "status": "Verified", "symbol": "EUR/USD", "dealtIns": "EUR", "customerAccount": "pfOrg", "customerOrg": "pfOrg", "trader": "DealerUser", "counterparty": "CptyA", "cptyLongName": "Counterparty A", "coverTradeIds": [ "FXI9222877182C" ], "cptyTradeId": "FXI9222877182C", "counterpartyAccount": "CptyA_LE", "channel": "API/REST/ESP", "externalRequestId": "Spot3442", "benchmarkRate": 0, "dealtAmount": 1000000, "settledAmount": 1186310, "baseAmount": 1000000, "termAmount": 1186310, "spotRate": 1.18631, "rate": 1.18631, "fees": 0, "initialSettledAmount": 1186310, "midMarket": false, "upi": "EUR_USD_SPOT", "uti": "MCQRZU5ST1INP9222877182" }
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:
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.