inquireExchange
Use this API to inquire about the result of the settlement request after creating a settlement request with the createExchange API.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
- If the data type of a field is Integer and its value is 20, set it as "20".
- If the data type of a field is Boolean and its value is
true, set it as "true".
Request parameters
exchangeRequestId String REQUIRED
The unique ID assigned by the merchant to identify a foreign exchange delivery request.
More information:
- Maximum length: 64 characters
Response parameters
result Object REQUIRED
Indicates whether this API is called successfully.
exchangeResult Object
The result of the exchange call.
exchangeTradeType String REQUIRED
Foreign exchange delivery type. Possible value range:
SPOT: Real-time exchange rate.
exchangeMode String REQUIRED
Foreign exchange delivery model. Possible value range:
APPOINTED: indicates an exchange rate at the appointed time.
exchangeRequestId String REQUIRED
The unique ID assigned by the merchant to identify a foreign exchange delivery request.
More information:
- Maximum length: 64 characters
quote Quote REQUIRED
Foreign exchange rate information for the account's delivery request.
sellAmount Amount REQUIRED
Amount of foreign exchange sold.
buyAmount Amount REQUIRED
Amount of foreign exchange purchased.
exchangeId String REQUIRED
The unique ID assigned by Antom to identify foreign exchange delivery request .
More information:
- Maximum length: 128 characters
exchangeStartTime Datetime REQUIRED
The time when the foreign exchange delivery request is initiated.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
exchangeEndTime Datetime REQUIRED
The time when the foreign exchange delivery to home request is completed.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
Request
Response
Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | success. | No further action is needed. |
| PARAM_ILLEGAL | F | Illegal parameters exist. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. |
| PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. It is recommended that you contact Antom Technical Support to resolve the issue. |
| UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | The service might be down, retry later. If the issue persists, contact Antom Technical Support. |
| REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If the issue persists, contact Antom Technical Support. |
| ORDER_NOT_EXIST | F | The order does not exist. | Retry with the correct order information. |
| CONTRACT_CHECK_FAIL | F | The contract check has failed. | Ensure the Partner has already signed a contract and the input is correct. |
| INVALID_API | F | The called API is invalid or not active. | Check whether the correct API is being called. |
| INVALID_CLIENT | F | The client is invalid. | The Client ID does not exist or is invalid. |
| INVALID_SIGNATURE | F | The signature is invalid. | Make sure the request is properly signed with a valid signature. |
| METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. | Ensure the HTTP method is POST. |
Exchange result code
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | Success | No further action is needed. |
| PROCESSING | S | Processing | Try again later. |
| ORDER_NOT_FOUND | U | Order not found. | Retry with correct order information. |
| PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. It is recommended that you contact Antom Technical Support to resolve the issue. |
| USER_NOT_EXIST | F | The user does not exist. | Retry with the correct user information. |
| USER_ACCOUNT_ABNORMAL | F | The user account status is abnormal. | Retry with a different user. If the issue persists, contact Antom Technical Support for more details. |
| USER_STATUS_ABNORMAL | F | The status of the user is abnormal. Retry with another card. | Retry with a different user. |
| AMOUNT_EXCEED_LIMIT | F | The amount exceeds the limit. | Make sure the amount submitted is correct and retry. |
| BALANCE_NOT_ENOUGH | F | Balance is not enough. | Make sure the balance is sufficient and retry. |
| CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Make sure the currency is correct and retry. |
| ORDER_NOT_EXIST | F | The order does not exist. | Retry with another order. |
| USER_NO_PERMISSION | F | User does not have permission. | Check user permission and retry. |