Trade

Today Orders

GEThttps://openapi.longbridge.com/v1/trade/order/today

Authorization

Signed mode: every request is signed with your App Key/Secret. Header set:

NameTypeRequiredDescription
Authorizationstring · headerRequiredThe account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation.
X-Api-Keystring · headerRequiredYour App Key.
X-Timestampstring · headerRequiredRequest timestamp in seconds (Unix epoch).
X-Api-Signaturestring · headerRequiredHMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=.

This API is used to get today order or get order by order id.

>_ CLI
longbridge order

Request

Query parameters

NameTypeRequiredDescription
symbolstringOptionalStock symbol, use `ticker.region` format, example: `AAPL.US`
statusarrayOptionalOrder status. One of: `NotReported`, `ReplacedNotReported`, `ProtectedNotReported`, `VarietiesNotReported`, `DelayedNotReported`, `FilledStatus`, `WaitToNew`, `NewStatus`, `WaitToReplace`, `PendingReplaceStatus`, `ReplacedStatus`, `PartialFilledStatus`, `WaitToCancel`, `PendingCancelStatus`, `RejectedStatus`, `CanceledStatus`, `ExpiredStatus`, `PartialWithdrawal`. example: `status=FilledStatus&status=NewStatus`
sidestringOptionalOrder side. **Enum Value:**, `Buy`, `Sell`
marketstringOptionalMarket. **Enum Value:**, `US` - United States of America Market, `HK` - Hong Kong Market
order_idstringOptionalOrder ID, example: `701276261045858304`
is_attachedbooleanOptionalWhether `order_id` refers to an attached order, returns the attached order information if `true`

Response

Response properties

NameTypeRequiredDescription
ordersobject[]OptionalOrder Detail
└ order_idstringOptionalOrder ID
└ statusstringOptionalOrder Status. One of: `NotReported`, `ReplacedNotReported`, `ProtectedNotReported`, `VarietiesNotReported`, `DelayedNotReported`, `FilledStatus`, `WaitToNew`, `NewStatus`, `WaitToReplace`, `PendingReplaceStatus`, `ReplacedStatus`, `PartialFilledStatus`, `WaitToCancel`, `PendingCancelStatus`, `RejectedStatus`, `CanceledStatus`, `ExpiredStatus`, `PartialWithdrawal`.
└ stock_namestringOptionalStock Name
└ quantitystringOptionalSubmitted Quantity
└ executed_quantitystringOptionalExecuted Quantity. when the order is not filled, value is 0
└ pricestringOptionalSubmitted Price. when market condition order is not triggered, value is empty string
└ executed_pricestringOptionalExecuted Price. when the order is not filled, value is 0
└ submitted_atstringOptionalSubmitted Time
└ sidestringOptionalOrder Side. **Enum Value:**, `Buy`, `Sell`
└ symbolstringOptionalStock symbol, use `ticker.region` format, example: `AAPL.US`
└ order_typestringOptionalOrder Type. One of: `LO`, `ELO`, `MO`, `AO`, `ALO`, `ODD`, `LIT`, `MIT`, `TSLPAMT`, `TSLPPCT`, `SLO`.
└ trigger_pricestringOptional`LIT` / `MIT` Order Trigger Price. When the order is not `LIT` / `MIT` order, value is empty string
└ tagstringOptionalOrder tag. **Enum Value**, `Normal` - Normal Order, `Gtc` - Long term Order, `Grey` - Grey Order
└ time_in_forcestringOptionalTime in force Type. **Enum Value:**, `Day` - Day Order, `GTC` - Good Til Canceled Order, `GTD` - Good Til Date Order
└ expire_datestringOptionalLong term order expire date, format: `YYYY-MM-DD`, example: `2022-12-05`. When not a long term order, default value is empty string
└ updated_atstringOptionalLast updated time, formatted as a timestamp (second)
└ trigger_atstringOptionalConditional order trigger time. formatted as a timestamp (second)
└ trigger_statusstringOptionalConditional 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`
└ outside_rthstringOptionalEnable 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"
└ currencystringOptionalCurrency
└ limit_depth_levelintegerOptionalSpecifies the bid/ask depth level
└ trigger_countintegerOptionalNumber of triggers
└ trigger_qty_typeintegerOptionalTrigger quantity type.
└ attached_ordersarrayOptionalList of attached order details
└ last_donestringOptionalLast done. when the order is not filled, value is empty string
└ msgstringOptionalRejected message or remark, default value is empty string.
└ trailing_amountstringOptional`TSLPAMT` order trailing amount. When the order is not `TSLPAMT` order, value is empty string
└ trailing_percentstringOptional`TSLPPCT` order trailing percent. When the order is not `TSLPPCT` order, value is empty string
└ limit_offsetstringOptional`TSLPPCT` order limit offset amount. When the order is not `TSLPPCT` order, value is empty string
└ remarkstringOptionalRemark
└ monitor_pricestringOptionalMonitoring price
└ monitor_counter_idstringOptionalInternal ID of the monitored security (conditional orders).
└ multi_legstringOptionalMulti-leg strategy information. Only returned for multi-leg option combination orders; otherwise not returned.
has_morebooleanOptionalhas more orders record. The maximum number of orders per query is 1000, if the number of results exceeds 1000, then has_more will be true

Response JSON example

{
  "code": 0,
  "message": "success",
  "data": {
    "orders": [
      {
        "currency": "HKD",
        "executed_price": "0.000",
        "executed_quantity": "0",
        "expire_date": "",
        "last_done": "",
        "limit_offset": "",
        "msg": "",
        "order_id": "706388312699592704",
        "order_type": "ELO",
        "outside_rth": "UnknownOutsideRth",
        "price": "11.900",
        "quantity": "200",
        "side": "Buy",
        "status": "RejectedStatus",
        "stock_name": "Bank of East Asia Ltd/The",
        "submitted_at": "1651644897",
        "symbol": "23.HK",
        "tag": "Normal",
        "time_in_force": "Day",
        "trailing_amount": "",
        "trailing_percent": "",
        "trigger_at": "0",
        "trigger_price": "",
        "trigger_status": "NOT_USED",
        "updated_at": "1651644898",
        "remark": "",
        "limit_depth_level": 0,
        "monitor_price": "",
        "trigger_count": 1,
        "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": ""
          }
        ],
        "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.