Bitget
Bitget API Information
Bitget API Link: https://www.bitget.com/api-doc/common/intro
Main Endpoints
- Base Endpoint:
https://api.bitget.com
Time Parameters
- Kabul edilen birimler: Milisaniye veya mikrosaniye.
Generating an API Key
After successfully created the API key, please remember the following information:
- APIKey → The identity of API transactions, generated by a random algorithm.
- SecretKey → The private key is randomly generated by the system and used for Signature generation.
- Passphrase → The password is set by the user. It should be noted that if you forgot the Passphrase, it cannot be retrieved back, and the APIKey needs to be recreated.
Creating a Request
Bitget API Link: https://www.bitget.com/api-doc/common/signature
The header of all REST requests must contain the following http headers:
- ACCESS-KEY: API KEY as a string
- ACCESS-SIGN: Sign with base64 encoding (see
HMACandRSAsample code). - ACCESS-TIMESTAMP: Timestamp of your request. Value equals to milliseconds since Epoch.
- ACCESS-PASSPHRASE: The password you set when created the API KEY.
- Content-Type: Please set to
application/jsonfor allPOSTrequest - locale: Support language such as: Chinese (zh-CN), English (en-US)
LIMITS
Bitget API Link: https://www.bitget.com/api-doc/common/quick-start
Genel Bilgiler
The rate limit of interfaces is based on UID or IP. You can get detailed information from the separated API document page.
Rate Limits:
- The rate limit of each API endpoint is marked on the doc page;
- The rate limit of each API interface is calculated independently;
- The overall rate limit is 6000/IP/Min
: Rest API will return 429 status when the access exceeds the frequency limit: the request is too frequent.
RCXT Bitget API Bilgileri
There is 1 Base Endpoint for the Bitget exchange:
- apiUrl:
https://api.bitget.com
Rate Limits
The rate limit assigned to each endpoint on the Bitget exchange is as follows:
| Limit (1 second) | Spot | Margin | Isolated Margin | Coin Futures | Usd Futures | Earn |
|---|---|---|---|---|---|---|
| Fetch Balances | 10 Request Weight | 10 Request Weight | 10 Request Weight | 10 Request Weight | 10 Request Weight | 10 Request Weight |
| Fetch Orders | 20 Request Weight | 10 Request Weight | 10 Request Weight | |||
| Fetch Trades | 10 Request Weight |
| Limit (1 second) | Deposit | Withdrawal | TransferIn | TransferOut | Ticker |
|---|---|---|---|---|---|
| Fetch DepositWithdrawals | 10 Request Weight | 10 Request Weight | 10 Request Weight | 10 Request Weight | |
| Fetch Ticker | 20 Request Weight |
Fetch Balances
Spot Balance
- The Base Endpoint is
apiUrl(https://api.bitget.com). - The Endpoint used is
/api/v2/spot/account/assets. - The RCXT Endpoint is
api/v1/bitget/balances.
The user sends a GET request to query the Bitget wallet balance.
This request must include the necessary header parameters:
-
The
apiKey,secretKey,password, andisLockedvalues are retrieved from the header. -
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Spot Balance is 10.
Margin Balance
- The Base Endpoint is
apiUrl(https://api.bitget.com). - The Endpoint used is
/api/v2/margin/crossed/account/assets. - The RCXT Endpoint is
api/v1/bitget/balances.
The user sends a GET request to query the Bitget wallet balance.
This request must include the necessary header parameters:
-
The
apiKey,secretKey,password, andisLockedvalues are retrieved from the header. -
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Margin Balance is 10.
Isolated Margin Balance
- The Base Endpoint is
apiUrl(https://api.bitget.com). - The Endpoint used is
/api/v2/margin/isolated/account/assets. - The RCXT Endpoint is
api/v1/bitget/balances.
The user sends a GET request to query the Bitget wallet balance.
This request must include the necessary header parameters:
-
The
apiKey,secretKey,password, andisLockedvalues are retrieved from the header. -
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Isolated Margin Balance is 10.
Usd Futures Balance
- The Base Endpoint is
apiUrl(https://api.bitget.com). - The Endpoint used is
/api/v2/mix/account/accounts?productType=USDT-FUTURES. - The RCXT Endpoint is
api/v1/bitget/balances.
The user sends a GET request to query the Bitget wallet balance.
This request must include the necessary header parameters:
-
The
apiKey,secretKey,password, andisLockedvalues are retrieved from the header. -
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Usd Futures Balance is 10.
Coin Futures Balance
- The Base Endpoint is
apiUrl(https://api.bitget.com). - The Endpoint used is
/api/v2/mix/account/accounts?productType=COIN-FUTURES. - The RCXT Endpoint is
api/v1/bitget/balances.
The user sends a GET request to query the Bitget wallet balance.
This request must include the necessary header parameters:
-
The
apiKey,secretKey,password, andisLockedvalues are retrieved from the header. -
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Coin Futures Balance is 10.
Earn Balance
- The Base Endpoint is
apiUrl(https://api.bitget.com). - The Endpoint used is
/api/v2/earn/account/assets. - The RCXT Endpoint is
api/v1/bitget/balances.
The user sends a GET request to query the Bitget wallet balance.
This request must include the necessary header parameters:
-
The
apiKey,secretKey,password, andisLockedvalues are retrieved from the header. -
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Earn Balance is 10.
Response Example:
{
"spot": [
{
"coin": "BTTC", #coin
"total": "208850.4"
}
],
"margin": [
{
"coin": "DOGE", #coin
"total": "0.00399992"
}
],
"isolatedMargin": [
{
"coin": "DOGE", #coin
"total": "20.55645083"
}
],
"futures": [
{
"coin": "USDT", #coin
"total": "0.03733590"
},
{
"coin": "DOGE", #coin
"total": "2000.00000000"
}
],
"earnings": [
{
"coin": "BNB", #coin
"total": "0.07886113"
}
]
}Fetch Trades
Spot Trades
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/trade/fills. -
The RCXT Endpoint is
api/v1/bitget/trades. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).fromId: The trade ID to fetch a specific trade.type: The available value is spot, which should be selected for Spot Trades.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Spot Trades is 10.
- A maximum of 100 data per page can be fetched.
Response Example:
{
"trades": [
{
"orderId": "226664511", #orderId
"tradeId": "27082209", #tradeId
"isBuyer": false, #side
"isMaker": false, #tradeScope
"price": "0.07610000", #priceAvg
"quantity": "199.90000000", #size
"symbol": "ACAUSDT", #symbol
"time": 1737552748284, #cTime
"commission": "0.01521239", #totalFee
"commissionCurrency": "USDT" #feeCoin
}
],
"cursor": ""
}Fetch Orders
Spot Orders
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/trade/history-orders. -
The RCXT Endpoint is
api/v1/bitget/orders. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).singleOrderId: Used to filter by a single order’s OrderID.fromId: The order ID for fetching a specific order.type: The available values are spot, margin, and iMargin. spot should be selected for Spot Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders, and if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Spot Orders is 20.
- A maximum of 100 data per page can be fetched.
Spot Open Orders
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/trade/unfilled-orders. -
The RCXT Endpoint is
api/v1/bitget/orders. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).singleOrderId: Used to filter by a single order’s OrderID.fromId: The order ID for fetching a specific order.type: The available values are spot, margin, and iMargin. spot should be selected for Spot Open Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders, and if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Spot Open Orders is 20.
- A maximum of 100 data per page can be fetched.
Margin Orders
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/margin/crossed/history-orders. -
The RCXT Endpoint is
api/v1/bitget/orders. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).singleOrderId: Used to filter by a single order’s OrderID.fromId: The order ID for fetching a specific order.type: The available values are spot, margin, and iMargin. margin should be selected for Margin Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders, and if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Margin Orders is 10.
- A maximum of 100 data per page can be fetched.
Margin Open Orders
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/margin/crossed/open-orders. -
The RCXT Endpoint is
api/v1/bitget/orders. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).singleOrderId: Used to filter by a single order’s OrderID.fromId: The order ID for fetching a specific order.type: The available values are spot, margin, and iMargin. margin should be selected for Margin Open Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders, and if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Margin Open Orders is 10.
- A maximum of 100 data per page can be fetched.
Isolated Margin Orders
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/margin/isolated/history-orders. -
The RCXT Endpoint is
api/v1/bitget/orders. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).singleOrderId: Used to filter by a single order’s OrderID.fromId: The order ID for fetching a specific order.type: The available values are spot, margin, and iMargin. iMargin should be selected for Isolated Margin Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders, and if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Isolated Margin Orders is 10.
- A maximum of 500 data per page can be fetched.
Isolated Margin Open Orders
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/margin/isolated/open-orders. -
The RCXT Endpoint is
api/v1/bitget/orders. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.endTime: The date up to which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).singleOrderId: Used to filter by a single order’s OrderID.fromId: The order ID for fetching a specific order.type: The available values are spot, margin, and iMargin. iMargin should be selected for Isolated Margin Open Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders, and if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Isolated Margin Open Orders is 10.
- A maximum of 500 data per page can be fetched.
Response Example:
{
"orders": [
{
"orderId": "226664511", #orderId
"symbol": "ACAUSDT", #symbol
"type": "MARKET", #orderType
"price": "0", #priceAvg
"side": "SELL", #side
"time": 1737552748284, #cTime
"status": "CLOSED", #status
"executedQuantity": "199.90000000", #baseVolume
"quantity": "199.90000000" #size
}
],
"cursor": ""
}Fetch DepositWithdrawal
Fiat Deposits
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/sapi/v1/fiat/orders. -
The RCXT Endpoint is
api/v1/bitget/deposit-withdraw-history. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).fromId: The deposit ID for fetching a specific deposit.type: The available values are deposit, withdraw, transferIn, and transferOut. deposit should be selected for Fiat Deposit.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Deposit Withdrawals is 10.
- A maximum of 500 data per page can be fetched.
Fiat Withdrawal
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/account/bills. -
The RCXT Endpoint is
api/v1/bitget/deposit-withdraw-history. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).fromId: The withdrawal ID for fetching a specific withdrawal.type: The available values are deposit, withdraw, transferIn, and transferOut. withdraw should be selected for Fiat Withdrawal.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Fiat Withdrawal is 10.
- A maximum of 500 data per page can be fetched.
Transfer In
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/wallet/deposit-records. -
The RCXT Endpoint is
api/v1/bitget/deposit-withdraw-history. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the transfer data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).fromId: The transfer ID for fetching a specific transfer.type: The available values are deposit, withdraw, transferIn, and transferOut. transferIn should be selected for Transfer In.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Transfer In is 10.
- A maximum of 100 data per page can be fetched.
Transfer Out
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/wallet/withdrawal-records. -
The RCXT Endpoint is
api/v1/bitget/deposit-withdraw-history. -
The
apiKey,secretKey, andpasswordvalues are retrieved from the header. -
The query parameters include
startTime,endTime,symbol,fromId, andtype:startTime: The date from which we want to fetch the transfer data.symbol: The symbol pair for which the trades were made (e.g., BTCUSDT).fromId: The transfer ID for fetching a specific transfer.type: The available values are deposit, withdraw, transferIn, and transferOut. transferOut should be selected for Transfer Out.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Transfer Out is 10.
- A maximum of 100 data per page can be fetched.
Response Example:
{
"depositWithdrawals": [
{
"fiatCurrency": "TRY",
"cryptoCurrency": "LTC", #coin
"fiatAmount": "172.14",
"cryptoAmount": "0.04027305", #size
"price": "4274.57",
"address": "", #toAddress
"orderId": "", #orderId
"transactionId": "19312553710", #billId
"fee": "0.000120816",
"network": "", #chain
"status": "Completed", #groupType
"time": 1737380406277 #cTime
}
],
"cursor": ""
}Fetch Ticker
Ticker
-
The Base Endpoint is
apiUrl(https://api.bitget.com). -
The Endpoint used is
/api/v2/spot/market/tickers. -
The RCXT Endpoint is
api/v1/bitget/ticker. -
The query parameter is the
symbolvalue (e.g., BTCUSDT):symbol: Specifies the cryptocurrency pair symbol.
-
Limiter:
- Each API endpoint has a specific Request Weight value assigned. The Request Weight for Ticker is 20.
Response Example:
{
"symbol": "BTCUSDT", #symbol
"price": "104562.53000000" #lastPr
}