Bitget APIBitget API
统一账户经典账户
旧文档
  • 概览
  • API 文档
  • WebSocket
  • Agent Hub
  • SDK
  • 更新日志
Copied to clipboard
Stock+
    期权行情
      查询期权实时报价get查询期权链get获取到期日列表get查询期权成交量get
    股票行情
      获取标的基本信息get获取标的K线get获取标的历史K线get获取标的盘口get获取标的当日分时数据get获取标的实时报价get获取标的逐笔明细get
    订单
      创建订单post修改订单post撤销订单post查询当日订单get查询历史订单get查询订单详情get查询当日成交get查询历史成交get
    成交
      查询占位信息get
    Stock+ 资产
      资金划转post获取划转记录get查询账户资金get查询资金流水get查询股票持仓get
Stock+
Stock+

订单

订单


创建订单

POST
https://api.bitget.com
/api/v3/stockplus/trade/place-order

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易读写权限

该接口用于委托下单。

创建订单 › Request Parameters

symbol
​string · required

股票代码,使用 ticker.region 格式,例如 AAPL.US

orderType
​string · required

订单类型 LO 限价单 MO 市价单 LIT 触价限价单 MIT 触价市价单 TSLPAMT 跟踪止损限价单(跟踪金额) TSLPPCT 跟踪止损限价单(跟踪涨跌幅)

side
​string · required

买卖方向 Buy - 买入 Sell - 卖出

submittedQuantity
​string · required

下单数量,例如 100

timeInForce
​string · required

订单有效期类型 Day - 当日有效 GoodTilCanceled - 撤单前有效 GoodTilDate - 到期前有效

submittedPrice
​string

下单价格,例如 388.5 LO / LIT 订单必填

triggerPrice
​string

触发价格,例如 388.5 LIT / MIT 订单必填

limitOffset
​string

指定价差,例如 1.2 表示价差 1.2 USD(如果是美股) TSLPAMT / TSLPPCT 订单在 limitDepthLevel 为 0 时必填

trailingAmount
​string

跟踪金额 TSLPAMT 订单必填

trailingPercent
​string

跟踪涨跌幅,单位为百分比,例如 2.5 表示 2.5% TSLPPCT 订单必填

expireDate
​string

长期单过期时间,格式为 YYYY-MM-DD,例如 2022-12-05 timeInForce 为 GoodTilDate 时必填

outsideRth
​string

是否允许盘前盘后,美股必填 RTHOnly - 不允许盘前盘后 AnyTime - 允许盘前盘后 Overnight - 夜盘

limitDepthLevel
​number

指定买卖档位,取值范围为 -5 ~ 0 ~ 5,负数代表买盘档位(如 -1 表示买一),正数代表卖盘档位(如 1 表示卖一),为 0 时 limitOffset 参数生效 TSLPAMT / TSLPPCT 订单有效

triggerCount
​number

触发次数,取值范围 0 ~ 3,表示在 1 分钟内触发多次才会触发订单 LIT / MIT / TSLPAMT / TSLPPCT 订单有效

monitorPrice
​string

监控价格,需要达到该价格才会开始监控,更新参考价 TSLPAMT / TSLPPCT 订单有效

remark
​string

备注(最大 64 字符)

创建订单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
orderId
​string

系统订单 ID

clientOid
​string

客户端自定义订单 ID,未传则返回空字符串

symbol
​string

期权合约代码

POST/api/v3/stockplus/trade/place-order
curl 'https://api.bitget.com/api/v3/stockplus/trade/place-order?symbol=<string>&orderType=<string>&side=<string>&submittedQuantity=<string>&timeInForce=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "orderId": "701276261045858304", "clientOid": "myOrder001", "symbol": "AAPL220429C150000.US" } }
json
application/json

修改订单

POST
https://api.bitget.com
/api/v3/stockplus/trade/modify-order

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易读写权限

该接口用于修改未成交或部分成交订单的价格/数量,语义为撤单重下(cancel & replace)。

修改订单 › Request Parameters

orderId
​string · required

订单 ID

quantity
​string · required

改单数量,例如 200

price
​string

改单价格,例如 388.5 LO / LIT 订单必填

triggerPrice
​string

触发价格,例如 388.5 LIT / MIT 订单必填

limitOffset
​string

指定价差 TSLPAMT / TSLPPCT 订单在 limitDepthLevel 为 0 时必填

trailingAmount
​string

跟踪金额 TSLPAMT 订单必填

trailingPercent
​string

跟踪涨跌幅 TSLPPCT 订单必填

limitDepthLevel
​number

指定买卖档位。TSLPAMT / TSLPPCT 订单必填

triggerCount
​number

触发次数。LIT / MIT / TSLPAMT / TSLPPCT 订单必填

monitorPrice
​string

监控价格。TSLPAMT / TSLPPCT 订单必填

