Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
API Document
Classic Account
    Copy Trading · Futures Copy · Trader
      Create Copy ApiKeypostGet Current Tracking OrdersgetGet History Tracking OrdersgetClose Tracking OrderpostModify Tracking Order TPSLpostGet Tracking Order SummarygetGet History Profit SummarygetGet History Profit Share DetailgetGet Profit Share DetailgetGet Profit Share Group by Coin & DategetGet Copy Trade Symbol SettingsgetChange Copy Trade Symbol SettingpostChange Global Copy Trade SettingpostGet My FollowersgetRemove Followerpost
Classic Futures Copy Trading Trader API
Classic Futures Copy Trading Trader API

Copy Trading · Futures Copy · Trader

Classic Account — Copy Trading · Futures Copy · Trader


Create Copy ApiKey

POST
https://api.bitget.com
/api/v2/copy/mix-trader/create-copy-api

Rate Limit: 1 req/sec/UID

This interface is used for the new version of Copy Traders to create a Copy API Key, which is of HMAC type. Old version Copy Traders will receive an error message "This interface is only applicable to the new Copy model" when calling the interface. The new version of Copy Traders have user identifiers on the following side. These traders support selecting both [Futures Trading] and [Copy Trading] when engaging in contract transactions. The Copy Trading API Key can only be created once. If a user attempts to create another one while already having a Copy API Key, an error will be returned stating "You have already created a Copy API Key." For elite traders, please strictly adhere to the list of trading pairs specified in the Available trading pairs and parameters for elite traders when placing orders using the Copy Trading API Key. Trading pairs outside the announced list are not available for copy trading.

Create Copy ApiKey › Request Parameters

passphrase
​string · required

Password length must be 8 to 32 characters, consisting of English letters and numbers.

Create Copy ApiKey › Response Parameters

200

Successful response

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

API Key.

secret
​string

API Secret.

permissions
​string[]

API Key permissions: contract_tradeContract trade. copytrading_tradeCopy trade

POST/api/v2/copy/mix-trader/create-copy-api
curl https://api.bitget.com/api/v2/copy/mix-trader/create-copy-api \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "passphrase": "passphrase" }'
Example Request Body
{ "passphrase": "passphrase" }
json
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695872676719, "data": [ { "apikey": "bg_xxxxxxxxxxxxxxxxxxxx", "secret": "**********", "permissions": [ "copytrading_trade", "contract_trade" ] } ] }
json
application/json

Get Current Tracking Orders

GET
https://api.bitget.com
/api/v2/copy/mix-trader/order-current-track

Rate Limit: 5 req/sec/UID

Get Current Tracking Orders › Request Parameters

productType
​string · required

Product type USDT-FUTURES USDT-M Futures COIN-FUTURES Coin-M Futures USDC-FUTURES USDC-M Futures

symbol
​string

Trading pair Supports capital and lower-case letters

startTime
​string

Start time (greater than or equal to) Unix timestamp in milliseconds format, e.g. 1597026383085, rounded down according to granularity, i.e. for granularity=1m: 1672410799436 (December 30, 2022, 22:33:19) rounded down to 1672410780000 (December 30, 2022, 22:33:00) Request data generated after this start time (If end time is not input, then estimates out the start time based on the current time)

endTime
​string

Start time (greater than or equal to) Unix timestamp in milliseconds format, e.g. 1597026383085, rounded down according to granularity, i.e. for granularity=1m: 1672410799436 (December 30, 2022, 22:33:19) rounded down to 1672410780000 (December 30, 2022, 22:33:00) Request data generated before this start time

limit
​string

default 20, max 50

idGreaterThan
​string

Requests the content on the page after this ID (newer data), the value input should be the endId of the corresponding interface.

idLessThan
​string

Separate page content before this ID is requested (older data), the value input should be the endId of the corresponding interface.

Get Current Tracking Orders › Response Parameters

200

Successful response

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

Track order list

endId
​string

This is used when idLessThan/idGreaterThan is set as a range.

