Bitget APIBitget API
统一账户经典账户
旧文档
  • 概览
  • API 文档
  • WebSocket
  • Agent Hub
  • SDK
  • 更新日志
Copied to clipboard
跟单
    合约带单(公域&私域)
      获取仓位汇总get获取带单币对信息get带单账户最大可转出get带单账户划转post查询带单账户划转记录get获取当前跟随者get获取历史跟随者get获取分润汇总get获取分润详情get获取项目总览get
    合约跟单(公域)
      创建跟单post调整跟单设置post取消跟单post查询跟单设置get跟单账户划转post查询跟单账户划转记录get获取当前跟单信息get获取分润记录get手动平仓post一键平仓post获取当前仓位get设置止盈止损post修改止盈止损post撤销止盈止损post获取当前止盈止损单get获取历史止盈止损单get
跟单
跟单

合约跟单(公域)

合约跟单(公域)


创建跟单

POST
https://api.bitget.com
/api/v3/copy/futures/follower-settings

限频规则: 1次/秒/UID

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

为带单项目创建跟单订阅。

创建跟单 › Request Parameters

projectId
​string · required

项目ID

type
​string · required

跟单类型

fixed_ratio 固定比例:每笔订单将根据交易专家的下单保证金与其账户净值的比例进行等比例下单。

fixed_margin 固定保证金:每笔订单均使用固定保证金开仓。

amount
​string · required

跟单金额,单位USDT,最小值为50。

accountType
​string

自动划转的账户类型,多个账户类型用英文逗号,分隔。

funding 资金账户

uta 统一账户

otc OTC账户

如不选,默认选择全部账户。

扣款顺序:资金账户 → OTC账户 → 统一账户。

tradingPairList
​string

跟单币对列表。如不传,则默认跟随全部币对。如果交易专家交易的币对超出您选择的范围,系统将不会为您执行任何交易。

marginPerOrder
​string

每笔保证金,单位USDT。type=fixed_margin时必填。

autoCopy
​string

自动跟随新带单币对。

on 自动跟随(默认)

off 不自动跟随

leverage
​string

杠杆倍数。如不填,则默认跟随带单专家的杠杆倍数。范围为[1, 10]。

maxEntrySlippage
​string

最大开仓滑点。如不填,则为系统默认值。范围为[0.1, 3],0.1代表0.1%。

maxMarginRatio
​string

单笔最大保证金比例,范围为[5, 95],5代表5%。当合约单笔开仓保证金占总资产比例达到设置值时,系统会以最大比例计算的开仓保证金下单。

maxPostionValue
​string

最大持仓价值,单位USDT,默认值和最大值均为2000000。当持有的全部仓位价值超过设置值时,系统将不再进行跟单开仓。

创建跟单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/follower-settings
curl 'https://api.bitget.com/api/v3/copy/futures/follower-settings?projectId=<string>&type=<string>&amount=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

调整跟单设置

POST
https://api.bitget.com
/api/v3/copy/futures/modify-follower-settings

限频规则: 1次/秒/UID

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

调整已有跟单订阅的设置。

调整跟单设置 › Request Parameters

projectId
​string · required

项目ID

tradingPairList
​string

跟单币对列表。如传all,则代表全部币对。

marginPerOrder
​string

每笔保证金,单位USDT。

autoCopy
​string

自动跟随新带单币对。

on 自动跟随

off 不自动跟随

leverage
​string

杠杆倍数,范围为[1, 10]。在无仓位情况下可修改该字段。

maxEntrySlippage
​string

最大开仓滑点,范围为[0.1, 3],0.1代表0.1%。

maxMarginRatio
​string

单笔最大保证金比例,范围为[5, 95]。

maxPostionValue
​string

最大持仓价值,单位USDT,最大值为2000000。

调整跟单设置 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/modify-follower-settings
curl 'https://api.bitget.com/api/v3/copy/futures/modify-follower-settings?projectId=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

取消跟单

POST
https://api.bitget.com
/api/v3/copy/futures/unfollow

限频规则: 1次/秒/UID

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

取消跟单订阅。

取消跟单 › Request Parameters

