Notify trade order submission result

POST: /amsin/api/v1/business/account/notifyTradeOrder

The notifyTradeOrder API is used by the Worldfirst to notify the Partner of the submission result of trade orders.

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Request body parameters

Field

Data type

Required

Description

requestId

String

Yes

The unique ID assigned by the Partner to identify a trade order submission request.

More information about this field:

  • This field is an API idempotency field. The Partner can use it to do the idempotent check.
  • Maximum length: 64 characters

tradeOrderResults

Array <TradeOrderResult Object>

No (Conditional)

Indicates the list of the trade order results.

Response parameters

Field

Data type

Required

Description

result

Result Object

Yes

Indicates the result of the trade order submission, including the result status and result message.

Result code

result.resultCode

resultCode

resultStatus

resultMessage

Further action

SUCCESS

S

Success

UNKNOWN_EXCEPTION

U

The API call failed, which is caused by unknown reasons.

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

PROCESS_FAIL

F

A general business failure occurred. Do not retry.

Human intervention is usually needed. It is recommended that you contact WorldFirst Technical Support to resolve the issue.

tradeOrderResult.errorCode

errorCode

errorMessage

Further action

PARAM_ILLEGAL

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.

TRADE_ORDER_SUBMITTED

trade order has been submitted before.

Check and verify whether the trade order has been submitted. If so stop submitting it again.

RISK_REJECT

The trade order is rejected for risk control reasons.

Prompt the user that the request is rejected because the risk control failed.

PROCESS_FAIL

A general business failure occurred. Do not retry.

Human intervention is usually needed. It is recommended that you contact WorldFirst Technical Support to resolve the issue.

Sample code

Request

copy
{
    "requestId": "20230222191210001100300007*****",
    "tradeOrderResults": [
      {
        "referenceOrderNo": "50957342066*****",
        "orderStatus": "AVAILABLE",
        "resultMessage": "Can be used for declaration.",
        "tradeAmount": {
                "currency": "USD",
                "value": "500"
        },
        "transAmount": {
            "currency": "USD",
            "value": "400"
        },
        "remainAmount": {
            "currency": "USD",
            "value": "400"
        }
      }
    ]
}

Response

copy
{
    "result": {
        "resultCode": "SUCCESS",
        "resultStatus": "S",
        "resultMessage": "success"
    }
}

@2024 WorldFirst