Trade
Authorization
Signed mode: every request is signed with your App Key/Secret. Header set:
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string · header | Required | The account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation. |
X-Api-Key | string · header | Required | Your App Key. |
X-Timestamp | string · header | Required | Request timestamp in seconds (Unix epoch). |
X-Api-Signature | string · header | Required | HMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=. |
This API is used for order detail query
# Replace the order ID below with your actual order ID
longbridge order detail 693664675163312128
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
order_id | string | Required | Order ID for specifying order ID query, for example: `701276261045858304` |
is_attached | boolean | Optional | Whether `order_id` refers to an attached order |
Response
Response properties
| Name | Type | Required | Description |
|---|---|---|---|
order_id | string | Optional | Order ID |
status | string | Optional | Order Status. One of: `NotReported`, `ReplacedNotReported`, `ProtectedNotReported`, `VarietiesNotReported`, `DelayedNotReported`, `FilledStatus`, `WaitToNew`, `NewStatus`, `WaitToReplace`, `PendingReplaceStatus`, `ReplacedStatus`, `PartialFilledStatus`, `WaitToCancel`, `PendingCancelStatus`, `RejectedStatus`, `CanceledStatus`, `ExpiredStatus`, `PartialWithdrawal`. |
stock_name | string | Optional | Stock Name |
quantity | string | Optional | Submitted Quantity |
executed_quantity | string | Optional | Executed Quantity. when the order is not filled, value is 0 |
price | string | Optional | Submitted Price. when market condition order is not triggered, value is empty string |
executed_price | string | Optional | Executed Price. when the order is not filled, value is 0 |
submitted_at | string | Optional | Submitted Time |
side | string | Optional | Order Side. **Enum Value:**, `Buy`, `Sell` |
symbol | string | Optional | Stock symbol, use `ticker.region` format, example: `AAPL.US` |
order_type | string | Optional | Order Type. One of: `LO`, `ELO`, `MO`, `AO`, `ALO`, `ODD`, `LIT`, `MIT`, `TSLPAMT`, `TSLPPCT`, `SLO`. |
last_done | string | Optional | Last done. when the order is not filled, value is empty string |
trigger_price | string | Optional | `LIT` / `MIT` Order Trigger Price. When the order is not `LIT` / `MIT` order, value is empty string |
msg | string | Optional | Rejected message or remark, default value is empty string. |
tag | string | Optional | Order tag. **Enum Value**, `Normal` - Normal Order, `Gtc` - Long term Order, `Grey` - Grey Order |
time_in_force | string | Optional | Time in force Type. **Enum Value:**, `Day` - Day Order, `GTC` - Good Til Canceled Order, `GTD` - Good Til Date Order |
expire_date | string | Optional | Long term order expire date, format: `YYYY-MM-DD`, example: `2022-12-05`. When not a long term order, default value is empty string |
updated_at | string | Optional | Last updated time, formatted as a timestamp (second) |
trigger_at | string | Optional | Conditional order trigger time. formatted as a timestamp (second) |
trailing_amount | string | Optional | `TSLPAMT` order trailing amount. When the order is not `TSLPAMT` order, value is empty string |
trailing_percent | string | Optional | `TSLPPCT` order trailing percent. When the order is not `TSLPPCT` order, value is empty string |
limit_offset | string | Optional | `TSLPPCT` order limit offset amount. When the order is not `TSLPPCT` order, value is empty string |
trigger_status | string | Optional | Conditional Order Trigger Status, When an order is not a conditional order or a conditional order is not triggered, the trigger status is NOT_USED. **Enum Value**, `NOT_USED`, `DEACTIVE`, `ACTIVE`, `RELEASED` |
currency | string | Optional | Currency |
outside_rth | string | Optional | Enable or disable outside regular trading hours, Default is `UnknownOutsideRth` when the order is not a US stock. **Enum Value:**, `RTH_ONLY` - Regular trading hour only, `ANY_TIME` - Any time, `OVERNIGHT` - Overnight" |
remark | string | Optional | Remark |
free_status | string | Required | Commission-free Status, default value is None **Enum Value:** `None` - None `Calculated` - Commission-free amount to be calculated `Pending` - Pending commission-free `Ready` - Commission-free applied |
free_amount | string | Required | Commission-free amount, default value is empty string. |
free_currency | string | Required | Commission-free currency, default value is empty string. |
deductions_status | string | Required | Deduction status/Cashback Status, default value is NONE **Enum Value:** `NONE` - Pending Settlement `NO_DATA` - Settled with no data `PENDING` - Settled and pending distribution `DONE` - Settled and distributed |
deductions_amount | string | Required | Deduction amount, default value is empty string. |
deductions_currency | string | Required | Deduction currency, default value is empty string. |
platform_deducted_status | string | Required | Platform fee deduction status/Cashback Status, default value is NONE **Enum Value:** `NONE` - Pending Settlement `NO_DATA` - Settled with no data `PENDING` - Settled and pending distribution `DONE` - Settled and distributed |
platform_deducted_amount | string | Required | Platform fee deduction amount, default value is empty string. |
platform_deducted_currency | string | Required | Platform fee deduction currency, default value is empty string. |
history | object[] | Required | Order history details |
└ price | string | Optional | Submitted Price. when market condition order is not triggered, value is empty string |
└ quantity | string | Optional | Submitted Quantity |
└ status | string | Optional | Order Status. One of: `NotReported`, `ReplacedNotReported`, `ProtectedNotReported`, `VarietiesNotReported`, `DelayedNotReported`, `FilledStatus`, `WaitToNew`, `NewStatus`, `WaitToReplace`, `PendingReplaceStatus`, `ReplacedStatus`, `PartialFilledStatus`, `WaitToCancel`, `PendingCancelStatus`, `RejectedStatus`, `CanceledStatus`, `ExpiredStatus`, `PartialWithdrawal`. |
└ msg | string | Optional | Rejected message or remark, default value is empty string. |
└ time | string | Required | Occurrence time |
charge_detail | object | Required | Order charges |
└ total_amount | string | Required | Total charges amount |
└ currency | string | Optional | Currency |
└ items | object[] | Required | Order charge details |
└ limit_depth_level | int32 | Required | Specifies the bid/ask depth level |
└ monitor_price | string | Optional | Monitoring price |
└ trigger_count | int32 | Required | Number of triggers |
└ attached_orders | object[] | Optional | List of attached order details |
multi_leg | object | Optional | Multi-leg strategy information. Only returned for multi-leg option combination orders; otherwise not returned. |
└ strategy | string | Optional | Multi-leg strategy **Enum Value:** `0` - CoveredCall (Covered stock) `1` - CoveredPut (Covered stock) `2` - VerticalCallSpread (Vertical spread) `3` - VerticalPutSpread (Vertical spread) `4` - Collar `5` - Straddle `6` - Strangle `7` - CalendarCallSpread (Calendar) `8` - CalendarPutSpread (Calendar) |
└ strategy_name | string | Optional | Strategy name |
└ multileg_id | string | Optional | Multi-leg combination ID |
└ code | string | Optional | Multi-leg combination code |
└ legs | object[] | Optional | Legs of the combination order |
Response JSON example
{
"code": 0,
"message": "success",
"data": {
"order_id": "828940451093708800",
"status": "FilledStatus",
"stock_name": "Apple",
"quantity": "10",
"executed_quantity": "10",
"price": "200.000",
"executed_price": "164.660",
"submitted_at": "1680863604",
"side": "Buy",
"symbol": "AAPL.US",
"order_type": "LO",
"last_done": "164.660",
"trigger_price": "0.0000",
"msg": "",
"tag": "Normal",
"time_in_force": "Day",
"expire_date": "2023-04-10",
"updated_at": "1681113000",
"trigger_at": "0",
"trailing_amount": "",
"trailing_percent": "",
"limit_offset": "",
"limit_depth_level": 0,
"monitor_price": "",
"trigger_count": 1,
"trigger_status": "NOT_USED",
"outside_rth": "ANY_TIME",
"currency": "USD",
"remark": "1680863603.927165",
"free_status": "None",
"free_amount": "",
"free_currency": "",
"deductions_status": "NONE",
"deductions_amount": "",
"deductions_currency": "",
"platform_deducted_status": "NONE",
"platform_deducted_amount": "",
"platform_deducted_currency": "",
"history": [
{
"price": "164.6600",
"quantity": "10",
"status": "FilledStatus",
"msg": "Execution of 10",
"time": "1681113000"
},
{
"price": "200.0000",
"quantity": "10",
"status": "NewStatus",
"msg": "",
"time": "1681113000"
}
],
"charge_detail": {
"items": [
{
"code": "BROKER_FEES",
"name": "Broker Fees",
"fees": []
},
{
"code": "THIRD_FEES",
"name": "Third-party Fees",
"fees": []
}
],
"total_amount": "0",
"currency": "USD"
},
"attached_orders": [
{
"order_id": "706388312699592705",
"attached_type_display": 2,
"trigger_price": "10.500",
"quantity": "200",
"executed_qty": "0",
"status": "NewStatus",
"updated_at": "1651644898",
"withdrawn": false,
"gtd": "",
"time_in_force": "Day",
"counter_id": "",
"trigger_status": 0,
"executed_amount": "0",
"tag": 0,
"submitted_at": "1651644897",
"executed_price": "0.000",
"force_only_rth": "RTH_ONLY",
"reviewed": false,
"activate_order_type": "MIT",
"activate_rth": "RTH_ONLY",
"submit_price": "",
"limit_depth_level": 0
}
],
"multi_leg": {
"strategy": "2",
"strategy_name": "Vertical spread",
"multileg_id": "Spread_QQQ20260731C764/767",
"code": "QQQ 260731 764/767 Vertical spread",
"legs": [
{
"symbol": "QQQ260731C764000.US",
"side": "Buy",
"position": "LONG",
"ratio_quantity": "1",
"strike_price": "764",
"expire_date": "20260731",
"contract_direction": "C"
},
{
"symbol": "QQQ260731C767000.US",
"side": "Sell",
"position": "SHORT",
"ratio_quantity": "1",
"strike_price": "767",
"expire_date": "20260731",
"contract_direction": "C"
}
]
}
}
}Error code
See the Error Codes page for the full list of error codes.