GET/api/v2/copy/mix-trader/order-current-track
curl 'https://api.bitget.com/api/v2/copy/mix-trader/order-current-track?productType=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695801601016, "data": { "trackingList": [ { "trackingNo": "1231231231", "openOrderId": "123123123123", "symbol": "BTCUSDT", "posSide": "long", "openLeverage": "20", "openPriceAvg": "26248.9", "openTime": "1695801595658", "openSize": "0.1000000000000000", "presetStopSurplusPrice": "27561.34", "presetStopLossPrice": "25855.16", "openFee": "-2.62489", "followCount": "1" } ], "endId": "1" } }
json
application/json

Get History Tracking Orders

GET
https://api.bitget.com
/api/v2/copy/mix-trader/order-history-track

Rate Limit: 5 req/sec/UID

Get History Tracking Orders › Request Parameters

productType
​string · required

Product type USDT-FUTURES USDT-M Futures COIN-FUTURES Coin-M Futures USDC-FUTURES USDC-M Futures

idLessThan
​string

Separate page content before this ID is requested (older data), and the value input should be the endid of the corresponding interface.

idGreaterThan
​string

Separate page content after this ID is requested (newer data), and the value input should be the endid of the corresponding interface.

startTime
​string

Start timestamp (order creation time) Milliseconds format of timestamp Unix, e.g. 1597026383085 (The maximum time span supported is three months. The default end time is three months if no value is set for the end time. )

endTime
​string

End timestamp (order creation time) Milliseconds format of timestamp Unix, e.g. 1597026383085 (The maximum time span supported is three months. The default start time is three months ago if no value is set for the start time. )

limit
​string

Number of queries: Default: 20, maximum: 100.

order
​string

Sorting rules (creation time): Default: desc

symbol
​string

Trading pair Supports capital and lower-case letters

Get History Tracking Orders › Response Parameters

200

Successful response

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

Overview of elite trade records

endId
​string

Final tracking order ID. This is used when idLessThan/idGreaterThan is set as a range.

GET/api/v2/copy/mix-trader/order-history-track
curl 'https://api.bitget.com/api/v2/copy/mix-trader/order-history-track?productType=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695802740184, "data": { "trackingList": [ { "trackingNo": "123123", "symbol": "BTCUSDT", "openOrderId": "12312313123", "closeOrderId": "12312313123", "productType": "usdt-futures", "posSide": "long", "openLeverage": "20", "openPriceAvg": "32000.5", "openTime": "1695035398292", "openSize": "0.1000", "closeSize": "0.1000", "closeTime": "1695176679764", "closePriceAvg": "32000.0", "stopType": "", "achievedPL": "-0.05000000", "openFee": "-3.20005000", "closeFee": "-3.20000000", "cTime": "1695035398292" } ], "endId": "1" } }
json
application/json

Close Tracking Order

POST
https://api.bitget.com
/api/v2/copy/mix-trader/order-close-positions

Rate Limit: 5 req/sec/UID

Tracking orders could only be closed by this API

Close Tracking Order › Request Parameters

productType
​string · required

Product type USDT-FUTURES USDT-M Futures COIN-FUTURES Coin-M Futures USDC-FUTURES USDC-M Futures If only productType is passed, all positions under that line of business will be closed.

trackingNo
​string

Track order number Tracking ID from the current elite trade interface If a symbol is also passed, make sure the order ID pair corresponds to it.

symbol
​string

Trading pair Supports capital and lower-case letters

Close Tracking Order › Response Parameters

200

Successful response

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

Track order number

symbol
​string

Trading pair

productType
​string

Product type

POST/api/v2/copy/mix-trader/order-close-positions
curl https://api.bitget.com/api/v2/copy/mix-trader/order-close-positions \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "trackingNo": "trackingNo", "symbol": "symbol", "productType": "productType" }'
Example Request Body
{ "trackingNo": "trackingNo", "symbol": "symbol", "productType": "productType" }
json
Example Responses
{ "code": "00000", "data": [ { "trackingNo": "123", "symbol": "ETHUSDT", "productType": "USDT-FUTURES" }, { "trackingNo": "32123", "symbol": "BTCUSDT", "productType": "USDT-FUTURES" } ], "msg": "success", "requestTime": 1627354109502 }
json
application/json

Modify Tracking Order TPSL

POST
https://api.bitget.com
/api/v2/copy/mix-trader/order-modify-tpsl

Rate Limit: 5 req/sec/UID

Modify Tracking Order TPSL › Request Parameters

