Inquiry about trade order submission result
POST
: /amsin/api/v1/business/account/inquiryTradeOrder
The inquiryTradeOrder API is used to inquiry about 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:
|
sellerUserId | String | Yes | The unique ID assigned by the seller to identify a user. |
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. |
requestId | String | Yes | The unique ID assigned by the Partner to identify a trade order submission request. |
batchStatus | String | Yes | Indicates the submission status of the trade order batch. Valid values are:
|
tradeOrderResults | Array <TradeOrderResult Object> | No (Conditional) | Indicates the list of the trade order results. |
Result processing logic
Once the Partner calls API, WorldFirst returns with its result. The range of result.resultStatus field is:
result.resultStatus | Description |
S | API is called with success. |
F | API is called with failure. For reasons, refer to result.resultCode and result.resultMessage. |
U | When API returns with UNKNOWN, retry calling it. Retry strategy:
Please contact WorldFirst technical support if the issue remains. |
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. |
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. |
CONTRACT_CHECK_FAIL | F | The contract check has failed. | Check the contract status with WorldFirst before retrying. |
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. |
TRADE_ORDER_NOT_EXIST | The trade order does not exist. | Retry with the correct trade order information. |
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
{
"requestId": "20230222191210001100300007*****"
}
Response
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
},
"batchStatus": "FINISHED",
"tradeOrderResult": [
{
"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"
}
}
]
}