Longbridge Developers
立即开始

交易命名词典

OrderType

  • 说明:港股支持订单类型
枚举值描述
LO限价单
ELO增强限价单
MO市价单
AO竞价市价单
ALO竞价限价单
ODD碎股单挂单
LIT触价限价单
MIT触价市价单
TSLPAMT跟踪止损限价单 (跟踪金额)
TSLPPCT跟踪止损限价单 (跟踪涨跌幅)
SLO特殊限价单,不支持改单
  • 说明:美股支持订单类型
枚举值描述
LO限价单
MO市价单
LIT触价限价单
MIT触价市价单
TSLPAMT跟踪止损限价单 (跟踪金额)
TSLPPCT跟踪止损限价单 (跟踪涨跌幅)

OrderStatus

  • 说明:订单状态
枚举值描述
NotReported待提交
ReplacedNotReported待提交 (改单成功)
ProtectedNotReported待提交 (保价订单)
VarietiesNotReported待提交 (条件单)
FilledStatus已成交
WaitToNew已提待报
NewStatus已委托
WaitToReplace修改待报
PendingReplaceStatus待修改
ReplacedStatus已修改
PartialFilledStatus部分成交
WaitToCancel撤销待报
PendingCancelStatus待撤回
RejectedStatus已拒绝
CanceledStatus已撤单
ExpiredStatus已过期
PartialWithdrawal部分撤单

Market

  • 说明:市场
枚举值描述
HK港股
US美股

WebSocket 推送通知

  • WebSocket 推送通知字段说明
字段名类型注释
sidestring买卖方向

可选值
Buy - 买入
Sell - 卖出
stock_namestring公司名称
submitted_quantitystring委托数量
symbolstring订单标的
order_typestring订单类型
submitted_pricestring委托价格
executed_quantitystring成交数量
executed_pricestring成交价格
order_idstring订单 id
currencystring结算货币
statusstring订单状态
submitted_atstring下单时间,格式为时间戳 (秒)
updated_atstring最近更新时间
trigger_pricestring触发价格
msgstring拒绝理由,备注信息
tagstring订单标记

可选值
Normal - 普通订单
GTC - 长期单
Grey - 暗盘单
trigger_statusstring条件单触发状态

可选值
NOT_USED - 未激活
DEACTIVE - 已失效
ACTIVE - 已激活
RELEASED - 已触发
trigger_atstring触发时间
trailing_amountstring条件单跟踪金额
trailing_percentstring条件单跟踪涨跌幅
limit_offsetstring指定价差
account_nostring用户端账号
remarkstring备注
last_sharestring最新成交数量
last_pricestring最新成交价格
multi_legobject多腿策略信息,仅多腿期权组合订单推送
∟ strategystring多腿策略

可选值
0 - CoveredCall(股票担保)
1 - CoveredPut(股票担保)
2 - VerticalCallSpread(垂直策略)
3 - VerticalPutSpread(垂直策略)
4 - Collar(领式策略)
5 - Straddle(跨式策略)
6 - Strangle(宽跨式策略)
∟ strategy_namestring策略名称
∟ multileg_idstring多腿组合 ID
∟ codestring多腿组合代码
∟ legsobject[]组合订单的各腿
∟∟ symbolstring期权 symbol,使用 ticker.region 格式
∟∟ sidestring买卖方向

可选值
Buy
Sell
∟∟ positionstring持仓方向

可选值
LONG
SHORT
∟∟ ratio_quantitystring该腿比例数量
∟∟ strike_pricestring行权价
∟∟ expire_datestring期权到期日,格式:YYYYMMDD
∟∟ contract_directionstring合约类型

可选值
C - 看涨(Call)
P - 看跌(Put)

示例

{
	"event": "order_changed_lb",
	"data": {
		"side": "Buy",
		"stock_name": "腾讯控股",
		"submitted_quantity": "1000",
		"symbol": "700.HK",
		"order_type": "LO",
		"submitted_price": "213.2",
		"executed_quantity": "1000",
		"executed_price": "213.2",
		"order_id": "27",
		"currency": "HKD",
		"status": "NewStatus",
		"submitted_at": "1562761893",
		"updated_at": "1562761893",
		"trigger_price": "213.0",
		"msg": "Insufficient Qty - 1000",
		"tag": "GTC",
		"trigger_status": "ACTIVE",
		"trigger_at": "1562761893",
		"trailing_amount": "5",
		"trailing_percent": "1",
		"limit_offset": "0.01",
		"account_no": "HK123445",
		"last_share": "100",
		"last_price": "234",
		"remark": "abc",
		"multi_leg": {
			"strategy": "2",
			"strategy_name": "垂直策略",
			"multileg_id": "Spread_QQQ20260731C764/767",
			"code": "QQQ 260731 764/767 垂直策略",
			"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"
				}
			]
		}
	}
}