projectId
​string · required

项目ID

closeType
​string

取消跟单时的平仓类型。

follow_close 跟随交易专家平仓

instant_close 立即平仓

取消跟单 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/unfollow
curl 'https://api.bitget.com/api/v3/copy/futures/unfollow?projectId=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

查询跟单设置

GET
https://api.bitget.com
/api/v3/copy/futures/copy-settings

限频规则: 5次/秒/UID

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

查询跟单设置。

查询跟单设置 › Request Parameters

projectId
​string · required

项目ID

查询跟单设置 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
type
​string

跟单类型

fixed_ratio 固定比例

fixed_margin 固定保证金

amount
​string

跟单金额

tradingPairList
​string[]

跟单币对列表

marginPerOrder
​string

每笔保证金

autoCopy
​string

自动跟随设置

on 自动跟随

off 不自动跟随

leverage
​string

杠杆倍数。跟随带单专家的杠杆倍数时,该字段返回空。

maxEntrySlippage
​string

最大开仓滑点,百分比数值返回,如1代表1%。

maxMarginRatio
​string

单笔最大保证金比例,百分比数值返回,如90代表90%。

maxPostionValue
​string

最大持仓价值

GET/api/v3/copy/futures/copy-settings
curl 'https://api.bitget.com/api/v3/copy/futures/copy-settings?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "type": "fixed_ratio", "amount": "1000.00", "tradingPairList": [ "BTCUSDT", "ETHUSDT" ], "marginPerOrder": "", "autoCopy": "on", "leverage": "", "maxEntrySlippage": "1", "maxMarginRatio": "90", "maxPostionValue": "2000000" } }
json
application/json

跟单账户划转

POST
https://api.bitget.com
/api/v3/copy/futures/copy-transfer

限频规则: 1次/秒/UID

权限: 统一账户 — 管理 — 读写

向跟单账户转入或转出资金。

跟单账户划转 › Request Parameters

projectId
​string · required

项目ID

type
​string · required

划转类型

in 转入

out 转出,仅支持转出至现货/资金账户

coin
​string · required

划转币种

amount
​string · required

划转数量

inAccountType
​string

转入账户类型,多个账户类型用英文逗号分隔。

funding 资金账户

uta 统一账户

otc OTC账户

如不选,默认选择全部账户。扣款顺序:资金账户 → OTC账户 → 统一账户。

跟单账户划转 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/copy-transfer
curl 'https://api.bitget.com/api/v3/copy/futures/copy-transfer?projectId=<string>&type=<string>&coin=<string>&amount=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

查询跟单账户划转记录

GET
https://api.bitget.com
/api/v3/copy/futures/copy-transfer-record

限频规则: 1次/秒/UID

权限: 统一账户 — 管理 — 只读

查询跟单账户的划转历史记录。

查询跟单账户划转记录 › Request Parameters

projectId
​string · required

项目ID

limit
​string

查询条数,默认20,最大100。

cursor
​string

游标ID。传上次调用返回的transferId进行翻页。

查询跟单账户划转记录 › Response Parameters

200

Successful response

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

划转记录

nextCursor
​string

下一页游标ID

GET/api/v3/copy/futures/copy-transfer-record
curl 'https://api.bitget.com/api/v3/copy/futures/copy-transfer-record?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "list": [ { "fromType": "funding", "toType": "copy", "amount": "500.00", "coin": "USDT", "status": "successful", "createdTime": "1740000000000" } ], "nextCursor": "1234567890" } }
json
application/json

获取当前跟单信息

GET
https://api.bitget.com
/api/v3/copy/futures/current-copy

限频规则: 10次/秒/UID

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

获取当前跟单信息。

获取当前跟单信息 › Request Parameters

projectId
​string · required

项目ID

获取当前跟单信息 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
eliteTrader
​string

交易专家名称

estNetProfit
​string

预计净利润,单位USDT

profitShare
​string

分润金额,单位USDT

estValue
​string

资产估值,单位USDT,包含未实现盈亏

available
​string

可用余额,单位USDT

currentInvestment
​string

累计投资额,单位USDT

