跳轉到內容

網格訂單列表

分頁獲取網格訂單列表,可按市場、標的或狀態篩選。

CLI
# 列出全部網格訂單(默認)
longbridge grid
# 按標的和狀態篩選
longbridge grid --symbol 700.HK --status Performing

Request

HTTP MethodGET
HTTP URL/v1/gridtrading/list

Parameters

Content-Type: application/json; charset=utf-8

NameTypeRequiredDescription
pageint32NO頁碼,從 1 開始
limitint32NO每頁數量
marketstringNO市場篩選

可選值:
US / HK / CN / SG
symbolstringNO標的代碼,使用 ticker.region 格式,例如:700.HK
statusstringNO網格訂單狀態篩選,多個狀態用逗號連接,例如:Performing,Suspended
sort_bystringNO排序字段
sort_orderstringNO排序方向

Request Example

Response

Response Headers

  • Content-Type: application/json

Response Example

json
{
  "code": 0,
  "message": "success",
  "data": {
    "grid_order": [
      {
        "order_id": "764609681686573056",
        "symbol": "700.HK",
        "stock_name": "TENCENT",
        "market": "HK",
        "status": "Performing",
        "grid_status": "Performing",
        "submitted_base_price": "300.000",
        "current_base_price": "300.000",
        "pre_trigger_base_price": "300.000",
        "post_trigger_base_price": "306.000",
        "upper_limit_price": "360.000",
        "lower_limit_price": "240.000",
        "trigger_price_type": 2,
        "trigger_spread_up": "",
        "trigger_spread_down": "",
        "trigger_percent_up": "2",
        "trigger_percent_down": "2",
        "pullback_percent": "",
        "pullback_spread": "",
        "rebound_percent": "",
        "rebound_spread": "",
        "trigger_sell_order_type": "GMO",
        "trigger_buy_order_type": "GMO",
        "trigger_sell_depth": 0,
        "trigger_buy_depth": 0,
        "trigger_quantity": "100",
        "trigger_sell_quantity": "100",
        "trigger_buy_quantity": "100",
        "upper_limit_quantity": "200",
        "lower_limit_quantity": "100",
        "upper_limit_event": 1,
        "lower_limit_event": 1,
        "multiple_trigger": false,
        "trigger_times": 3,
        "total_buy_quantity": "300",
        "total_sell_quantity": "200",
        "total_profit_balance": "1250.00",
        "settlement_currency": "HKD",
        "time_in_force": 1,
        "gtd": "",
        "created_at": "2025-01-15T09:30:00+08:00",
        "rth": 0,
        "support_shortsell": false,
        "grid_order_type_up": "GMO",
        "grid_order_type_down": "GMO"
      }
    ],
    "has_more": false
  }
}

Response Status

StatusDescriptionSchema
200網格訂單列表返回成功。list_grid_orders_rsp
400請求被拒絕,請求參數錯誤。None

Schemas

list_grid_orders_rsp

NameTypeRequiredDescription
grid_orderobject[]false網格訂單
∟ order_idstringtrue網格訂單 ID
∟ symbolstringtrue標的代碼,使用 ticker.region 格式,例如:AAPL.US
∟ stock_namestringtrue標的名稱
∟ marketstringtrue市場
∟ statusstringtrue網格訂單狀態
∟ grid_statusstringtrue網格運行狀態
∟ submitted_base_pricestringtrue創建網格時提交的基準價
∟ current_base_pricestringtrue當前基準價
∟ pre_trigger_base_pricestringtrue上次觸發前的基準價
∟ post_trigger_base_pricestringtrue上次觸發後的基準價
∟ upper_limit_pricestringtrue價格上限
∟ lower_limit_pricestringtrue價格下限
∟ trigger_price_typeint32true觸發價類型

可選值:
1 - 價差
2 - 百分比
∟ trigger_spread_upstringtrue向上觸發價差
∟ trigger_spread_downstringtrue向下觸發價差
∟ trigger_percent_upstringtrue向上觸發百分比
∟ trigger_percent_downstringtrue向下觸發百分比
∟ pullback_percentstringtrue回撤百分比
∟ pullback_spreadstringtrue回撤價差
∟ rebound_percentstringtrue反彈百分比
∟ rebound_spreadstringtrue反彈價差
∟ trigger_sell_order_typestringtrue賣出方向訂單類型
∟ trigger_buy_order_typestringtrue買入方向訂單類型
∟ trigger_sell_depthint32true賣出方向盤口深度
∟ trigger_buy_depthint32true買入方向盤口深度
∟ trigger_quantitystringtrue每次觸發數量
∟ trigger_sell_quantitystringtrue賣出方向觸發數量
∟ trigger_buy_quantitystringtrue買入方向觸發數量
∟ upper_limit_quantitystringtrue觸及上限時處理的數量
∟ lower_limit_quantitystringtrue觸及下限時處理的數量
∟ upper_limit_eventint32true觸及上限時的處理動作

可選值:
1 - 忽略
2 - 以最新價平倉
∟ lower_limit_eventint32true觸及下限時的處理動作

可選值:
1 - 忽略
2 - 以最新價平倉
∟ multiple_triggerbooleantrue單個網格檔位是否可多次觸發
∟ trigger_timesint32true觸發次數
∟ total_buy_quantitystringtrue累計買入數量
∟ total_sell_quantitystringtrue累計賣出數量
∟ total_profit_balancestringtrue累計已實現收益
∟ settlement_currencystringtrue結算幣種
∟ time_in_forceint32true訂單有效期

可選值:
0 - 當日有效
1 - GTC(撤單前有效)
6 - GTD(指定日期前有效)
∟ gtdstringtrueGTD 到期日,格式:YYYY-MM-DD
∟ created_atstringtrue創建時間,RFC3339 格式
∟ rthint32true盤中交易時段標誌
∟ support_shortsellbooleantrue是否允許賣空
∟ grid_order_type_upstringtrue深度為 0 時使用的賣出方向訂單類型
∟ grid_order_type_downstringtrue深度為 0 時使用的買入方向訂單類型
has_morebooleantrue是否還有更多頁