Antom, leading provider of tailored payment solutions

createExchange

POST /v1/aba/funds/createExchange

Use this interface to create a settlement with spot rates.

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:

  • This field is an API idempotency field.

buyAmount Amount  REQUIRED

Amount of foreign exchange purchased.

Show child parameters

sellAmount Amount  REQUIRED

Amount of foreign exchange sold.

Show child parameters

quote Quote  REQUIRED

The foreign exchange rate information requested for this foreign exchange delivery to the account.

Show child parameters

exchangeMode String  REQUIRED

Foreign exchange delivery model. Possible value range: 

  • APPOINTED: indicates an exchange rate at the appointed time.

exchangeTradeType String  REQUIRED

Foreign exchange delivery type. Possible value range: 

  • ​SPOT​: Real-time exchange rate.

Response parameters

result object  REQUIRED

Represents the result of the interface call.
Show child parameters

exchangeRequestId String  REQUIRED

The unique ID assigned by the merchant to identify a foreign exchange delivery request.

More information:

  • Maximum length: 64 characters

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.

quote Quote  REQUIRED

The foreign exchange rate information for the account's delivery request.

Show child parameters

buyAmount Amount  REQUIRED

Amount of foreign exchange purchased.

Show child parameters

sellAmount Amount  REQUIRED

Amount of foreign exchange sold.

Show child parameters

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".
API Explorer

Request

URL
Method
POST
Request Body

Response

Response Body

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess
This interface is called successfully.
PROCESSINGSThe transfer is in process.

The exchange is created successfully and being processed.

PARAM_ILLEGALFIllegal parameters exist.

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.

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

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

REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.

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

USER_NOT_EXISTFThe user does not exist.

Retry with the correct user information.

USER_NO_PERMISSIONFUser does not have permission

Retry with another user information.

ACCOUNT_STATUS_ABNORMALFThe status of the account is abnormal.

Retry with a different user. If the issue persists, contact Antom Technical Support for more details.

REPEAT_REQ_INCONSISTENTFRepeated requests are inconsistent.

Ensure all the fields in the requests are the same and try again.

USER_STATUS_ABNORMALFThe status of the user is abnormal.

The status of the user is abnormal. Retry with another create exchange order.

BALANCE_NOT_ENOUGHFBalance is not enough.

Make sure the balance is sufficient and retry.

AMOUNT_EXCEED_LIMITFAmount exceeds the allowed limit. Please try again

Make sure the amount submitted is correct and retry.

CURRENCY_NOT_SUPPORTFThe currency is not supported.

Make sure the currency input is correct and try again.

CONTRACT_NOT_EXISTFContract does not exist.

Ensure the Partner has already signed a contract and the input is correct.

CONTRACT_CHECK_FAILFThe contract check has failed.

Ensure the Partner has already signed a contract and the input is correct.

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.

QUOTE_EXPIREDFThe quote is expired.

Call the createQuote API to create a new quote. Retry creating a new settlement request with the new quote.