trackingNo
​string · required

Elite trade order ID

productType
​string · required

Product type USDT-FUTURES USDT-M Futures COIN-FUTURES Coin-M Futures USDC-FUTURES USDC-M Futures

symbol
​string

Symbol name e.g.,BTCUSDT

stopSurplusPrice
​string

TP price One of stopSurplusPrice and stopLossPrice must be passed. When it is empty, it is ignored or not updated, no matter take-profit exists or not, When it is 0, it means the original take-profit is canceled if there is a take-profit already. When it is greater than or equal to 0, it means take-profit is updated or set.

stopLossPrice
​string

SL price One of stopSurplusPrice and stopLossPrice must be passed. When it is empty, it is ignored or not updated, no matter stop-loss exists or not, When it is 0, it means the original stop-loss is canceled if there is a stop-loss already. When it is greater than or equal to 0, it means stop-loss is updated or set.

Modify Tracking Order TPSL › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​string

Implementation results success fail

POST/api/v2/copy/mix-trader/order-modify-tpsl
curl https://api.bitget.com/api/v2/copy/mix-trader/order-modify-tpsl \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "symbol": "symbol", "trackingNo": "trackingNo", "productType": "productType", "stopSurplusPrice": "stopSurplusPrice", "stopLossPrice": "stopLossPrice" }'
Example Request Body
{ "symbol": "symbol", "trackingNo": "trackingNo", "productType": "productType", "stopSurplusPrice": "stopSurplusPrice", "stopLossPrice": "stopLossPrice" }
json
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1656066841304, "data": "success" }
json
application/json

Get Tracking Order Summary

GET
https://api.bitget.com
/api/v2/copy/mix-trader/order-total-detail

Rate Limit: 5 req/sec/UID

Get Tracking Order Summary › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
​object
roi
​string

ROI

tradingOrderNum
​string

Total opening orders

totalFollowerNum
​string

Total followers

currentFollowerNum
​string

Current number of followers

totalpl
​string

Total profit (calculated in USD)

gainNum
​string

Ratio of profitable trades

lossNum
​string

Ratio of losing trades

totalEquity
​string

Total assets

winRate
​string

Win rate

tradingPairsAvailableList
​string[]

Available trading pairs

​object[]

ROI in the last week

​object[]

Profit in the past week

​object[]

ROI in the last month

​object[]

Profit in the last month

GET/api/v2/copy/mix-trader/order-total-detail
curl https://api.bitget.com/api/v2/copy/mix-trader/order-total-detail
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695805917634, "data": { "roi": "19.38", "tradingOrderNum": "105", "totalFollowerNum": "134", "currentFollowerNum": "4", "totalpl": "$46.95", "gainNum": "59", "lossNum": "46", "winRate": "56.123", "tradingPairsAvailableList": [ "BTCUSDT" ], "lastWeekRoiList": [ { "rate": "-14.130944", "ctime": "1695139200000" } ], "lastWeekProfitList": [], "lastMonthRoiList": [ { "rate": "-14.130944", "ctime": "1693152000000" } ], "totalEquity": "1776.03" } }
json
application/json

Get History Profit Summary

GET
https://api.bitget.com
/api/v2/copy/mix-trader/profit-history-summarys

Rate Limit: 5 req/sec/UID

Get History Profit Summary › Response Parameters

200

Successful response

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

Elite trader profit share overview

​object[]

Trader profit sharing summary information

GET/api/v2/copy/mix-trader/profit-history-summarys
curl https://api.bitget.com/api/v2/copy/mix-trader/profit-history-summarys
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1698200382922, "data": { "profitSummary": { "yesterdayProfit": "0", "sumProfit": "26.4519", "waitProfit": "0", "yesterdayTime": "1698076800000" }, "profitHistoryList": [ { "coin": "USDT", "profitCount": "24.28410397", "lastProfitTime": "1698076800000" } ] } }
json
application/json

Get History Profit Share Detail

GET
https://api.bitget.com
/api/v2/copy/mix-trader/profit-history-details

Rate Limit: 5 req/sec/UID

Get History Profit Share Detail › Request Parameters

coin
​string

Settlement currency

idLessThan
​string

Separate page content before this ID is requested (older data), and the value input should be the endid of the corresponding interface.

