Error and Status Code Reference
This page summarizes the status, function, and event codes commonly used by the Fubon Neo API for futures trading, so developers can quickly look them up when troubleshooting or evaluating a status.
Order status
The current status of an order can be retrieved through GetOrderResult or received through order reports. The language-specific query methods are Python get_order_results, Node.js getOrderResults, and C# GetOrderResult.
| Status | Value | Description |
|---|---|---|
| Pre-order | 0 | Pre-order |
| Order received by the middle office | 4 | Intermediate status; use GetOrderResult to retrieve the latest status. |
| Processing reported by the exchange | 8 | Exchange-reported intermediate status, often observed for orders not priced at the limit-up or limit-down price; this status is not shown by get_result or get_result_detail. |
| Back-office connection timeout | 9 | Query the status with GetOrderResult later, or contact your broker. |
| Order or modification succeeded | 10 | A new order succeeded; successful price or quantity modifications also return 10, so inspect the returned order fields to identify the modification. |
| Cancellation successful | 30 | Cancellation successful |
| Partially filled; remainder cancelled | 40 | Partially filled; the unfilled remainder was cancelled. |
| Fully filled | 50 | Fully filled |
| Price modification failed | 19 | Price modification failed |
| Quantity modification failed | 29 | Quantity modification failed |
| Cancellation failed | 39 | Cancellation failed |
| Failed | 90 | Failed |
Futures and securities status-code differences
- Futures orders do not use the securities success statuses
15and20for price and quantity modifications, and do not use the ACK statuses14,24, and34. - A successful futures price or quantity modification returns
status10. Inspect the price and quantity fields in that10result to distinguish the modification. - Status
8is an exchange-reported intermediate status, often observed for orders not priced at the limit-up or limit-down price. It is not included inget_resultorget_result_detailresults.
Function type
Indicates the operation associated with the report or query result. Values 15 and 20 in this section are function types, not successful futures order statuses.
| Function | Value | Description |
|---|---|---|
| New order | 0 | New order |
| New-order execution | 10 | New-order execution |
| Price modification | 15 | Price modification |
| Quantity modification | 20 | Quantity modification |
| Cancellation | 30 | Cancellation |
| Failed | 90 | Failed |
Event codes
The following codes are returned when subscribing to event notifications through on_event.
| Returned code | Meaning |
|---|---|
100 | Connection established successfully |
200 | Login successful |
201 | Login warning (for example, the password has not been changed for 90 days) |
300 | Disconnected |
301 | No connection pong response received |
302 | The user logged out and disconnected |
304 | API Key changed (revoked); forced logout (added in version 2.2.7) |
500 | Error |