API REFERENCE
Query an FX order
This API queries FX order information.
After an FX order has been created and executed, use this API to query its latest status, execution information, and related transaction details.
Please use a dedicated account.
user=040268
| Parameter | Type | Description | Required |
|---|---|---|---|
| user | String | Merchant-level UID | Required |
| sign | String | Signature | Required |
| method | String | v3.QueryFXOrder | Required |
| time | Long | Timestamp | Required |
- Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| trade_id | String | Quote ID | Required |
| request_id | String | Unique request ID; a combination of at least 24 digits and letters is recommended | Required |
Signature example:
Sorted parameters concatenated into a URL-style query string
"method=v3.QueryFXOrder&request_id=20304095064069023960369q-11&time=1546588959&trade_id=6e5cf660fb58455cd68a413a8249061a&user=040268"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "040268",
"sign": "YOUR_SIGNATURE",
"method": "v3.QueryFXOrder",
"time": 1546588959,
"data": {
"trade_id": "6e5cf660fb58455cd68a413a8249061a",
"request_id": "20304095064069023960369q-11"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"booking_status": "success",
"settlement_status": "settled",
"sell_currency": "GBP",
"buy_currency": "DKK",
"sold_currency": "GBP",
"sold_amount": "1.00",
"bought_currency": "DKK",
"bought_amount": "8.54",
"tenor": "TOD",
"exchange_rate": "8.544924729",
"order_id": "YOUR_ORDER_ID",
"quote_id": "83e96dc0-8f8e-48c7-9bc4-6acc1019fced",
"trade_id": "6e5cf660fb58455cd68a413a8249061a",
"reference": "YB test"
},
"message": "",
"response_id": "202603181711118835985708"
}
Additional information:
Response result:
- If the call succeeds, "status": true is returned.
- If the call fails, "status": false is returned.
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | |
| false | -1000 | Internal error |
| false | -403 | The signature Error |
| false | -2001 | The user not exist |
| false | -3001 | Required field is missing |
| false | -4118 | Incorrect request ID |
booking_status
| Status | Description |
|---|---|
| success | The FX booking request was successfully processed and the order has been created or executed. |
| failed | The request failed due to an internal system error. Please retry later or contact technical support if the issue persists. |
| pending | The request is pending because the request signature verification failed. Please verify the signature parameters and try again. |
| reversed | The request could not be processed because the specified user does not exist in the system. |
| rolled | The request was rejected because one or more required fields are missing in the request parameters. |
| updated | The request ID provided is incorrect or does not match any existing transaction. |
settlement_status:
| Status | Description |
|---|---|
| open | The FX order has been successfully created and is awaiting settlement. |
| settled | The FX transaction has been fully settled and the funds have been delivered according to the agreed tenor. |
| pending | The FX order has been created but settlement has not yet been completed. This may occur while waiting for the settlement date (e.g., SPOT T+2). |
| cancelled | The FX order has been cancelled and will not be settled. |