remark
​string

备注(最大 64 字符)

修改订单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
orderId
​string

修改后的系统订单 ID

clientOid
​string

客户端自定义订单 ID,未传则返回空字符串

symbol
​string

期权合约代码

POST/api/v3/stockplus/trade/modify-order
curl 'https://api.bitget.com/api/v3/stockplus/trade/modify-order?orderId=<string>&quantity=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "orderId": "701276261045858304", "clientOid": "", "symbol": "AAPL220429C150000.US" } }
json
application/json

撤销订单

POST
https://api.bitget.com
/api/v3/stockplus/trade/cancel-order

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易读写权限

该接口用于撤销未成交或部分成交的订单。

撤销订单 › Request Parameters

symbol
​string · required

期权合约代码

orderId
​string

系统订单 ID。与 clientOid 至少传其一;同时传入时 orderId 优先

clientOid
​string

客户端自定义订单 ID。与 orderId 至少传其一

撤销订单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
orderId
​string

系统订单 ID

clientOid
​string

客户端自定义订单 ID,未传则返回空字符串

symbol
​string

期权合约代码

POST/api/v3/stockplus/trade/cancel-order
curl 'https://api.bitget.com/api/v3/stockplus/trade/cancel-order?symbol=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "orderId": "701276261045858304", "clientOid": "", "symbol": "AAPL220429C150000.US" } }
json
application/json

查询当日订单

GET
https://api.bitget.com
/api/v3/stockplus/trade/today-orders

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易只读权限

该接口用于获取当日订单和订单查询。

查询当日订单 › Request Parameters

symbol
​string

股票代码,使用 ticker.region 格式,例如 AAPL.US

status
​string

订单状态,例如 status=Filled&status=New NotReported - 待报 ReplacedNotReported - 已修改待报 ProtectedNotReported - 已保护待报 VarietiesNotReported - 品种待报 Filled - 全部成交 WaitToNew - 等待新单 New - 已报 WaitToReplace - 等待修改 PendingReplace - 修改中 Replaced - 已修改 PartialFilled - 部分成交 WaitToCancel - 等待撤销 PendingCancel - 撤销中 Rejected - 已拒绝 Canceled - 已撤销 Expired - 已过期 PartialWithdrawal - 部分撤单

side
​string

买卖方向 Buy - 买入 Sell - 卖出

market
​string

市场 US - 美股

orderId
​string

订单 ID,用于查询特定订单,例如 701276261045858304

查询当日订单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
​object[]

订单信息

GET/api/v3/stockplus/trade/today-orders
curl https://api.bitget.com/api/v3/stockplus/trade/today-orders
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "orders": [ { "orderId": "701276261045858304", "status": "Rejected", "stockName": "Apple Inc.", "quantity": 1, "executedQuantity": 0, "price": 150, "executedPrice": null, "submittedAt": "2024-12-16T12:07:12Z", "side": "Buy", "symbol": "AAPL.US", "orderType": "LO", "lastDone": null, "triggerPrice": null, "msg": "", "tag": "Normal", "timeInForce": "Day", "expireDate": "2024-12-16", "updatedAt": "2024-12-16T12:07:12Z", "triggerAt": null, "trailingAmount": null, "trailingPercent": null, "limitOffset": null, "triggerStatus": null, "currency": "USD", "outsideRth": "RTHOnly", "limitDepthLevel": null, "triggerCount": null, "monitorPrice": null } ] } }
json
application/json

查询历史订单

GET
https://api.bitget.com
/api/v3/stockplus/trade/history-orders

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易只读权限

该接口用于获取历史订单。

查询历史订单 › Request Parameters

symbol
​string

股票代码,使用 ticker.region 格式,例如 AAPL.US

status
​string

订单状态,例如 status=Filled&status=New NotReported - 待报 ReplacedNotReported - 已修改待报 ProtectedNotReported - 已保护待报 VarietiesNotReported - 品种待报 Filled - 全部成交 WaitToNew - 等待新单 New - 已报 WaitToReplace - 等待修改 PendingReplace - 修改中 Replaced - 已修改 PartialFilled - 部分成交 WaitToCancel - 等待撤销 PendingCancel - 撤销中 Rejected - 已拒绝 Canceled - 已撤销 Expired - 已过期 PartialWithdrawal - 部分撤单

side
​string

买卖方向。Buy - 买入,Sell - 卖出

market
​string

市场。US - 美股

startAt
​number

开始时间,单位为秒级时间戳,例如 1650410999。默认为结束时间或当前时间前 90 天

endAt
​number

结束时间,单位为秒级时间戳,例如 1650410999。默认为开始时间或当前时间后 90 天

查询历史订单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
hasMore
​boolean

是否有更多数据。每次最多返回 1000 条订单;超过 1000 条时 hasMore 为 true

​object[]

订单信息