GET/api/v3/copy/futures/current-copy
curl 'https://api.bitget.com/api/v3/copy/futures/current-copy?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "eliteTrader": "TraderAlpha", "estNetProfit": "200.00", "profitShare": "20.00", "estValue": "1200.00", "available": "500.00", "currentInvestment": "1000.00" } }
json
application/json

获取分润记录

GET
https://api.bitget.com
/api/v3/copy/futures/copy-profit-details

限频规则: 1次/秒/UID

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

获取跟单账户的分润详情记录。

获取分润记录 › Request Parameters

projectId
​string · required

项目ID

startTime
​string

开始时间戳(Unix毫秒,如1597026383085)

endTime
​string

结束时间戳(Unix毫秒,如1597026383085)

limit
​string

查询条数,默认20,最大100。

cursor
​string

游标ID,传上次调用返回的cursor进行翻页。

获取分润记录 › Response Parameters

200

Successful response

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

分润记录

nextCursor
​string

下一页游标ID

GET/api/v3/copy/futures/copy-profit-details
curl 'https://api.bitget.com/api/v3/copy/futures/copy-profit-details?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "list": [ { "settleTime": "1740000000000", "profit": "100.00", "allocatedPnl": "80.00", "pendingPnl": "20.00", "shareRatio": "0.1", "shareProfit": "10.00" } ], "nextCursor": "1234567890" } }
json
application/json

手动平仓

POST
https://api.bitget.com
/api/v3/copy/futures/close-positions

限频规则: 1次/秒/UID

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

手动平仓。

手动平仓 › Request Parameters

projectId
​string · required

项目ID

symbol
​string · required

交易对名称

qty
​string · required

平仓数量

holdSide
​string · required

持仓方向

long 多仓

short 空仓

双向持仓模式,该字段必填。

手动平仓 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/close-positions
curl 'https://api.bitget.com/api/v3/copy/futures/close-positions?projectId=<string>&symbol=<string>&qty=<string>&holdSide=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

一键平仓

POST
https://api.bitget.com
/api/v3/copy/futures/close-all

限频规则: 1次/秒/UID

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

一键平仓,关闭跟单账户下的全部仓位。

一键平仓 › Request Parameters

projectId
​string · required

项目ID

一键平仓 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/close-all
curl 'https://api.bitget.com/api/v3/copy/futures/close-all?projectId=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

获取当前仓位

GET
https://api.bitget.com
/api/v3/copy/futures/current-positions

限频规则: 1次/秒/UID

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

获取跟单账户当前仓位。

获取当前仓位 › Request Parameters

projectId
​string · required

项目ID

symbol
​string

交易对,如BTCUSDT。如不传,则返回全部仓位。

posSide
​string

仓位方向。如传入此参数,则仅返回对应方向仓位。

long 多

short 空

获取当前仓位 › Response Parameters

200

Successful response

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

当前仓位

GET/api/v3/copy/futures/current-positions
curl 'https://api.bitget.com/api/v3/copy/futures/current-positions?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "list": [ { "symbol": "BTCUSDT", "marginCoin": "USDT", "posSide": "long", "total": "0.01", "leverage": "10", "avgPrice": "50000.00", "marginMode": "crossed", "holdMode": "hedge_mode", "createdTime": "1740000000000", "positionId": "9876543210" } ] } }
json
application/json

设置止盈止损

POST
https://api.bitget.com
/api/v3/copy/futures/place-tpsl

限频规则: 1次/秒/UID

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

为跟单账户仓位设置止盈止损。

设置止盈止损 › Request Parameters

projectId
​string · required

项目ID

positionId
​string · required

仓位ID

tpTriggerBy
​string · required

止盈触发类型

market 市场价格(默认)

mark 标记价格

slTriggerBy
​string · required

止损触发类型

market 市场价格(默认)

mark 标记价格

takeProfit
​string · required

止盈触发价格

stopLoss
​string · required

止损触发价格

设置止盈止损 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
strategyId
​string

策略ID

