# Today Orders

`GET` `/v1/trade/order/today`

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

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | No | Stock symbol, use `ticker.region` format, example: `AAPL.US` |
| `status` | array | No | Order 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` |
| `side` | string | No | Order side. **Enum Value:**, `Buy`, `Sell` |
| `market` | string | No | Market. **Enum Value:**, `US` - United States of America Market, `HK` - Hong Kong Market |
| `order_id` | string | No | Order ID, example: `701276261045858304` |
| `is_attached` | boolean | No | Whether `order_id` refers to an attached order, returns the attached order information if `true` |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/trade/order/today' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `orders` | object[] | No | Order Detail |
| `└ order_id` | string | No | Order ID |
| `└ status` | string | No | 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 | No | Stock Name |
| `└ quantity` | string | No | Submitted Quantity |
| `└ executed_quantity` | string | No | Executed Quantity. when the order is not filled, value is 0 |
| `└ price` | string | No | Submitted Price. when market condition order is not triggered, value is empty string |
| `└ executed_price` | string | No | Executed Price. when the order is not filled, value is 0 |
| `└ submitted_at` | string | No | Submitted Time |
| `└ side` | string | No | Order Side. **Enum Value:**, `Buy`, `Sell` |
| `└ symbol` | string | No | Stock symbol, use `ticker.region` format, example: `AAPL.US` |
| `└ order_type` | string | No | Order Type. One of: `LO`, `ELO`, `MO`, `AO`, `ALO`, `ODD`, `LIT`, `MIT`, `TSLPAMT`, `TSLPPCT`, `SLO`. |
| `└ trigger_price` | string | No | `LIT` / `MIT` Order Trigger Price. When the order is not `LIT` / `MIT` order, value is empty string |
| `└ tag` | string | No | Order tag. **Enum Value**, `Normal` - Normal Order, `Gtc` - Long term Order, `Grey` - Grey Order |
| `└ time_in_force` | string | No | Time in force Type. **Enum Value:**, `Day` - Day Order, `GTC` - Good Til Canceled Order, `GTD` - Good Til Date Order |
| `└ expire_date` | string | No | 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 | No | Last updated time, formatted as a timestamp (second) |
| `└ trigger_at` | string | No | Conditional order trigger time. formatted as a timestamp (second) |
| `└ trigger_status` | string | No | 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` |
| `└ outside_rth` | string | No | 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" |
| `└ currency` | string | No | Currency |
| `└ limit_depth_level` | integer | No | Specifies the bid/ask depth level |
| `└ trigger_count` | integer | No | Number of triggers |
| `└ trigger_qty_type` | integer | No | Trigger quantity type. |
| `└ attached_orders` | array | No | List of attached order details |
| `└ last_done` | string | No | Last done. when the order is not filled, value is empty string |
| `└ msg` | string | No | Rejected message or remark, default value is empty string. |
| `└ trailing_amount` | string | No | `TSLPAMT` order trailing amount. When the order is not `TSLPAMT` order, value is empty string |
| `└ trailing_percent` | string | No | `TSLPPCT` order trailing percent. When the order is not `TSLPPCT` order, value is empty string |
| `└ limit_offset` | string | No | `TSLPPCT` order limit offset amount. When the order is not `TSLPPCT` order, value is empty string |
| `└ remark` | string | No | Remark |
| `└ monitor_price` | string | No | Monitoring price |
| `└ monitor_counter_id` | string | No | Internal ID of the monitored security (conditional orders). |
| `└ multi_leg` | string | No | Multi-leg strategy information. Only returned for multi-leg option combination orders; otherwise not returned. |
| `has_more` | boolean | No | has 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

```json
{
  "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"
            }
          ]
        }
      }
    ]
  }
}
```
