Notify trade order submission resultSignature required
After trade orders are submitted, Worldfirst will call this API to notify the B2C Partners of the trade order submission result.
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
requestId String REQUIRED
The unique ID assigned by the Partner to identify a trade order submission request.
More information:
- This field is an API idempotency field.The Partner can use it to do the idempotent check.
- Maximum length: 64 characters
tradeOrderResults Array <TradeOrderResult> REQUIRED
Indicates the list of the trade order results.
Response parameters
result Result REQUIRED
Indicates whether this API is called successfully.
Request
Response
Result processing logic
After receiving the notification, you need to send a response message to acknowledge the receipt of the notification.
Make sure you properly sign the message before sending the response. For details, refer to the Sign a request and validate the signature chapter.
For more details on the response header, refer to the API overview chapter.
The response body has the following fixed value:
In the absense of an ackowledgement reponse from the Partner, WorldFirst will resend the result.
The following policy represents how WorldFirst makes retry attempts:
- WorldFirst retries notifications 7 times.
- Intervals between notifications: 2m, 10m, 10m, 1h, 2h, 6h, and 15h.
Result/Error codes
Code | Value | Message | 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
Code | Value | Message | Further action |
---|---|---|---|
TRADE_ORDER_SUBMITTED | F | trade order has been submitted before. | Check and verify whether the trade order has been submitted. If so stop submitting it again. |
RISK_REJECT | F | The trade order is rejected for risk control reasons. | Prompt the user that the request is rejected because the risk control failed. |
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. |