POST/api/v3/copy/futures/place-tpsl
curl 'https://api.bitget.com/api/v3/copy/futures/place-tpsl?projectId=<string>&positionId=<string>&tpTriggerBy=<string>&slTriggerBy=<string>&takeProfit=<string>&stopLoss=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "strategyId": "1234567890" } }
json
application/json

修改止盈止损

POST
https://api.bitget.com
/api/v3/copy/futures/modify-tpsl

限频规则: 1次/秒/UID

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

修改跟单账户仓位的止盈止损。

修改止盈止损 › Request Parameters

projectId
​string · required

项目ID

strategyId
​string · required

策略ID

tpTriggerBy
​string · required

止盈触发类型

market 市场价格

mark 标记价格

slTriggerBy
​string · required

止损触发类型

market 市场价格

mark 标记价格

takeProfit
​string · required

止盈触发价格

stopLoss
​string · required

止损触发价格

修改止盈止损 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
strategyId
​string

策略ID

POST/api/v3/copy/futures/modify-tpsl
curl 'https://api.bitget.com/api/v3/copy/futures/modify-tpsl?projectId=<string>&strategyId=<string>&tpTriggerBy=<string>&slTriggerBy=<string>&takeProfit=<string>&stopLoss=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "strategyId": "1234567890" } }
json
application/json

撤销止盈止损

POST
https://api.bitget.com
/api/v3/copy/futures/cancel-tpsl

限频规则: 1次/秒/UID

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

撤销跟单账户仓位的止盈止损策略。

撤销止盈止损 › Request Parameters

projectId
​string · required

项目ID

strategyId
​string · required

策略ID

撤销止盈止损 › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​

Response data

POST/api/v3/copy/futures/cancel-tpsl
curl 'https://api.bitget.com/api/v3/copy/futures/cancel-tpsl?projectId=<string>&strategyId=<string>' \ --request POST
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": "success" }
json
application/json

获取当前止盈止损单

GET
https://api.bitget.com
/api/v3/copy/futures/current-tpsl-orders

限频规则: 1次/秒/UID

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

获取跟单账户当前止盈止损单。

获取当前止盈止损单 › Request Parameters

projectId
​string · required

项目ID

获取当前止盈止损单 › Response Parameters

200

Successful response

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

当前止盈止损单

GET/api/v3/copy/futures/current-tpsl-orders
curl 'https://api.bitget.com/api/v3/copy/futures/current-tpsl-orders?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "list": [ { "strategyId": "1234567890", "category": "USDT-FUTURES", "symbol": "BTCUSDT", "qty": "0.01", "posSide": "long", "status": "pending", "tpTriggerBy": "market", "slTriggerBy": "market", "takeProfit": "60000.00", "stopLoss": "45000.00", "tpOrderType": "market", "slOrderType": "market" } ] } }
json
application/json

获取历史止盈止损单

GET
https://api.bitget.com
/api/v3/copy/futures/tpsl-order-history

限频规则: 1次/秒/UID

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

获取跟单账户历史止盈止损单。

获取历史止盈止损单 › Request Parameters

projectId
​string · required

项目ID

startTime
​string

开始时间戳(Unix毫秒)。默认查询时间为近30天,最大时间间隔为90天。

endTime
​string

结束时间戳(Unix毫秒)。默认查询时间为近30天,最大时间间隔为90天。

limit
​string

每页条目数,最大和默认均为100。

cursor
​string

分页游标,用于翻页。

获取历史止盈止损单 › Response Parameters

200

Successful response

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

历史止盈止损单

cursor
​string

游标ID,用于翻页

GET/api/v3/copy/futures/tpsl-order-history
curl 'https://api.bitget.com/api/v3/copy/futures/tpsl-order-history?projectId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1740000000000, "data": { "list": [ { "strategyId": "1234567890", "category": "USDT-FUTURES", "symbol": "BTCUSDT", "qty": "0.01", "posSide": "long", "status": "success", "tpTriggerBy": "market", "slTriggerBy": "market", "takeProfit": "60000.00", "stopLoss": "45000.00", "tpOrderType": "market", "slOrderType": "market" } ], "cursor": "1234567890" } }
json
application/json

合约带单(公域&私域)