跳转到内容

网格订单列表

分页获取网格订单列表,可按市场、标的或状态筛选。

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是否还有更多页