Tutorial
The Foreign Exchange (FX) Trade API enables you to receive real-time foreign exchange rates, retrieve the status of requested quotes, and initiate currency conversions.
This API provides the following functionality:
- Obtain indicative rates.
- Perform foreign exchange transactions.
- Retrieve trades performed.
- Retrieve a quote.
- Place an order for an FX spot, outright or swap.
Definitions
Spot: An agreement between two parties to buy one currency against selling another currency, for settlement on the spot date, at an agreed price. The spot date is one or two business days after the trade date. Exceptions to this rule follow market conventions.
Outright: An agreement between two parties to buy one currency against selling another currency, for settlement on a day other than the spot date,at an agreed price. Settlement must occur on the same day, when an outright value of TODAY is traded. If an outright value of TOMORROW is traded,settlement takes place on the next business day.
Forward: An outright where the settlement takes place beyond the spot date.
**Swap:**A FX swap is a simultaneous purchase and sale of identical amounts of one currency for another with two different value dates (normally spot to forward).
Settlement date: The date that the money transfer transaction is completed, and currency accounts are debited or credited. For foreign exchange instruments provided throughout this API, this is equal to the Value date.
Note: Both
Settlement dateandValue daterefer to the date observed by the FX Trade API service provider (Europe/Amsterdam).
Generic behavior
In foreign exchange trading, to price or execute an order directly, may not be possible.
The POST methods for POST /v1/fxtrade/quotes and POST /v1/fxtrade/orders use the maxWaitTime query parameter to ensure that response times are in a predictable range. If the time elapses, this parameter is used to control whether or not the request should return a non-final state.
When pricing a quote, the expected response time for non-intervention cases must be below 200ms. The maxWaitTime query parameter is set to 500ms. This value can be overridden.
If the returned quote or order does not have a final state,
GET /v1/fxtrade/quotes/{quoteId} and GET /v1/fxtrade/orders/{orderId}
can be used to retrieve the status.
Life cycle of a quote
The state of a quote's life cycle is defined by the QuoteStatus. These states are available to a client:
| Status | Description |
|---|---|
| NEW | A quote request has been submitted. It has not been processed by the broker. |
| PENDING_NEW | A quote request has been received by the broker. It has not been priced or rejected. |
| REJECTED | A quote request was rejected. Expect a reason for the rejection. |
| QUOTED | A quote was provided. |
| EXPIRED | An expired quote was provided. |
The following state transition will take place for each quote:
- NEW -> PENDING_NEW\
- PENDING_NEW -> QUOTED\
- PENDING_NEW -> REJECTED\
- QUOTED -> EXPIRED
Requesting a quote using POST /v1/fxtrade/quote returns a status of NEW or PENDING_NEW. A GET /v1/fxtrade/quotes/{quoteId} request must be performed to check the quote state. If the expiration date-time of the quote is reached, the status changes from QUOTED to EXPIRED.
Life cycle of an order
The state of an order's life cycle is defined by the OrderStatus. The following states are available to a client:
| Status | Description |
|---|---|
| NEW | An order request has been submitted. It has not been processed by the broker. |
| PENDING_NEW | An order request has been received by the broker. It has not been executed or rejected. |
| FILLED | The order was filled. |
| REJECTED | The order was rejected. Expect a reason for the rejection. |
| REJECTED_EXPIRED | The order was rejected due to an expired quote. |
The following state transition takes place for each order:
- NEW -> PENDING_NEW\
- PENDING_NEW -> FILLED\
- PENDING_NEW -> REJECTED\
- PENDING_NEW -> REJECTED_EXPIRED
Requesting an order using POST /v1/fxtrade/orders returns a status of NEW or PENDING_NEW. A GET /v1/fxtrade/quotes/{orderId} request must be performed to check for updates to the order state.
Standardized messages for rejection of quote and order
Both FxQuote and FxOrder have a message property that is used to communicate information. REJECTED state messages are standardized, so that logic can take them into account. The message begins with a code in square brackets. The code is in FXA_<nn> format, where <nn> represents a 2 digit number. For example, this message code indicates that a quote was submitted outside of trading hours:
[FXA_04] trading desk is closed
Client errors [FXA_01-19]
These message codes are returned if a request is rejected due to incorrect data supplied by the client, or a request submitted at the wrong time:
| Code | Resource | Description |
|---|---|---|
| FXA_01 | FxQuote, FxOrder | Invalid request. A change is needed. |
| FXA_02 | FxQuote, FxOrder | Cutoff has been reached for the requested currency pair. |
| FXA_03 | FxOrder | Order request submitted on an expired quote. |
| FXA_04 | FxQuote, FxOrder | Request performed outside of the trading desk opening hours. |
| FXA_05 | FxQuote, FxOrder | Value date for the request currency pair is not a business date. |
| FXA_06 | FxQuote, FxOrder | Request exceeds the maximum or minimum transaction limit. |
| FXA_07 | FxOrder | Duplicate request detection triggered. |
| FXA_08 | FxQuote, FxOrder | Credit check failed. |
| FXA_09 | FxQuote, FxOrder | Combination of instrument, tenor and/or currency pair is not allowed. |
Trading conditions [FXA_20-29]
These message codes are returned as a result of market conditions that prevent auto pricing and execution. The probability of these situations occurring is low:
| Code | Resource | Description |
|---|---|---|
| FXA_20 | FxQuote, FxOrder | No dealer was available to handle the request. |
| FXA_21 | FxQuote, FxOrder | Rejected request. Message will provide details. |
| FXA_22 | FxOrder | Rejected by 'last look'. |
| FXA_23 | FxQuote | No price available, and a dealer has not been notified. |
Provider failures [FXA_90-99]
These message codes are returned as technical errors in the broker platform while pricing a quote or executing an order.
Important: Clients must be able to handle FXA_91.
| Code | Resource | Description |
|---|---|---|
| FXA_90 | FxQuote, FxOrder | A technical error occurred at the broker platform. |
| FXA_91 | FxOrder | A technical error occurred at the broker platform. Important: Do not retry the same operation. |
Reporting operations
The reporting operations GET /v1/fxtrade/quotes and GET /v1/fxtrade/orders return a complete result set. Pagination occurs if the response body is large. If this occurs, the response contains the nextPageKey property which can be used in a later query to obtain the next page.
Protection mechanisms
The FX Trade API provides the following protection mechanisms to suit a clients requirements.
Duplicate trade detection
Each order is matched against orders executed previously, by taking into account: buy/sell currency, amount, direction, tenor, and account. If an order is regarded as a duplicate, the order is rejected. If multiple duplicates for the same order are detected, an HTTP 429 status will be returned for that query. To reduce false positives, a limited amount of historical trades are taken into account. If trading results in false positives, duplicate trade detection can be disabled upon request. For more information, contact technical support.
Throttling
Throttling protects against system overloading, and ensures adequate capacity for all clients. The token bucket algorithm determines if incoming quote requests can be processed immediately. When limits are reached, quote requests are delayed. If the issue persists, the quote requests are dropped. An HTTP 429 status is then returned.
The default throttling strategy is effective for both intermittent and continuous processing. Specialized ones are available for specific use cases. For more information, contact technical support.
Requirements
To use this API in a production environment, you must have a business account at ABN AMRO. For more information, see Production access.
Sandbox access
Use the ABN AMRO Developer Sandbox to try out all functionality of the FX Trade API product in a safe environment. To gain access to the FX Trade API in a sandbox environment, complete the following steps:
- Register and create an account:
- Go to ABN AMRO Developer Portal
- Click Sign up.
- Enter your details, and click Create new account.
- Developer Support will send you an activation link by email.
- Click the activation link.
- Create and register an application:
- Log in to your account.
- In the left-side navigation click Apps.
- Click Add app.
- In the App name field, enter a name for your application.
- In the APIs field, select FX Trade API, and click Add app.
- Complete the How to use this API.
General behavior
The FX Trade API sandbox environment is functionally identical to production. It is used to create scenarios that help develop and test code against all possible outcomes and HTTP status codes. The set of currency pairs and settlement account groups will differ in production as these will be based on the currency accounts you have with ABN AMRO.
Important: Rates in the sandbox environment are fictitious and provided for testing purposes only.
Quotes stay tradable for 90 seconds. This is longer than production. Quotes and orders created in the sandbox environment are purged after 14 days.
Note: In the sandbox environment, the number of requests that can be performed on an end point, differ from the number that can be performed in the production environment.
Supported currency pairs
In the sandbox environment, the rate for each 'direct' currency pair follows a sine wave with a random ripple superpositioned. Each currency pair has a cutoff time in UTC that dictates whether settlement for the tenor TODAY can take place. The following 'direct' currency pairs are supported:
| Currency Pair | Cutoff (UTC) |
|---|---|
| AUDUSD | 16:00 |
| EURDKK | 16:00 |
| EURRON | 10:30 |
| EURRUB | 16:00 |
| EURUSD | 16:00 |
| GBPUSD | 16:00 |
| NZDUSD | 16:00 |
| USDCAD | 17:00 |
| USDCHF | 13:30 |
| USDCNH | 12:00 |
| USDINR | 14:00 |
| USDJPY | 09:00 |
| USDMXN | 16:00 |
For all currencies, official bank-holidays are observed. It is possible to trade, and retrieve an indicative rate for a currency pair, where a cross can be constructed.
Supported settlement account groups
When performing an FX order, the settlement account group must be provided.
In production, this determines the currency accounts used in the settlement of a sum of money. In sandbox, the following settlement accounts groups are supported: Client Account, and House Account.
The Client Account enables trade over currency pairs that include EUR only.
Simulate unavailability
The sandbox environment is always available. In production, the availability of endpoint functionality may differ. For example, rates and trading are not available at weekends. To simulate this behavior, operations in the sandbox that involve the 'EURMXN' currency pair, will react as if the query has taken place outside official production opening hours.
Supported outcomes of operations
In the sandbox environment, there are 3 operation outcome types:
-
Successful: Operations that return a response containing a
2xxstatus code, and do not fall in the category of 'partially successful'. -
Partially successful: POST operations, for a quote or order, that return a response containing a
2xxstatus code, and a status that is not considered 'final'. The client must perform a GET operation to determine if the quote or order status reaches a final state. -
Unsuccessful: Operations that return a response containing a
4xxor5xxstatus code.
Partially successful operations
The following section describes how to trigger and test for partially successful operations.
-
Slow responses: All responses to POST requests, for an FX quote or order, that do not go into intervention, return within 200ms. To simulate a slow response, one in ten POST requests in the sandbox will provide a response time between 200ms and 1500ms. Use this feature with the optional
maxWaitTimequery parameter, which is smaller than 1500ms, to test when the response does not contain the final state. -
Intervention: When requesting an FX quote for any currency pair, if the buy or sell amount exceeds 50.000.000,-, intervention is triggered. It takes between 5 and 45 seconds for intervention to result in a
REJECTEDorQUOTEDstatus. For each intervention, one in five result in a status ofREJECTED. The others result in aQUOTEDstatus. -
Rejection: An FX quote request for the tenor
TODAY, after the cutoff time is reached for the currency pair used, results in aREJECTEDstatus.
Unsuccessful operations
Client errors such as a response with a 4xx status code, can be triggered by providing an illegal request, wrong request headers, or the wrong token. To trigger other HTTP return codes, such as 429, 500, and 503 see the points below:
-
429 Too Many Requests: When requests are executed in a way that exceed certain thresholds, a response with the 429 status code is returned. This can be triggered in the sandbox environment by requesting indicative rates with a frequency of one request per 5 seconds for a prolonged period.
-
500 Internal Server Error: A response with this status code can be triggered in the sandbox environment, by requesting an FX quote that involves the 'CHF' and 'MXN' currencies.
-
503 Service Unavailable: When the service is temporarily unable to handle an incoming request, the 503 status code is returned in the response. The response contains the
Retry-Afterheader as specified in RFC 7231, and its value is set to the number of seconds in which the service is available again.
This scenario is triggered by requesting an FX quote that involves the 'JPY' and 'MXN' currencies.
Production access
If the FX Trade API meets your requirements, contact us to discuss your usage. This must be done before registering for the production environment.
-
Contact the Service desk or Sales team.
-
If you are new to ABN AMRO, contact the service desk to open a business account before using the FX Trade API product. For contact details click here
-
If you are an existing ABN AMRO customer, or already using ABN AMRO's Treasury services, use one of the following methods to contact our eFX Sales team:
- Phone: +31 (0)20 383 6606
- Web form:
- To launch the form, click here.
- In the API Product field, select FX Trade.
- In the Support Category field, select Sales and Business.
- Fill in your details, add a message, and click Send.
-
-
Request production access:
>**Note:** The CA-Signed TLS Certificate is used to authenticate your identity when you are obtaining an access token for the production environment. For queries about the supported Certificate Authorities,use the [Contact form](/contact). 1. Log in to <a href="https://developer.abnamro.com/" target="_blank">your account</a> . 1. In the left-side navigation, click **Apps**. 1. Click **Add app**. 1. Enter a name for your application, select FX Trade, and click **Submit**. 1. Go back to **Apps**, and click **Request Production Access** 1. Select the API category that you want to request production access on. >**Note:** It is not possible to request production access for multiple API categories in one request. 1. Fill in the form, and click **Submit**. 1. You receive a confirmation email and ticket-ID. 1. ABN AMRO Developer Support validates the form, and if necessary contacts you. 1. When the setup is complete, ABN AMRO Developer Support contacts you and provides you with a client_id. 1. ABN AMRO Developer Support asks you to perform an authentication test in the production environment. -
Perform the following queries in the sandbox environment and store the results. This information must be passed to the FX Trade On-boarding Team:
- Perform a request for quote for selling 1.000,- EUR and buying USD for
the following tenors,
SPOT,TODAY,TOMORROWandASAP, and trade the request for quote within 3 seconds. Store theorderIds, as they are returned by the FX Trade API. If a quote is rejected, store thequoteId. - Perform a request for quote for selling 200.000,- EUR and buying USD
with tenor
SPOT. Trade the request for quote, and drive it to theFILLEDstate. Store theorderIdas returned by the FX Trade API. - Provide an execution report, utilizing the reporting endpoint, that
contains the
orderIds from the above two steps. - Submit the execution report using the Contact form.
- The FX Trade On-boarding Team will notify you when your account is in production and enabled for trading.
- Perform a request for quote for selling 1.000,- EUR and buying USD for
the following tenors,
Production environment availability hours
-
The FX Trade API product is available from Sunday 17:00 (America/New_York) until Friday 17:00 (America/New_York). An HTTP status 503 is returned outside of these hours.
-
Performing a POST on the quote and order endpoint is subject to trading hours. These are Monday 07:00 (Asia/Tokyo) to Friday 17:00 (America/New_York). A quote or order will be rejected outside of these hours.
How to use this API
This instruction describes the functionality of the FX Trade API, how to connect to the sandbox environment, and how to get an access token for a production environment.
Note: Before you start this process, you must complete the steps described in Sandbox access.
Postman collection
Use the following Postman collection to try out the functionality of this API:
- This collection highlights all available operations of the API: open API in Postman..
For additional information on how to configure Postman and import a collection, see Postman.
Environments
Below are the URLs for the FX Trade API and the authentication server used to obtain an access token. The URL for the authentication server depends on the type of authentication used. The sandbox environment has two types of authentication; basic authentication and certificate-based authentication. Production environments use certificate-based authentication only.
| Environment | Authentication | URL Authentication | URL API |
|---|---|---|---|
| Sandbox | Basic | https://auth-sandbox.abnamro.com/ | https://api-sandbox.abnamro.com/v1/fxtrade |
| TLS-MA | https://auth-mtls-sandbox.abnamro.com/ | https://api-sandbox.abnamro.com/v1/fxtrade | |
| Production | TLS-MA | https://auth-mtls.abnamro.com/ | https://api.abnamro.com/v1/fxtrade |
Step 1 - Get an access token
To invoke the FX Trade API you must obtain an access token through the OAuth2 Client Credentials Flow. The token, together with the API key for your application in sandbox, is required for every request. For more information, see Client Credentials.
Obtaining the access token using basic authentication
To obtain an access token for the sandbox environment using basic authentication, and that enables you to perform all operations, execute the following:
- username =
FXAPI - password =
z5l2KRWEXnmDvBhssPq7
curl -u FXAPI:z5l2KRWEXnmDvBhssPq7 \
-X POST https://auth-sandbox.abnamro.com/as/token.oauth2 \
-d 'grant_type=client_credentials&scope=fxtrade:allowedcurrencypairs:read fxtrade:settlementaccountgroups:read fxtrade:rates:read fxtrade:conversioncalculations:write fxtrade:quotes:read fxtrade:quotes:write fxtrade:orders:read fxtrade:orders:write'
If the access token request is valid and authorized, the authorization server issues an access token. The access token is a JSON Web Token.
{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImF3cyJ9.eyJzY29wZSI6WyJmeHRyYWRlOmFsbG93ZWRjdXJyZW5jeXBhaXJzOnJlYWQiLCJmeHRyYWRlOnNldHRsZW1lbnRhY2NvdW50Z3JvdXBzOnJlYWQiLCJmeHRyYWRlOnJhdGVzOnJlYWQiLCJmeHRyYWRlOnF1b3RlczpyZWFkIiwiZnh0cmFkZTpxdW90ZXM6d3JpdGUiLCJmeHRyYWRlOm9yZGVyczpyZWFkIl0sImNsaWVudF9pZCI6IkFQSV9jbGllbnQiLCJleHAiOjE1OTM2ODUyODR9.Rw2VGxmJ4uRhD7-kMvVa04-rBLGnWNXpPLfH6-Z92FRk2iVIB7pZa56QAqHi7LHYqEP_KdY8r1Dl9vEVHm0P_E3OKAfAyAntGml2PXJTNczmDTC8w1c4JYXbO5mNiTiU1PA3iqjlP5IqJlJHPOu1O1i5_47jobgVqEcT3-MMnkLbVq5fr1l9eFmDLPveuPZ2jWbDUHkaPW11a9ZDoQYAccs97gadRVbtxpiw-KM0qFyKeKlfX_OtPMK0spFSHXPaemrvVVkGoxhAxnL0GDtpJ7US0rexRNC18WhXYcJMy_PLUt-Yc2-iCe1CTi3ee0vD3kyxzDN1JLRaGafz5x0qcA",
"token_type": "Bearer",
"expires_in": "3599"
}
Note: It is recommended that you use the access token for up to 90% of its expiration time (ms).
Obtaining the access token using certificate-based authentication
To obtain an access token using production level authentication, a private/public key pair is provided. This is used to get an access token from the authentication endpoint. The private/public key is used for other API products in sandbox, and represents how an access token, in production, is obtained. The clientId used, as part of the request to the authentication endpoint, is API_client.
A PKCS#12 keystore is provided. It contains the private and public key.
Note: No passwords are set on the keystore and private key.
| Client authentication files |
|---|
| Private key file (PKCS#8 format) |
| Public certificate file (PEM format) |
| PKCS#12 keystore |
To obtain an access token for the sandbox environment using certificate-based authentication, execute the following:
curl -X POST \
https://auth-mtls-sandbox.abnamro.com/as/token.oauth2 \
--cert {path to FxTrade_API_client.crt} \
--key {path to FxTrade_API_client.key} \
-d 'grant_type=client_credentials&client_id=API_client&scope=fxtrade:allowedcurrencypairs:read fxtrade:settlementaccountgroups:read fxtrade:rates:read fxtrade:conversioncalculations:write fxtrade:quotes:read fxtrade:quotes:write fxtrade:orders:read fxtrade:orders:write'
If the access token request is valid and authorized, the authorization server issues an access token, according to RFC 6749
Step 2 - Check permitted currency pairs
To determine which currency pairs you can obtain indicative rates for, execute the following:
curl -X GET \
https://api-sandbox.abnamro.com/v1/fxtrade/allowedcurrencypairs \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
In the response, you receive an array of currency pairs:
[
"AUDCAD",
"AUDCHF",
"AUDCNH",
"AUDINR",
"AUDJPY",
...
"USDCNH",
"USDDKK",
"USDINR",
"USDJPY",
"USDMXN",
"USDRON"
]
Step 3 - Check settlement account groups
To determine which settlement account groups are available and usable when performing a currency conversion, execute the following:
curl -X GET \
https://api-sandbox.abnamro.com/v1/fxtrade/settlementaccountgroups \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
In the response, you receive an array of settlement account group identifiers. This enables you to verify if the setup is according to your expectations.
[
"Client Account",
"House Account"
]
Step 4 - Check permitted currency pairs for a settlement account group
To determine the currency pairs you can perform currency conversions for on a particular settlement account group, execute the following:
curl -X GET \
https://api-sandbox.abnamro.com/v1/fxtrade/allowedcurrencypairs?settlementAccountGroup=Client%20Account \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
In the response, you receive an array of currency pairs.
[
"EURAUD",
"EURCAD",
"EURCHF",
"EURCNH",
"EURDKK",
"EURGBP",
"EURINR",
"EURJPY",
"EURMXN",
"EURNZD",
"EURRON",
"EURUSD"
]
Step 5 - Get indicative rates for the SPOT and TODAY tenors
Note: By default, the indicative rates are for
SPOT, but other tenors are possible, such as:TODAY,TOMORROWandASAP(As Soon As Possible).
Use the following request to fetch the indicative rate for EURUSD for the SPOT tenor:
curl -X GET \
https://api-sandbox.abnamro.com/v1/fxtrade/rates/EURUSD \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The response contains the currency pair for the requested indicative rate, the bid or ask rate, the mid rate, and a timestamp that indicates when the rate was calculated. It shows the settlement date for the transaction performed.
{
"currencyPair": "EURUSD",
"allInRate": {
"bidRate": 1.08384,
"askRate": 1.09912,
"midRate": 1.09148,
"effectiveDateTime": "2020-11-24T09:26:23.486Z"
},
"settlementDate": "2020-11-27"
}
Use the following request to fetch the indicative rate for EURUSD, USDGBP, and the USDJPY for the TODAY tenor:
curl -X GET \
"https://api-sandbox.abnamro.com/v1/fxtrade/rates?currencyPairs=EURUSD,USDGBP,USDJPY&fxRateTenor=TODAY" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The response contains the indicative rates for all the requested currency pairs for which an indicative rate can be calculated.
[
{
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08371,
"askRate": 1.09899,
"midRate": 1.09135,
"effectiveDateTime": "2020-11-24T09:28:35.186Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0835530,
"askRate": 1.0988330,
"midRate": 1.0911930,
"effectiveDateTime": "2020-11-24T09:28:35.555Z"
},
"settlementDate": "2020-11-24"
},
{
"currencyPair": "USDGBP",
"spotRate": {
"bidRate": 0.79431,
"askRate": 0.80551,
"midRate": 0.79991,
"effectiveDateTime": "2020-11-24T09:28:35.280Z"
},
"swapPoints": {
"bidPoints": 0.0000658,
"askPoints": 0.0000658
},
"allInRate": {
"bidRate": 0.7943758,
"askRate": 0.8055758,
"midRate": 0.7999758,
"effectiveDateTime": "2020-11-24T09:28:35.559Z"
},
"settlementDate": "2020-11-24"
}
]
Note: In the above response, the USDJPY currency pair is not listed because the cutoff for that days settlement of JPY was reached before the request was made. Note that the rate contains swap points and a spot rate because we are dealing with an outright. If the tenor
ASAPwas used for all currency pairs, a rate would be provided.
Step 6 - Perform multiple conversion calculation
For performing one or more conversion calculations, that is calculating the equivalent amount in another currency, execute the following:
Note: When the query parameter
calculationModelis not provided, the bid or ask rate is used for the calculations. Adding the query parametercalculationModel=MID_RATEforces the use of the mid rate, making it suitable for valuation purposes.
curl -X POST \
http://api-sandbox.abnamro.com/v1/fxtrade/conversioncalculations \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
-d '[
{
"calculationId": "1",
"buyCurrency": "GBP",
"sellCurrency": "EUR",
"buyAmount": 1429.53
},
{
"calculationId": "2",
"buyCurrency": "GBP",
"sellCurrency": "USD",
"sellAmount": 1000.00
},
{
"calculationId": "3",
"buyCurrency": "XXX",
"sellCurrency": "USD",
"sellAmount": 1000.00
}
]'
The response contains the conversions for the calculation requests that could be served, along with those rejected. Together with the contra amount — which is the amount calculated — a multiplier is provided.When this is applied to the provided sell or buy amount, it results in the contra amount:
{
"conversions": [
{
"calculationId": "1",
"buyCurrency": "GBP",
"sellCurrency": "EUR",
"buyAmount": 1429.53,
"currencyPair": "EURGBP",
"allInRate": {
"bidRate": 0.86695,
"askRate": 0.87917,
"midRate": 0.87306,
"effectiveDateTime": "2020-11-24T10:12:18.722Z"
},
"contraAmount": 1648.92,
"rate": 0.86695,
"multiplier": 1.15347
},
{
"calculationId": "2",
"buyCurrency": "GBP",
"sellCurrency": "USD",
"sellAmount": 1000.00,
"currencyPair": "GBPUSD",
"allInRate": {
"bidRate": 1.24142,
"askRate": 1.25892,
"midRate": 1.25017,
"effectiveDateTime": "2020-11-24T10:12:18.562Z"
},
"contraAmount": 794.33,
"rate": 1.25892,
"multiplier": 0.79433
}
],
"failures": [
{
"conversionRequest": {
"calculationId": "3",
"buyCurrency": "XXX",
"sellCurrency": "USD",
"sellAmount": 1000.00
},
"code": "REQUEST_INVALID",
"reason": "property 'buyCurrency' with value 'XXX' does not represent a monetary currency"
}
]
}
Step 7 - Post a quote for a standard tenor
This request is a quote request for buying 25.000,- EUR, while selling USD for the tenor ASAP. This means that the settlement will take place as soon as possible:
curl -X POST \
https://api-sandbox.abnamro.com/v1/fxtrade/quotes \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}" \
-d '{
"consumerQuoteReference": "ASAP_2020-11-24_131",
"quoteRequest": {
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP"
},
"settlementAccountGroup": "House Account"
}'
The response contains the status of the quote request. If the status is QUOTED, all the price details, the effective rate, the contra amount — the amount that you must pay or will be buying — and the settlement date, will be available and an order can be performed.
{
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73",
"submittedDateTime": "2020-11-24T10:15:18.491Z",
"quoteStatus": "QUOTED",
"expirationDateTime": "2020-11-24T10:16:48.491Z",
"consumerQuoteReference": "ASAP_2020-11-24_131",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08386,
"askRate": 1.09914,
"midRate": 1.09150,
"effectiveDateTime": "2020-11-24T10:15:17.832Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0837030,
"askRate": 1.0989830,
"midRate": 1.0913430,
"effectiveDateTime": "2020-11-24T10:15:18.491Z"
},
"contraAmount": 22748.30,
"rate": 1.098983,
"settlementDate": "2020-11-24",
"quoteSignature": "AAAAAEieDBJM456AzZlWS2k7qrRsReE4tvAfI0DDWSrocUsEd+YgecKtw+h2dXyhdgIUKDLpDsQn2ZJbE+S8EgfiWEl1AT+MmYZV6y4EjV1+oab8EExx5zuEI5aXssahH5TQ3wY236YLtmDdsCFRV11V16v30kR0S+Gugx9y"
}
When a quote has the QUOTED status, the response contains the expiration date, and the time until the quote is tradable. It also contains the quote signature, a cryptographic token that must be sent to perform an order on a quote.
If a quote request is REJECTED, a message property indicates the reason. If a system cannot provide a quick response, a PENDING_NEW status is received. You must request a quote status on a regular basis. For more information, see quote status.
Step 8 - Post a quote for a broken date
This request is a quote request for buying an FX forward of 10.000,- EUR, while selling USD with a settlement date of 2020-12-25. This ensures that if ensuring that if the provided broken date is not a business day, the money will settle on the first business day before that day:
curl -X POST \
https://api-sandbox.abnamro.com/v1/fxtrade/quotes \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}" \
-d '{
"consumerQuoteReference": "FWD_2020-11-24_2",
"quoteRequest": {
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 10000.00,
"settlement": "2020-12-25P"
},
"settlementAccountGroup": "House Account"
}'
The response contains the status of the quote request. As December 25 is a bank holiday, the selected settlement date is December 24.
{
"quoteId": "0175f9c4-70f2-46f2-a609-0e217251e2ec",
"submittedDateTime": "2020-11-24T10:20:02.162Z",
"quoteStatus": "QUOTED",
"expirationDateTime": "2020-11-24T10:21:32.163Z",
"consumerQuoteReference": "FWD_2020-11-24_2",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 10000.00,
"settlement": "2020-12-25P",
"settlementAccountGroup": "House Account",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08366,
"askRate": 1.09894,
"midRate": 1.0913,
"effectiveDateTime": "2020-11-24T10:20:01.997Z"
},
"swapPoints": {
"bidPoints": 0.0014127,
"askPoints": 0.0014127
},
"allInRate": {
"bidRate": 1.0850727,
"askRate": 1.1003527,
"midRate": 1.0927127,
"effectiveDateTime": "2020-11-24T10:20:02.163Z"
},
"contraAmount": 9088.00,
"rate": 1.1003527,
"settlementDate": "2020-12-24",
"quoteSignature": "AAAAAEieDBmOTNAMUrLJCYS5RvBxaEjIAP2RaQtFSUC5n7Vt2qTHdTMtvKVjxF3UbNEoXDIDqQpE5KaRgOaLVOyWQvH8PzXpIwIsvB8wn0tVmOh/5kjNkx5E76YLC1aHtOYSug5/lqW+k6EBlLS76hfMmtMpNcGeA4+g3Q11VpYB5txW9A=="
}
Step 9 - Post a quote for a swap
This FX Swap request is a quote request for buying of 10.000,- EUR, while selling USD with a settlement date of SPOT and sell 10.000 EUR while buying USD with a settlement date 1 Month later:
curl -X POST \
http://host/fxtrade/fxtradingagreements/v1/{agreementid}/quotes \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X509-OU: Service Token Application" \
-H "X509v3-SAN2: GH0vCTAyyyLuxiPm7HlaRnJHWjl" \
-d '{
"consumerQuoteReference": "SWAP_2020-11-24_2",
"quoteRequest": {
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 10000,
"settlement": "SPOT"
"buyCurrencyFarLeg": "USD",
"sellCurrencyFarLeg": "EUR",
"sellAmountFarLeg": 10000,
"settlementFarLeg": "2021-05-25"
},
"settlementAccountGroup": "House Account"
}'
The response contains the status of the quote request.
{
"quoteId": "0175f9c4-70f2-46f2-a609-0e217251e2ec",
"submittedDateTime": "2020-11-24T10:20:02.162Z",
"quoteStatus": "QUOTED",
"expirationDateTime": "2020-11-24T10:21:32.163Z",
"consumerQuoteReference": "SWAP_2020-11-24_2",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 10000,
"settlement": "2020-12-27",
"settlementAccountGroup": "House Account",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08366,
"askRate": 1.09894,
"midRate": 1.0913,
"effectiveDateTime": "2020-11-24T10:20:01.997Z"
},
"swapPoints": {
"bidPoints": 0.0014127,
"askPoints": 0.0014127
},
"allInRate": {
"bidRate": 1.0850727,
"askRate": 1.1003527,
"midRate": 1.0927127,
"effectiveDateTime": "2020-11-24T10:20:02.163Z"
},
"contraAmount": 9088.00,
"rate": 1.1003527,
"settlementDate": "2020-12-27",
"buyCurrencyFarLeg": "USD",
"sellCurrencyFarLeg": "EUR",
"buyAmountFarLeg": 10000,
"settlementFarLeg": "2021-05-25",
"swapPointsFarLeg": {
"bidPoints": 0.0014127,
"askPoints": 0.0014127
},
"allInRateFarLeg": {
"bidRate": 1.0850727,
"askRate": 1.1003527,
"midRate": 1.0927127,
"effectiveDateTime": "2020-11-24T10:20:02.163Z"
},
"contraAmountFarLeg": 9088.00,
"rateFarLeg": 1.1003527,
"quoteSignature": "AAAAAEieDBmOTNAMUrLJCYS5RvBxaEjIAP2RaQtFSUC5n7Vt2qTHdTMtvKVjxF3UbNEoXDIDqQpE5KaRgOaLVOyWQvH8PzXpIwIsvB8wn0tVmOh/5kjNkx5E76YLC1aHtOYSug5/lqW+k6EBlLS76hfMmtMpNcGeA4+g3Q11VpYB5txW9A=="
}
Step 10 - Post an order
The following request shows an order request for buying 25.000,- EUR, while selling USD for the tenor ASAP. This is based on the quote that was received earlier:
Important: Replace the
quoteSignaturevalue with the value you obtained in the quote response.
curl -X POST \
https://api-sandbox.abnamro.com/v1/fxtrade/orders \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}" \
-d '{
"consumerOrderReference": "ASAP_2020-11-24_12",
"orderRequest": {
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP"
},
"settlementAccountGroup": "House Account",
"quoteSignature": "{quoteSignature}"
}'
If the time of submission is before the expiration time of the quote, the response will be:
{
"orderId": "0175f9c1-4d02-449f-a76b-a984db12919a",
"submittedDateTime": "2020-11-24T10:15:41.308Z",
"orderStatus": "FILLED",
"consumerOrderReference": "ASAP_2020-11-24_12",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08386,
"askRate": 1.09914,
"midRate": 1.09150,
"effectiveDateTime": "2020-11-24T10:15:17.832Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0837030,
"askRate": 1.0989830,
"midRate": 1.0913430,
"effectiveDateTime": "2020-11-24T10:15:18.491Z"
},
"contraAmount": 22748.30,
"rate": 1.098983,
"settlementDate": "2020-11-24",
"externalReference": "T20221209lold1000004466"
}
If the quote is expired and no longer tradable, performing an order with the quote signature will result in the following response:
{
"orderId": "0175f9ca-4ed1-4c8e-af9b-4b6bebb5796b",
"submittedDateTime": "2020-11-24T10:26:26.640Z",
"orderStatus": "REJECTED",
"message": "[FXA_03] submitted after quote expiration time of '2020-11-24T10:16:48.491Z'",
"consumerOrderReference": "ASAP_2020-11-24_12",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73"
}
Following FX Swap request is an order request for buying of 10.000,- EUR, while selling USD with a settlement date of SPOT and sell 10.000 EUR while buying USD with a settlement date 1 Month later:
curl -X POST \
http://host/fxtrade/fxtradingagreements/v1/{agreementid}/orders \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X509-OU: Service Token Application" \
-H "X509v3-SAN2: GH0vCTAyyyLuxiPm7HlaRnJHWjl" \
-d '{
"consumerQuoteReference": "SWAP_2020-11-24_2",
"quoteRequest": {
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 10000,
"settlement": "SPOT"
"buyCurrencyFarLeg": "USD",
"sellCurrencyFarLeg": "EUR",
"sellAmountFarLeg": 10000,
"settlementFarLeg": "2021-05-25"
},
"settlementAccountGroup": "House Account",
"quoteSignature": "{quoteSignature}"
}'
The filled response contains the order response.
{
"orderId": "0175f9c1-4d02-449f-a76b-a984db12919a",
"submittedDateTime": "2020-11-24T10:15:41.308Z",
"orderStatus": "FILLED",
"consumerOrderReference": "ASAP_2020-11-24_12",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08386,
"askRate": 1.09914,
"midRate": 1.09150,
"effectiveDateTime": "2020-11-24T10:15:17.832Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0837030,
"askRate": 1.0989830,
"midRate": 1.0913430,
"effectiveDateTime": "2020-11-24T10:15:18.491Z"
},
"contraAmount": 22748.30,
"rate": 1.098983,
"settlementDate": "2020-11-24",
"buyCurrencyFarLeg": "USD",
"sellCurrencyFarLeg": "EUR",
"buyAmountFarLeg": 10000,
"settlementFarLeg": "2021-05-25",
"swapPointsFarLeg": {
"bidPoints": 0.0014127,
"askPoints": 0.0014127
},
"allInRateFarLeg": {
"bidRate": 1.0850727,
"askRate": 1.1003527,
"midRate": 1.0927127,
"effectiveDateTime": "2020-11-24T10:20:02.163Z"
},
"contraAmountFarLeg": 9088.00,
"rateFarLeg": 1.098983,
"externalReference": "T20221209lold1000004466"
}
Step 11 - Get a single quote
If the POST request for a quote results in a PENDING_NEW state, you can query the quotes endpoint to find out the current status:
Important: replace the
quoteIdvalue with the value you obtained in the quote response.
curl -X GET \
https://api-sandbox.abnamro.com/v1/fxtrade/quotes/{quoteId} \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The following response shows a quote that EXPIRED because it was previously QUOTED:
{
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73",
"submittedDateTime": "2020-11-24T10:15:18.491Z",
"quoteStatus": "EXPIRED",
"expirationDateTime": "2020-11-24T10:16:48.491Z",
"consumerQuoteReference": "ASAP_2020-11-24_131",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08386,
"askRate": 1.09914,
"midRate": 1.09150,
"effectiveDateTime": "2020-11-24T10:15:17.832Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0837030,
"askRate": 1.0989830,
"midRate": 1.0913430,
"effectiveDateTime": "2020-11-24T10:15:18.491Z"
},
"contraAmount": 22748.30,
"rate": 1.098983,
"settlementDate": "2020-11-24",
"quoteSignature": "AAAAAEieDBJM456AzZlWS2k7qrRsReE4tvAfI0DDWSrocUsEd+YgecKtw+h2dXyhdgIUKDLpDsQn2ZJbE+S8EgfiWEl1AT+MmYZV6y4EjV1+oab8EExx5zuEI5aXssahH5TQ3wY236YLtmDdsCFRV11V16v30kR0S+Gugx9y"
}
Important: If the quote remains in the
PENDING_NEWstate, you must continue to query the service for a final state. To avoid receiving a 429 status code, use an interval between requests that is larger than one second.
Step 12 - Get multiple quotes matching a certain state
To find all the quotes having a PENDING_NEW state, you can query the quotes endpoint to find out the current status:
Important: To ensure appropriate response times for this endpoint, you must choose a parameter value for the
startDateTimequery that represents a short interval, and is before the current time. This will limit the amount of data analyzed.
curl -X GET \
"https://api-sandbox.abnamro.com/v1/fxtrade/quotes?quoteStatus=PENDING_NEW&startDateTime=2020-11-24T11%3A28%3A00Z" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The response contains two records; one due to dealer intervention, and one for a slow response:
{
"records": [
{
"quoteId": "0175fa3e-6567-4d4f-aae4-c0166f877932",
"submittedDateTime": "2020-11-24T11:28:01.125Z",
"quoteStatus": "PENDING_NEW",
"message": "quote went into dealer intervention as the amount exceeds EUR 10000.00",
"consumerQuoteReference": "SP_2020-11-24_79",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account"
},
{
"quoteId": "0175fa3f-f418-4705-9ba2-fc18958071c2",
"submittedDateTime": "2020-11-24T11:28:28.541Z",
"quoteStatus": "PENDING_NEW",
"message": "quote not priced in the specified maximum wait time of '500' ms",
"consumerQuoteReference": "SP_2020-11-24_87",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 2500.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account"
}
]
}
Step 13 - Get a single order
If the POST request for an order results in a PENDING_NEW state, you can query the orders endpoint to find out the current status:
Important: Replace the
orderIdvalue with the value you obtained earlier in the order response.
curl -X GET \
https://api-sandbox.abnamro.com/v1/fxtrade/orders/{orderId} \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The response shows that an order is filled:
{
"orderId": "0175f9c1-4d02-449f-a76b-a984db12919a",
"submittedDateTime": "2020-11-24T10:15:41.308Z",
"orderStatus": "FILLED",
"consumerOrderReference": "ASAP_2020-11-24_12",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08386,
"askRate": 1.09914,
"midRate": 1.09150,
"effectiveDateTime": "2020-11-24T10:15:17.832Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0837030,
"askRate": 1.0989830,
"midRate": 1.0913430,
"effectiveDateTime": "2020-11-24T10:15:18.491Z"
},
"contraAmount": 22748.30,
"rate": 1.098983,
"settlementDate": "2020-11-24",
"externalReference": "T20221209lold1000004466"
}
Important: If the order remains in the
PENDING_NEWstate, you must query the service for a final state. To prevent receiving a 429 status code,use an interval between requests that is larger than one second.
Step 14 - Generate an order report
To get an overview of the orders submitted for a particular day:
Important: You must replace the dates used in the
startDateTimeandendDateTimequery parameter with the current date.
curl -X GET \
"https://api-sandbox.abnamro.com/v1/fxtrade/orders?startDateTime=2020-11-24T00%3A00%3A00Z&endDateTime=2020-11-25T00%3A00%3A00Z" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The response provides the orders that were submitted during the specified date interval:
{
"nextPageKey": "2020-11-24T14:43:27.719Z",
"records": [
{
"orderId": "0175f9c1-4d02-449f-a76b-a984db12919a",
"submittedDateTime": "2020-11-24T10:15:41.308Z",
"orderStatus": "FILLED",
"consumerOrderReference": "ASAP_2020-11-24_12",
"buyCurrency": "EUR",
"sellCurrency": "USD",
"sellAmount": 25000.00,
"settlement": "ASAP",
"settlementAccountGroup": "House Account",
"quoteId": "0175f9c0-1cdb-4fae-ae01-ce0afbd83e73",
"currencyPair": "EURUSD",
"spotRate": {
"bidRate": 1.08386,
"askRate": 1.09914,
"midRate": 1.09150,
"effectiveDateTime": "2020-11-24T10:15:17.832Z"
},
"swapPoints": {
"bidPoints": -0.0001570,
"askPoints": -0.0001570
},
"allInRate": {
"bidRate": 1.0837030,
"askRate": 1.0989830,
"midRate": 1.0913430,
"effectiveDateTime": "2020-11-24T10:15:18.491Z"
},
"contraAmount": 22748.30,
"rate": 1.098983,
"settlementDate": "2020-11-24",
"externalReference": "T20221209lold1000004466"
},
...
{
"orderId": "0175fa5f-2df0-4332-9505-9d1afdd119d5",
"submittedDateTime": "2020-11-24T13:09:03.088Z",
"orderStatus": "FILLED",
"consumerOrderReference": "SP_2020-11-24_211",
"buyCurrency": "CHF",
"sellCurrency": "USD",
"sellAmount": 29868.00,
"settlement": "SPOT",
"settlementAccountGroup": "House Account",
"quoteId": "0175fa66-6c34-4159-a1dd-d2ed75753cfe",
"currencyPair": "USDCHF",
"allInRate": {
"bidRate": 0.95849,
"askRate": 0.97201,
"midRate": 0.96525,
"effectiveDateTime": "2020-11-24T13:09:02.804Z"
},
"contraAmount": 28628.18,
"rate": 0.95849,
"settlementDate": "2020-11-27",
"externalReference": "T20221209lold1000005484"
}
]
}
Understand pagination of generated reports
If the response contains a nextPageKey property, it indicates that the result set for the request is larger than what can be returned. This is based upon the pageSize query property, which defaults to 100. The value of the nextPageKey property is used as the value for the nextPageKey query parameter. This enables you to get the complete result set by performing multiple queries. An example of a subsequent query is:
curl -X GET \
"https://api-sandbox.abnamro.com/v1/fxtrade/orders?startDateTime=2020-11-24T00%3A00%3A00Z&endDateTime=2020-11-25T00%3A00%3A00Z&nextPageKey=2020-11-24T14%3A43%3A27.719Z" \
-H "Accept: application/json" \
-H "Authorization: Bearer {your_access_token}" \
-H "API-Key: {your_api_key}"
The above query must be repeated with a nextPageKey query parameter, that has the value from the property with the same name in the response. When the response no longer contains this property, all the records for that day are provided.
Need help?