GET/api/v3/stockplus/trade/history-orders
curl https://api.bitget.com/api/v3/stockplus/trade/history-orders
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "hasMore": false, "orders": [ { "orderId": "701276261045858304", "status": "Canceled", "stockName": "Apple Inc.", "quantity": 1, "executedQuantity": 0, "price": 150, "executedPrice": null, "submittedAt": "2024-12-16T12:07:12Z", "side": "Buy", "symbol": "AAPL.US", "orderType": "LO", "lastDone": null, "triggerPrice": null, "msg": "", "tag": "Normal", "timeInForce": "Day", "expireDate": "2024-12-16", "updatedAt": "2024-12-16T12:07:23Z", "triggerAt": null, "trailingAmount": null, "trailingPercent": null, "limitOffset": null, "triggerStatus": null, "currency": "USD", "outsideRth": "RTHOnly", "limitDepthLevel": null, "triggerCount": null, "monitorPrice": null }, { "orderId": "701276261045858305", "status": "Filled", "stockName": "Apple Inc.", "quantity": 1, "executedQuantity": 1, "price": 80, "executedPrice": 10, "submittedAt": "2024-12-16T10:00:00Z", "side": "Buy", "symbol": "AAPL.US", "orderType": "LO", "lastDone": null, "triggerPrice": null, "msg": "", "tag": "Normal", "timeInForce": "Day", "expireDate": "2024-12-16", "updatedAt": "2024-12-16T10:00:01Z", "triggerAt": null, "trailingAmount": null, "trailingPercent": null, "limitOffset": null, "triggerStatus": null, "currency": "USD", "outsideRth": "AnyTime", "limitDepthLevel": null, "triggerCount": null, "monitorPrice": null } ] } }
json
application/json

查询订单详情

GET
https://api.bitget.com
/api/v3/stockplus/trade/order-detail

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易只读权限

该接口用于订单详情查询。

查询订单详情 › Request Parameters

orderId
​string · required

订单 ID,例如 701276261045858304

查询订单详情 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
orderId
​string

订单 ID

status
​string

订单状态 NotReported - 待报 ReplacedNotReported - 已修改待报 ProtectedNotReported - 已保护待报 VarietiesNotReported - 品种待报 Filled - 全部成交 WaitToNew - 等待新单 New - 已报 WaitToReplace - 等待修改 PendingReplace - 修改中 Replaced - 已修改 PartialFilled - 部分成交 WaitToCancel - 等待撤销 PendingCancel - 撤销中 Rejected - 已拒绝 Canceled - 已撤销 Expired - 已过期 PartialWithdrawal - 部分撤单

stockName
​string

股票名称

quantity
​string

委托数量

executedQuantity
​string

成交数量。未成交的订单为 "0"

price
​string

委托价格。市价条件单未触发时为 null

executedPrice
​string

成交价格。未成交的订单为 null

submittedAt
​string

订单提交时间

side
​string

买卖方向。Buy - 买入,Sell - 卖出

symbol
​string

股票代码,使用 ticker.region 格式,例如 AAPL.US

orderType
​string

订单类型 LO 限价单 MO 市价单 LIT 触价限价单 MIT 触价市价单 TSLPAMT 跟踪止损限价单(跟踪金额) TSLPPCT 跟踪止损限价单(跟踪涨跌幅)

lastDone
​string

最新成交价。未成交的订单为 null

triggerPrice
​string

LIT/MIT 订单触发价格。非条件单为 null

msg
​string

拒绝原因或备注。默认空字符串

tag
​string

订单标签 Normal - 普通订单 GTC - GTC 订单

timeInForce
​string

订单有效期类型 Day - 当日有效 GoodTilCanceled - 撤单前有效 GoodTilDate - 到期前有效

expireDate
​string

长期单过期时间,格式为 YYYY-MM-DD。非 GTD 订单为空

updatedAt
​string

最后更新时间(ISO 8601)。未更新时为 null

triggerAt
​string

条件单触发时间,单位为(ISO 8601)

trailingAmount
​string

TSLPAMT 订单跟踪金额。非 TSLPAMT 订单为 null

trailingPercent
​string

TSLPPCT 订单跟踪涨跌幅。非 TSLPPCT 订单为 null

limitOffset
​string

TSLPAMT/TSLPPCT 订单价差。非 TSLP 订单为 null

triggerStatus
​string

条件单触发状态。非条件单为 null NOT_USED - 未启用 DEACTIVE - 已失效 ACTIVE - 生效中 RELEASED - 已触发

currency
​string

结算货币

outsideRth
​string

是否允许盘前盘后交易。非美股订单为 UnknownOutsideRth RTHOnly - 不允许盘前盘后 AnyTime - 允许盘前盘后 Overnight - 夜盘

remark
​string

备注

limitDepthLevel
​number

指定买卖档位

