Check FX settlement statusSignature required
After creating a settlement request with the createExchange API, the Partner can inquire about the result of the settlement request with this API.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
exchangeRequestId String REQUIRED
The unique ID that is assigned by the Partner to identify a settlement request.
More information:
- Maximum length: 128 characters
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
exchangeResult Result REQUIRED
Indicates the result of the settlement.
For more details, refer to the Result processing logic section.
This field is returned only when the value of result.resultStatus is
S
.
exchangeId String REQUIRED
The unique ID that is assigned by WorldFirst to identify a settlement
This field is returned only when the value of result.resultStatus is
S
.
More information:
- Maximum length: 64 characters
exchangeRequestId String REQUIRED
The unique ID that is assigned by the settlement initiator to identify a settlement request.
This field is returned only when the value of result.resultStatus is
S
.
More information:
- Maximum length: 128 characters
sell QuoteAmount REQUIRED
The amount and the currency to be sold.
This field is returned only when the value of result.resultStatus is
S
.
buy QuoteAmount REQUIRED
The amount and the currency to be bought.
This field is returned only when the value of result.resultStatus is
S
.
exchangeCreateTime DateTime REQUIRED
The time that the settlement request is created.
This field is returned only when the value of result.resultStatus is
S
.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
exchangeFinishTime DateTime REQUIRED
The time that the settlement request is finished(either succeed or failed).
This field is returned only when the value of result.resultStatus is
S
.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
quote Quote REQUIRED
Information with regard to the quote, such as the currency pair used, the expiry time of the quote, etc.
This field is returned only when the value of result.resultStatus is
S
.
exchangeMode String REQUIRED
The mode of the settlement.
Valid values are:
REALTIME
: indicates an exchange rate at the real-time.APPOINTED
: indicates an exchange rate at the appointed time.
This field is returned only when the value of result.resultStatus is
S
.
exchangeTradeType String REQUIRED
Defines the type of settlement.
Valid values are:
SPOT
: Using spot rate.FORWARD
: Using forward rate.UNFUNDED_SPOT
: Using forward rate.
This field is returned only when the value of result.resultStatus is
S
.
exchangeUnfundedInfo ExchangeForwardInfo CONDITIONAL
Information about the forward exchange.
This field is returned only when the value of result.resultStatus is
S
and the value of exchangeTradeType isUNFUNDED_SPOT
.
exchangeForwardInfo ExchangeForwardInfo CONDITIONAL
Information about the forward exchange.
This field is returned only when the value of result.resultStatus is
S
and the value of exchangeTradeType isFORWARD
.
Request
Response
Result processing logic
After calling the API, a response is returned, which includes two result codes: result.resultStatus
and exchangeResult.resultStatus
.
result.resultStatus
indicates the result of the inquiry.exchangeResult.resultStatus
indicates the result of the settlement.
Possible responses for result.resultStatus
are:
Result status | Description |
S | This indicates the API call succeeded. For the result of the settlement, check |
F | This indicates the API call failed. For more information on why the call failed, see |
U | This indicates the API call result is unknown. Partner can make a query when the returned status is
If none of the queries is successful, contact our Technical Support Team. |
result.resultCode: System-realted result codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | The service might be down, retry later. If the issue persists, contact our Technical Support Team. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If the issue persists, contact our Technical Support Team. |
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 |
result.resultCode: Business-related result codes
Code | Value | Message | Further action |
---|---|---|---|
ORDER_NOT_EXIST | F | The order does not exist. | Retry with another exchange order. |
AUTHORIZATION_NOT_EXIST | F | The authorization does not exist. | Make sure that the input is correct. If the issue persists, contact our Technical Support Team to verify the authorization status. |
CONTRACT_CHECK_FAIL | F | The contract check has failed. | Check the contract status before retrying. |
exchangeResult.resultCode
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | The settlement is successfully completed. | |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. It is recommended that you contact our Technical Support Team to resolve the issue. |
PROCESSING | S | The settlement is being processed. | The settlement request is created successfully. Call the inquiryExchange API again or wait for the result notification from the notifyExchange API. |
UNKNOWN_EXCEPTION | U | API failed due to an unknown reason. | The service might be down, retry later. If the issue persists, contact our Technical Support Team. |