idGreaterThan
​string

Separate page content after this ID is requested (newer data), and the value input should be the endid of the corresponding interface.

startTime
​string

Start timestamp Milliseconds format of timestamp Unix, e.g. 1597026383085 (The maximum time span supported is three months. The default end time is three months if no value is set for the end time. )

endTime
​string

End timestamp Milliseconds format of timestamp Unix, e.g. 1597026383085 (The maximum time span supported is three months. The default start time is three months ago if no value is set for the start time. )

limit
​string

Number of queries: Default: 100, maximum: 100

Get History Profit Share Detail › Response Parameters

200

Successful response

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

profit share overview

endId
​string

The last profit share ID. This is used when idLessThan/idGreaterThan is set as a range.

GET/api/v2/copy/mix-trader/profit-history-details
curl https://api.bitget.com/api/v2/copy/mix-trader/profit-history-details
Example Responses
{ "code": "00000", "data": { "profitList": [ { "profitId": "1", "coin": "usdt", "profit": "1", "nickName": "nickname", "profitTime": "1691446639000" } ], "endId": "3" }, "msg": "success", "requestTime": 1627354109502 }
json
application/json

Get Profit Share Detail

GET
https://api.bitget.com
/api/v2/copy/mix-trader/profit-details

Rate Limit: 5 req/sec/UID

Get Profit Share Detail › Request Parameters

coin
​string

Settlement currency of profit share

pageSize
​string

Number of inquiries Default: 20, maximum: 100

pageNo
​string

Current page number Default to 1.

Get Profit Share Detail › Response Parameters

200

Successful response

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

Settlement currency

profit
​string

Profit share

nickName
​string

Alias

GET/api/v2/copy/mix-trader/profit-details
curl https://api.bitget.com/api/v2/copy/mix-trader/profit-details
Example Responses
{ "code": "00000", "data": [ { "coin": "usdt", "profit": "0", "nickName": "nickname" } ], "msg": "success", "requestTime": 1627354109502 }
json
application/json

Get Profit Share Group by Coin & Date

GET
https://api.bitget.com
/api/v2/copy/mix-trader/profits-group-coin-date

Rate Limit: 5 req/sec/UID

Get Profit Share Group by Coin & Date › Request Parameters

pageSize
​string

Number of inquiries Defaults to 20 entries and supports a maximum of 50 entries.

pageNo
​string

Current page number Default to 1.

Get Profit Share Group by Coin & Date › Response Parameters

200

Successful response

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

Cryptocurrency

profit
​string

PnL (in the dimension of the cryptocurrency and the date)

profitTime
​string

Time to distribute profit share (milliseconds) (in the dimension of the cryptocurrency and the date)

GET/api/v2/copy/mix-trader/profits-group-coin-date
curl https://api.bitget.com/api/v2/copy/mix-trader/profits-group-coin-date
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695807225928, "data": [ { "coin": "usdt", "profit": "15", "profitTime": "1627354109502" } ] }
json
application/json

Get Copy Trade Symbol Settings

GET
https://api.bitget.com
/api/v2/copy/mix-trader/config-query-symbols

Rate limit: 5 req/sec/UID

Get Copy Trade Symbol Settings › Request Parameters

productType
​string · required

Product type USDT-FUTURES USDT-M Futures COIN-FUTURES Coin-M Futures USDC-FUTURES USDC-M Futures

Get Copy Trade Symbol Settings › Response Parameters

200

Successful response

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

Trading pair

openTrader
​string

Activates copy trading or not, YES, NO

minOpenCount
​string

Minimum opening amount of elite traders

maxLeverage
​string

Maximum leverage

stopSurplusRatio
​string

Value set for take profit (value is a positive integer, 120 means 120%)

stopLossRatio
​string

Value set for stop-loss ratio (the value is a positive integer, 40 means 40%)

GET/api/v2/copy/mix-trader/config-query-symbols
curl 'https://api.bitget.com/api/v2/copy/mix-trader/config-query-symbols?productType=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695807225928, "data": [ { "symbol": "BTCUSDT", "openTrader": "yes", "minOpenCount": "0.002", "maxLeverage": "50", "stopSurplusRatio": "100", "stopLossRatio": "30" } ] }
json
application/json

Change Copy Trade Symbol Setting

