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 · Follower
      Copy settingspostGet Current Tracking OrdersgetGet History Tracking OrdersgetSet TPSLpostClose PositionspostGet Copy Trade SettingsgetSet Copy Trade SettingspostUnfollow the TraderpostGet My TradersgetGet Follow Limitget
Classic Futures Copy Trading Follower API
Classic Futures Copy Trading Follower API

Copy Trading · Futures Copy · Follower

Classic Account — Copy Trading · Futures Copy · Follower


Copy settings

POST
https://api.bitget.com
/api/v2/copy/mix-follower/copy-settings

Rate Limit: 1 req/sec/UID

This interface is designed for setting up order following for the new version of followers. Currently, the interface only supports intelligent proportion and does not support multivariate exploration.

Criteria for the new version of followers: Users who registered after January 26, 2024, or users who registered before January 26, 2024 and have manually upgraded.

Copy settings › Request Parameters

traderId
​string · required

ID of the elite trader that you followed

copyAmount
​string · required

Copy trading amount, must be a positive integer not less than 50, denominated in USDT..

copyAllPostions
​string

Whether to follow all positions of the trader.

yesFollow all positions. no Do not follow all positions

If not provided, the default value isno

autoCopy
​string

Whether to automatically follow new symbol opened by traders(only takes effect when mode is basic).

onAutomatic following. offNot automatically following

If not provided, the default value ison

equityGuardian
​string

Equity protection switch.

onEnabled

offDisabled

If not provided,the default value isoff

equityGuardianMode
​string

Equity protection mode, triggered when equityGuardian=on.

amountFixed amount protection

percentagePercentage-based protection

If not provided, the default value isamount

equity
​string

Equity protection trigger value. Required when equityGuardian=on. Must be a positive integer. If equityGuardian Mode=percentage, range is [1-100], representing 1%-100%. If equityGuardianMode=amount, it represents a fixeed loss amount.

marginMode
​string

Margin mode.

follow_traderFollow the trader's leverage.

crossed_marginCross margin

isolated_marginIsolated margin.

If not provided, the default value isfollow_trader

leverage
​string

Leverage mode, effective when marginMode=follow_trader.

follow_traderFollow trader.

fixed_leverageUse fixed leverage.

Default: follow_trader.

multiple
​string

Leverage multiple, ranging from [1,125]. Default: 10.

Copy settings › Response Parameters

200

Successful response

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

success Success

failure Failure

POST/api/v2/copy/mix-follower/copy-settings
curl https://api.bitget.com/api/v2/copy/mix-follower/copy-settings \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "traderId": "traderId", "copyAmount": "copyAmount", "copyAllPostions": "copyAllPostions", "autoCopy": "autoCopy", "equityGuardian": "equityGuardian", "equityGuardianMode": "equityGuardianMode", "equity": "equity", "marginMode": "marginMode", "leverage": "leverage", "multiple": "multiple" }'
Example Request Body
{ "traderId": "traderId", "copyAmount": "copyAmount", "copyAllPostions": "copyAllPostions", "autoCopy": "autoCopy", "equityGuardian": "equityGuardian", "equityGuardianMode": "equityGuardianMode", "equity": "equity", "marginMode": "marginMode", "leverage": "leverage", "multiple": "multiple" }
json
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695872676719, "data": "success" }
json
application/json

Get Current Tracking Orders

GET
https://api.bitget.com
/api/v2/copy/mix-follower/query-current-orders

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

idLessThan
​string

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

idGreaterThan
​string

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

startTime
​string

Start timestamp