triggerCount
​number

触发次数

monitorPrice
​string

监控价格

freeStatus
​string

免佣状态。默认 None None - 无 Calculated - 待计算 Pending - 待发放 Ready - 已发放

freeAmount
​string

免佣金额。默认 null

freeCurrency
​string

免佣币种。默认 null

deductionsStatus
​string

扣款/返佣状态。默认 None None - 待结算/无数据 Pending - 已结算,待发放 Done - 已结算,已发放

deductionsAmount
​string

扣款金额。默认 null

deductionsCurrency
​string

扣款币种。默认 null

platformDeductedStatus
​string

平台费扣款/返佣状态。默认 None None - 待结算/无数据 Pending - 已结算,待发放 Done - 已结算,已发放

platformDeductedAmount
​string

平台费扣款金额。默认 null

platformDeductedCurrency
​string

平台费扣款币种。默认 null

​object[]

订单历史详情

​object

订单费用

GET/api/v3/stockplus/trade/order-detail
curl 'https://api.bitget.com/api/v3/stockplus/trade/order-detail?orderId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "orderId": "701276261045858304", "status": "Filled", "stockName": "Apple Inc.", "quantity": 1, "executedQuantity": 0, "price": 150, "executedPrice": null, "submittedAt": "2024-12-16T12:07:12Z", "side": "Buy", "symbol": "AAPL.US", "orderType": "LO", "lastDone": null, "triggerPrice": null, "msg": "", "tag": "Normal", "timeInForce": "Day", "expireDate": "2024-12-16", "updatedAt": null, "triggerAt": null, "trailingAmount": null, "trailingPercent": null, "limitOffset": null, "triggerStatus": null, "currency": "USD", "outsideRth": "RTHOnly", "remark": "remark from Java SDK", "limitDepthLevel": null, "triggerCount": null, "monitorPrice": null, "freeStatus": "None", "freeAmount": null, "freeCurrency": null, "deductionsStatus": "None", "deductionsAmount": null, "deductionsCurrency": null, "platformDeductedStatus": "None", "platformDeductedAmount": null, "platformDeductedCurrency": null, "history": [ { "price": 10, "quantity": 1, "status": "Filled", "msg": "", "time": "2024-12-16T12:07:12Z" }, { "price": 80, "quantity": 1, "status": "New", "msg": "", "time": "2024-12-16T12:06:55Z" } ], "chargeDetail": { "totalAmount": 0, "currency": "USD", "items": [ { "code": "Broker", "name": "Broker Fees", "fees": [] }, { "code": "Third", "name": "Third-party Fees", "fees": [] } ] } } }
json
application/json

查询当日成交

GET
https://api.bitget.com
/api/v3/stockplus/trade/today-executions

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易只读权限

该接口用于获取当日订单的成交明细。

查询当日成交 › Request Parameters

symbol
​string

股票代码,使用 ticker.region 格式,例如 AAPL.US

orderId
​string

订单 ID,用于指定订单 ID 查询,例如 701276261045858304

查询当日成交 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
​object[]

成交明细信息

GET/api/v3/stockplus/trade/today-executions
curl https://api.bitget.com/api/v3/stockplus/trade/today-executions
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "trades": [ { "orderId": "701276261045858304", "tradeId": "0f40217c-a73c-410d-b599-2ff6a9ee762e", "symbol": "AAPL.US", "tradeDoneAt": "2024-12-16T12:07:12Z", "quantity": 1, "price": 150 } ] } }
json
application/json

查询历史成交

GET
https://api.bitget.com
/api/v3/stockplus/trade/history-executions

限频规则: 30秒内累计不超过30次调用,且每两次调用之间间隔不小于0.02秒

权限: 统一账户交易只读权限

该接口用于获取历史订单的成交明细,包括买入和卖出的成交记录,不支持当日成交明细查询。

查询历史成交 › Request Parameters

symbol
​string

股票代码,使用 ticker.region 格式,例如 AAPL.US

startAt
​number

开始时间,格式为时间戳(秒),例如 1650410999。默认取结束时间或当前时间的前 90 天

endAt
​number

结束时间,格式为时间戳(秒),例如 1650410999。默认取开始时间或当前时间的后 90 天

查询历史成交 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
hasMore
​boolean

是否存在更多数据。单次查询最大 1000 笔成交记录,超出时 hasMore 为 true

​object[]

成交明细信息

GET/api/v3/stockplus/trade/history-executions
curl https://api.bitget.com/api/v3/stockplus/trade/history-executions
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "hasMore": false, "trades": [ { "orderId": "701276261045858304", "tradeId": "0f40217c-a73c-410d-b599-2ff6a9ee762e", "symbol": "AAPL.US", "tradeDoneAt": "2024-12-16T12:07:12Z", "quantity": 1, "price": 150 } ] } }
json
application/json

股票行情成交