POST
https://api.bitget.com
/api/v2/copy/mix-trader/config-setting-symbols

Rate limit: 5 req/sec/UID

Change Copy Trade Symbol Setting › Request Parameters

​object[] · required

Setting overview Maximum: 50

Change Copy Trade Symbol Setting › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​string

Setting results

POST/api/v2/copy/mix-trader/config-setting-symbols
curl https://api.bitget.com/api/v2/copy/mix-trader/config-setting-symbols \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "settingList": [ { "symbol": "symbol", "productType": "productType", "settingType": "settingType", "stopSurplusRatio": "stopSurplusRatio", "stopLossRatio": "stopLossRatio" } ] }'
Example Request Body
{ "settingList": [ { "symbol": "symbol", "productType": "productType", "settingType": "settingType", "stopSurplusRatio": "stopSurplusRatio", "stopLossRatio": "stopLossRatio" } ] }
json
Example Responses
{ "code": "00000", "data": "success", "msg": "success", "requestTime": 1627354109502 }
json
application/json

Change Global Copy Trade Setting

POST
https://api.bitget.com
/api/v2/copy/mix-trader/config-settings-base

Rate Limit: 5 req/sec/UID

Change Global Copy Trade Setting › Request Parameters

enable
​string

One of the three must be passed. Activates elite trading or not? YES NO

showTotalEquity
​string

One of the three must be passed. Displays total assets (USDT) or not? YES NO

showTpsl
​string

One of the three must be passed. TP/SL price of orders will be displayed publicly. YES NO

Change Global Copy Trade Setting › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​string

Success or not

POST/api/v2/copy/mix-trader/config-settings-base
curl https://api.bitget.com/api/v2/copy/mix-trader/config-settings-base \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "enable": "enable", "showTotalEquity": "showTotalEquity", "showTpsl": "showTpsl" }'
Example Request Body
{ "enable": "enable", "showTotalEquity": "showTotalEquity", "showTpsl": "showTpsl" }
json
Example Responses
{ "code": "00000", "data": "success", "msg": "success", "requestTime": 1627354109502 }
json
application/json

Get My Followers

GET
https://api.bitget.com
/api/v2/copy/mix-trader/config-query-followers

Rate Limit: 5 req/sec/UID

Get My Followers › Request Parameters

pageNo
​string

Page number (default: 1)

pageSize
​string

Entries per page (default: 20, maximum: 100)

startTime
​string

Start timestamp Milliseconds format of timestamp Unix, e.g. 1597026383085 (The maximum time span supported is three months. The default end time is three months if no value is set for the end time. )

endTime
​string

End timestamp Milliseconds format of timestamp Unix, e.g. 1597026383085 (The maximum time span supported is three months. The default start time is three months ago if no value is set for the start time. )

Get My Followers › Response Parameters

200

Successful response

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

Total account assets

isRemove
​string

Is it able to remove followers? yes no

followerHeadPic
​string

Follower avatar

followerName
​string

Follower alias

followerUid
​string

Follower user ID

followerTime
​string

Date of following (based on date of initial following) Milliseconds format of timestamp Unix, e.g. 1597026383085

GET/api/v2/copy/mix-trader/config-query-followers
curl https://api.bitget.com/api/v2/copy/mix-trader/config-query-followers
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1684920707124, "data": [ { "accountEquity": "3434361.0097", "isRemove": "yes", "followerHeadPic": "", "followerName": "****@***.com", "followerUid": "************", "followerTime": "1684920707124" } ] }
json
application/json

Remove Follower

POST
https://api.bitget.com
/api/v2/copy/mix-trader/config-remove-follower

Rate limit: 5 req/sec/UID

Remove Follower › Request Parameters

followerUid
​string · required

Follower UID

Remove Follower › Response Parameters

200

Successful response

code
​string
msg
​string
requestTime
​integer
data
​string

success

POST/api/v2/copy/mix-trader/config-remove-follower
curl https://api.bitget.com/api/v2/copy/mix-trader/config-remove-follower \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "followerUid": "followerUid" }'
Example Request Body
{ "followerUid": "followerUid" }
json
Example Responses
{ "code": "00000", "data": "success", "msg": "success", "requestTime": 1627354109502 }
json
application/json