(Copy trade 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

(Copy trade 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.

symbol
​string

Trading pairs, case sensitive

traderId
​string

Trader ID

Get Current Tracking Orders › Response Parameters

200

Successful response

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

Overview of current tracking records

trackingNo
​string

Track order number

traderId
​string

Trader user ID

traderName
​string

Trader alias

openOrderId
​string

Opening order ID

closeOrderId
​string

Closing order ID

symbol
​string

Trading pair

posSide
​string

Position direction

long: long position in hedging mode

short: short position in hedging mode

openLeverage
​string

Leverage for opening position

openPriceAvg
​string

Average entry price

openTime
​string

Position opening time (millisecond timestamp)

openFee
​string

Opening fee (excluding discounts)

openSize
​string

Opening volume

openMarginSz
​string

Margin amount

closePriceAvg
​string

Average closing price

closeSize
​string

Closing volume

closeTime
​string

Position closing time (millisecond timestamp)

endId
​string

Last tracking order ID.

This is used when idLessThan/idGreaterThan is set as the querying scope

GET/api/v2/copy/mix-follower/query-current-orders
curl 'https://api.bitget.com/api/v2/copy/mix-follower/query-current-orders?productType=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1634107646972, "data": { "trackingList": [ { "trackingNo": "1", "traderName": "xxxxxx", "openOrderId": "1", "closeOrderId": "", "traderId": "**********", "symbol": "BTCUSDT", "posSide": "short", "openLeverage": "47", "openPriceAvg": "39827", "openTime": "1627567376984", "openSize": "0.0010000000000000", "closePriceAvg": "0", "closeSize": "0.0000000000000000", "openMarginSz": "21", "closeTime": "0" } ], "endId": "" } }
json
application/json

Get History Tracking Orders

GET
https://api.bitget.com
/api/v2/copy/mix-follower/query-history-orders

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 end ID of the corresponding interface.

idGreaterThan
​string

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

startTime
​string

Start timestamp

(Copy trade 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

(Copy trade 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.

symbol
​string

Trading pairs, case sensitive

traderId
​string

Trader ID

Get History Tracking Orders › Response Parameters

200

Successful response

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

Overview of elite trade records

trackingNo
​string

Order number tracking

traderId
​string

Trader user ID

openOrderId
​string

Opening order ID

closeOrderId
​string

Closing order ID

productType
​string

Product type default USDT-FUTURES

USDT-FUTURES USDT-M Futures

COIN-FUTURES Coin-M Futures

USDC-FUTURES USDC-M Futures

symbol
​string

Trading pair

posSide
​string

Position direction

long: long position in hedging mode

short: short position in hedging mode

openLeverage
​string

Leverage for opening position

openPriceAvg
​string

Average entry price

openTime
​string

Position opening time (millisecond timestamp)

openSize
​string

Opening volume

closePriceAvg
​string

Average closing price

closeFee
​string

close fee (excluding discounts)

openFee
​string

Opening fee (excluding discounts)

closeSize
​string

Closing volume

closeTime
​string

Closing volume

profitRate
​string

rate of return

netProfit
​string

follower net income

achievedPL
​string

Realized profit and loss

endId
​string

Last tracking order ID.

This is used when idLessThan/idGreaterThan is set as the querying scope

GET/api/v2/copy/mix-follower/query-history-orders
curl 'https://api.bitget.com/api/v2/copy/mix-follower/query-history-orders?productType=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695808417159, "data": { "trackingList": [ { "trackingNo": "123123123123", "posSide": "long", "openLeverage": "20", "openSize": "0.1852", "closeSize": "0.1852", "openPriceAvg": "32000.5", "closePriceAvg": "28233.0", "achievedPL": "-697.74100000", "openFee": "-5.92649260", "closeFee": "-5.22875160", "symbol": "BTCUSDT", "profitRate": "-235.47", "netProfit": "-697.74100000", "openOrderId": "1", "closeOrderId": "1", "openTime": "1695176941362", "closeTime": "1695353868557", "traderId": "**********", "productType": "usdt-futures" } ], "endId": "" } }
json
application/json

Set TPSL

POST
https://api.bitget.com
/api/v2/copy/mix-follower/setting-tpsl

Rate Limit: 5 req/sec/UID

Set TPSL › Request Parameters

trackingNo
​string · required

Order tracking number

productType
​string · required

Product type

USDT-FUTURES USDT-M Futures

COIN-FUTURES Coin-M Futures

USDC-FUTURES USDC-M Futures

symbol
​string

Trading pair

stopSurplusPrice
​string

Take profit price

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

Stop loss price

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.

Set TPSL › Response Parameters

200

Successful response

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

Result

success: success,fail: fail

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

Close Positions

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

Rate Limit: 5 req/sec/UID

Interface for followers to close positions. Can close positions based on order ID, trading pair, direction, position mode, and margin

Close Positions › Request Parameters

productType
​string · required

Product type

USDT-FUTURES USDT-M Futures

COIN-FUTURES Coin-M Futures

USDC-FUTURES USDC-M Futures

trackingNo
​string

Tracking numbers of buying orders grouped by trading pair

(If you pass the trackingNo and ensure that the symbol, marginCoin, marginMode, and holdSide are not empty, you need to ensure that the trackingNo corresponds to them.)

symbol
​string

Trading pair

marginCoin
​string

margin coin

marginMode
​string

Position mode

isolated: isolated margin

cross: cross margin

holdSide
​string

Position direction

  1. In the buying and selling (one-way position) mode: you don’t have to fill it in, if you fill it in, it will be ignored.

  2. In the opening and closing position (hedge mode): This parameter must be filled in.

long: long position in hedging mode

short: short position in hedging mode

Close Positions › Response Parameters

200

Successful response

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

Order ID

POST/api/v2/copy/mix-follower/close-positions
curl https://api.bitget.com/api/v2/copy/mix-follower/close-positions \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "productType": "productType", "trackingNo": "trackingNo", "symbol": "symbol", "marginCoin": "marginCoin", "marginMode": "marginMode", "holdSide": "holdSide" }'
Example Request Body
{ "productType": "productType", "trackingNo": "trackingNo", "symbol": "symbol", "marginCoin": "marginCoin", "marginMode": "marginMode", "holdSide": "holdSide" }
json
Example Responses
{ "code": "00000", "data": { "orderIdList": [ "123", "321" ] }, "msg": "success", "requestTime": 1627293504612 }
json
application/json

Get Copy Trade Settings

GET
https://api.bitget.com
/api/v2/copy/mix-follower/query-settings

Rate Limit: 5 req/sec/UID

Get Copy Trade Settings › Request Parameters

traderId
​string · required

ID of the elite trader that you followed

Get Copy Trade Settings › Response Parameters

200

Successful response

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

Am I following

YES

NO

​object[]

Copy trade details

symbol
​string

Trading pair

productType
​string

Product type

USDT-FUTURES USDT-M Futures

COIN-FUTURES Coin-M Futures

USDC-FUTURES USDC-M Futures

marginType
​string

Margin type

trader margin type of the elite trader that you followed;

specify your own margin type.

marginCoin
​string

Margin currency

leverType
​string

Leverage type

position use position leverage;

specify use the specified leverage;

trader use the leverage of the elite trader;

longLeverage
​string

Leverage of long positions

shortLeverage
​string

Leverage of short positions

traceType
​string

Copy trade position type

percent Set the percentage of the copy trade amount to the trader's elite trade amount. For example, 1 means the follower invests the same amount to open a position as the elite trader, and 2 means the follower invests twice the amount of the elite trader.

amount the fixed volume specified for copy trading

count number of copy trade orders with fixed volume

traceValue
​string

Copy trade position value

maxHoldSize
​string

Maximum number of orders

stopSurplusRatio
​string

Take-profit ratio

positive integers within 1-400,

Value exceeding this number is invalid.

stopLossRatio
​string

Stop-loss ratio

positive integers within 1-400,

Value exceeding this number is invalid.

GET/api/v2/copy/mix-follower/query-settings
curl 'https://api.bitget.com/api/v2/copy/mix-follower/query-settings?traderId=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1679465100798, "data": { "followerEnable": "YES", "detailList": [ { "symbol": "ETHUSDT", "productType": "USDT-FUTURES", "marginType": "specify", "marginCoin": "USDT", "leverType": "trader", "longLeverage": "20", "shortLeverage": "20", "traceType": "percent", "traceValue": "1", "maxHoldSize": "50000", "stopSurplusRatio": "200", "stopLossRatio": "" } ] } }
json
application/json

Set Copy Trade Settings

POST
https://api.bitget.com
/api/v2/copy/mix-follower/settings

Rate Limit: 5 req/sec/UID

Set Copy Trade Settings › Request Parameters

traderId
​string · required

ID of the elite trader that you followed

​object[] · required

Settings of copy trading (based on trading pair)

Maximum: 10

symbol
​string · required

Trading pair

productType
​string · required

Product type

USDT-FUTURES USDT-M Futures

COIN-FUTURES Coin-M Futures

USDC-FUTURES USDC-M Futures

marginType
​string · required

Margin type(only take effect when parameter mode is advanced)

trader margin type of the elite trader that you followed;

specify your own margin type.

leverType
​string · required

Leverage type(only take effect when parameter mode is advanced)

position use position leverage;

specify use the specified leverage;

trader use the leverage of the elite trader;

traceType
​string · required

Copy trade position type

percent Set the percentage of the copy trade amount to the trader's elite trade amount. For example, 1 means the follower invests the same amount to open a position as the elite trader, and 2 means the follower invests twice the amount of the elite trader.

amount the fixed volume specified for copy trading

count number of copy trade orders with fixed volume (only take effect when parameter mode is advanced)

traceValue
​string · required

Copy trade position value

marginCoin
​string

Margin currency

longLeverage
​string

Leverage of long positions (only take effect when parameter mode is advanced)

shortLeverage
​string

Leverage of short positions (only take effect when parameter mode is advanced)

maxHoldSize
​string

Maximum number of orders

stopSurplusRatio
​string

Take-profit ratio

Positive integers within 1-400,

Value exceeding this number is invalid.

stopLossRatio
​string

Stop-loss ratio

Positive integers within 1-400,

Value exceeding this number is invalid.

Stop-loss ratio

autoCopy
​string

Whether to automatically follow new symbol opened by traders(only take effect when parameter mode is basic)

on:auto

off:no

mode
​string

follow mode

basic:basic mode

advanced(default):advanced mode

Set Copy Trade Settings › Response Parameters

200

Successful response

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

Result

success fail

POST/api/v2/copy/mix-follower/settings
curl https://api.bitget.com/api/v2/copy/mix-follower/settings \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "traderId": "traderId", "autoCopy": "autoCopy", "mode": "mode", "settings": [ { "symbol": "symbol", "productType": "productType", "marginType": "marginType", "marginCoin": "marginCoin", "leverType": "leverType", "longLeverage": "longLeverage", "shortLeverage": "shortLeverage", "traceType": "traceType", "traceValue": "traceValue", "maxHoldSize": "maxHoldSize", "stopSurplusRatio": "stopSurplusRatio", "stopLossRatio": "stopLossRatio" } ] }'
Example Request Body
{ "traderId": "traderId", "autoCopy": "autoCopy", "mode": "mode", "settings": [ { "symbol": "symbol", "productType": "productType", "marginType": "marginType", "marginCoin": "marginCoin", "leverType": "leverType", "longLeverage": "longLeverage", "shortLeverage": "shortLeverage", "traceType": "traceType", "traceValue": "traceValue", "maxHoldSize": "maxHoldSize", "stopSurplusRatio": "stopSurplusRatio", "stopLossRatio": "stopLossRatio" } ] }
json
Example Responses
{ "code": "00000", "data": "success", "msg": "success", "requestTime": 1627354109502 }
json
application/json

Unfollow the Trader

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

Rate Limit: 5 req/sec/UID

Unfollow the Trader › Request Parameters

traderId
​string · required

Trader user ID

Unfollow the Trader › Response Parameters

200

Successful response

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

Result

success fail

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

Get My Traders

GET
https://api.bitget.com
/api/v2/copy/mix-follower/query-traders

Rate Limit: 5 req/sec/UID

Get My Traders › Request Parameters

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. )

pageNo
​string

Current page number

Default to 1.

pageSize
​string

Number of quiries

Default to 20 entries and supports a maximum of 50 entries.

Get My Traders › Response Parameters

200

Successful response

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

Certification type

Uncertified

Certified

traderId
​string

Trader ID

traderName
​string

Alias

maxFollowLimit
​string

Maximum number of elite traders to follow

bgbMaxFollowLimit
​string

Maximum number of elite traders to follow granted by BGB holdings

followCount
​string

Number of elite traders that you have followed

bgbFollowCount
​string

Number of elite traders that you have followed granted by BGB holdings

traceTotalMarginAmount
​string

Total opening margin

traceTotalNetProfit
​string

Total net profit

traceTotalProfit
​string

Total profit

currentTradingPairs
​string[]

Current underlying assets for copy trading

followerTime
​string

Following date (take the first following date)

Milliseconds format of timestamp Unix, e.g. 1597026383085

GET/api/v2/copy/mix-follower/query-traders
curl https://api.bitget.com/api/v2/copy/mix-follower/query-traders
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695812788826, "data": [ { "certificationType": "Uncertified", "traderId": "**********", "traderName": "x-1111111", "maxFollowLimit": "1000", "followCount": "0", "traceTotalMarginAmount": "1185.3286", "traceTotalNetProfit": "-744.7362", "traceTotalProfit": "-698.0210", "currentTradingPairs": [ "BTCUSDT", "BTCUSD", "EOSUSDT", "ETHUSDT", "ETHUSD" ], "followerTime": "1693381832000", "bgbMaxFollowLimit": "100", "bgbFollowCount": "0" } ] }
json
application/json

Get Follow Limit

GET
https://api.bitget.com
/api/v2/copy/mix-follower/query-quantity-limit

Frequency limit: 10 times/1s (IP)

Get Follow Limit › 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

Get Follow Limit › Response Parameters

200

Successful response

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

Maximum order size to place (trading currency)

minFollowSize
​string

Minimum order size to place (trading currency)

symbol
​string

Trading pair

GET/api/v2/copy/mix-follower/query-quantity-limit
curl 'https://api.bitget.com/api/v2/copy/mix-follower/query-quantity-limit?productType=<string>'
Example Responses
{ "code": "00000", "msg": "success", "requestTime": 1695812926981, "data": [ { "maxFollowSize": "20000", "minFollowSize": "0.005", "symbol": "BTCUSDT" } ] }
json
application/json