Check FX settlement statusSignature required

POST /amsin/api/v1/business/fund/inquiryExchange

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

customerId String  REQUIRED

The unique ID that is assigned by WorldFirst to identify a Customer.

More information:

  • Maximum length: 64 characters

Response parameters

result Result  REQUIRED

Indicates whether this API is called successfully.

Show child parameters

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.  

Show child parameters

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.  

Show child parameters

buy QuoteAmount  REQUIRED

The amount and the currency to be bought.

This field is returned only when the value of result.resultStatus is S.  

Show child parameters

exchangeCreateTime DateTime  CONDITIONAL

The time that the settlement request is created.

This field is returned only when both of the following conditions are met:

  • when the value of result.resultStatus is S
  • ​when exchangeRequestTime parameter is specified in the createExchange API.

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.  

Show child parameters

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 is UNFUNDED_SPOT.  

Show child parameters

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 is FORWARD.  

Show child parameters
API Explorer

Request

URL
Request Body

Response

Response Body

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 exchangeResult.resultCode.

F

This indicates the API call failed. For more information on why the call failed, see result.resultCode.

U

This indicates the API call result is unknown. Partner can make a query when the returned status is UNKNOWN. Use the following query strategy:

  • A Partner can make 7 queries at maximum.
  • Intervals between queries: 5m, 10m, 20m, 40m, 80m, 160m, and 320m.

If none of the queries is successful, contact our Technical Support Team.

result.resultCode: System-realted result codes

CodeValueMessageFurther action
SUCCESSSSuccess

PARAM_ILLEGALFIllegal 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_EXCEPTIONUAPI failed due to unknown reason.

The service might be down, retry later. If the issue persists, contact our Technical Support Team.

REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.

Call the interface again to resolve the issue. If the issue persists, contact our Technical Support Team.

INVALID_APIFThe called API is invalid or not active.

Check whether the correct API is being called.

INVALID_CLIENTFThe client is invalid.

The Client ID does not exist or is invalid.

INVALID_SIGNATUREFThe signature is invalid.

Make sure the request is properly signed with a valid signature.

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method.

Ensure the HTTP method is POST.

result.resultCode: Business-related result codes

CodeValueMessageFurther action
ORDER_NOT_EXISTFThe order does not exist.

Retry with another exchange order.

AUTHORIZATION_NOT_EXISTFThe 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_FAILFThe contract check has failed.

Check the contract status before retrying.

exchangeResult.resultCode

CodeValueMessageFurther action
SUCCESSSThe settlement is successfully completed.
PROCESS_FAILFA 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.

PROCESSINGSThe 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_EXCEPTIONUAPI failed due to an unknown reason.

The service might be down, retry later. If the issue persists, contact our Technical Support Team.

@2024 WorldFirst