Get an FX quoteSignature required

POST /amsin/api/v1/business/fund/createQuote

The Partner calls this API to obtain a transactional forex quote on WorldFirst.

To get forex rates as a reference, call the inquiryRate API instead.

Structure

A message consists of a header and body. For details, see the following sections.

Request header

Field

Required

Sample

Description

Client-Id

Yes

Client-Id: *****

For more information about these request header fields, see Request header.

Signature

Yes

Signature: algorithm=RSA256, keyVersion=2, signature=*****

Content-Type

Yes

Content-Type: application/json; charset=UTF-8

Request-Time

Yes

Request-Time: 2019-04-04T12:08:56+08:00


Request parameters

sell QuoteAmount  REQUIRED

The amount and the currency to be sold.

Show child parameters

buy QuoteAmount  REQUIRED

The amount and the currency to be bought.

Show child parameters

exchangeTradeType String  REQUIRED

Defines the type of foreign exchange trading.

Valid values are:

  • SPOT: Using spot rate.
  • FORWARD: Using forward rate.
  • UNFUNDED_SPOT: Using unfunded spot rate.

quoteUnfundedInfo QuoteForwardInfo  CONDITIONAL

Information about the quotes. Specify this parameter if the value of the exchangeTradeType parameter is FORWARD or UNFUNDED_SPOT.

Show child parameters

Response parameters

result Result  REQUIRED

Indicates whether this API is called successfully.

Show child parameters

responseId String  REQUIRED

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

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

More information:

  • Maximum length: 32 characters

quote Quote  REQUIRED

Information about the quote, such as quote prices, quote start time and expiry time, etc.

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

Show child parameters

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

exchangeTradeType String  REQUIRED

Defines the type of the foreign exchange trading.

Valid values are:

  • SPOT: Using spot rate.
  • FORWARD: Using forward rate.
  • UNFUNDED_SPOT: Using unfunded spot rate. 

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

quoteUnfundedInfo QuoteForwardInfo  CONDITIONAL

Information about the quotes. This parameter is returned if the value of the exchangeTradeType parameter is FORWARD or UNFUNDED_SPOT.

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

Show child parameters
API Explorer

Request

URL
Request Body

Response

Case
Success
Response Body

Result processing logic

After calling the API, a response is returned. The possible responses for result.resultStatus are:

Result status

Description

S

This indicates the API call succeeded. Get the value of quote.quotePrice and quote.quoteId.

F

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

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.

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.

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.

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.

Business-related result codes

CodeValueMessageFurther action
UN_SUPPORT_BUSINESSFUnsupported business.

Invalid parameters are used. Retry with the correct information.

INVALID_ACCESS_TOKENFInvalid access token

Check whether the accessToken is correct.

CURRENCY_NOT_SUPPORTFThe currency is not supported.

Make sure the currency input is correct and try again.

CONTRACT_CHECK_FAILFThe contract check has failed.

Check the contract status before retrying.

AUTHORIZATION_NOT_EXISTFThe authorization does not exist.

Retry the authorization process. If the issue persists, contact our Technical Support Team.

@2024 WorldFirst