Coinbase
Coinbase API Information
Coinbase Api Link: https://docs.cdp.coinbase.com/api-reference/v2/introduction
Main Endpoints
- Base Endpoint:
/api.coinbase.com
Rate Limits
The CDP API enforces rate limits to ensure fair usage and system stability. Rate limits are calculated using rolling 10-second windows and are applied separately for read and write operations.
Rate Limit Structure
| Operation Type | Rate Limit | Time Window |
|---|---|---|
| Write APIs | 500 requests | 10 seconds |
| Read APIs | 600 requests | 10 seconds |
Write Operations
Write operations include any API endpoints that modify resources (e.g. POST, PUT, DELETE methods).
These are limited to 500 requests per 10 seconds.
Read Operations
Read operations include any API endpoints that retrieve data (e.g. GET methods).
These are limited to 600 requests per 10 seconds.
Rate Limit Response
When you exceed the rate limit, the API will respond with a 429 (Too Many Requests) status code.
The response will include an error object with details about the violation:
RCXT Coinbase API Information
There is 1 Base Endpoint for the Coinbase exchange:
- apiUrl:
/api.coinbase.com
Rate Limits
The rate limit set for each endpoint on the Coinbase exchange is as follows:
| Limit (1 minute) | Spot | Usd Futures | TransferIn | TransferOut | Ticker |
|---|---|---|---|---|---|
| Fetch Balances | 1 Request Weight | ||||
| Fetch Orders | 1 Request Weight | 1 Request Weight | |||
| Fetch Trades | 1 Request Weight | 1 Request Weight | |||
| Fetch DepositWithdrawals | 1 Request Weight | 1 Request Weight | |||
| Ticker | 1 Request Weight |
Fetch Balances
Spot Balance
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/accounts. - The RCXT Endpoint is
api/v1/coinbase/balances.
The user sends a GET request to query the Coinbase wallet balances.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Balance is 1.
Response Example:
{
"spot": [
{
"coin": "BTTC", #asset
"total": "208850.4"
}
],
"margin": null,
"isolatedMargin": null,
"futures": [
{
"coin": "USDT", # asset
"total": "0.03733590"
},
{
"coin": "DOGE", #asset
"total": "2000.00000000"
}
],
"earnings": null
}Fetch Trades
Spot Trades
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/orders/historical/fills. - The RCXT Endpoint is
api/v1/coinbase/trades.
The user sends a GET request to query the Coinbase Spot trades.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.endTime: The date until which we want to fetch data.symbol: The symbol of the pair used in the trade (e.g., BTCUSDT).cursor: Used for pagination, specifies which page to fetch.fromId: The trade ID is used to fetch a specific trade’s data.type: The type is set to spot for Spot Trades.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Trades is 1.
Usd Futures Trades
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/orders/historical/fills. - The RCXT Endpoint is
api/v1/coinbase-futures/trades.
The user sends a GET request to query the Coinbase Usd Futures trades.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.endTime: The date until which we want to fetch data.symbol: The symbol of the pair used in the trade (e.g., BTCUSDT).cursor: Used for pagination, specifies which page to fetch.fromId: The trade ID is used to fetch a specific trade’s data.type: The type is set to uFutures for Usd Futures Trades.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Usd Futures Trades is 1.
Response Example:
{
"trades": [
{
"orderId": "226664511", #orderId
"tradeId": "27082209",
"isBuyer": false,
"isMaker": false,
"price": "0.07610000", #price
"quantity": "199.90000000", #origQty
"symbol": "ACAUSDT", #symbol
"time": 1737552748284, #time
"commission": "0.01521239", #fee
"commissionCurrency": "USDT" #side
}
],
"cursor": ""
}Fetch Orders
Spot Orders
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/orders/historical/batch. - The RCXT Endpoint is
api/v1/coinbase/orders.
The user sends a GET request to query Coinbase Spot orders.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.endTime: The date until which we want to fetch data.symbol: The symbol of the pair used in the order (e.g., BTCUSDT).cursor: Used for pagination, specifies which page to fetch.type: Options include spot, ufutures. spot should be selected for Spot Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Orders is 1.
Spot Open Orders
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/orders/historical/batch. - The RCXT Endpoint is
api/v1/coinbase/orders.
The user sends a GET request to query Coinbase Spot orders.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.endTime: The date until which we want to fetch data.symbol: The symbol of the pair used in the order (e.g., BTCUSDT).cursor: Used for pagination, specifies which page to fetch.type: Options include spot, ufutures. spot should be selected for Spot Open Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Spot Open Orders is 1.
Usd Futures Orders
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/orders/historical/batch. - The RCXT Endpoint is
api/v1/coinbase-futures/orders.
The user sends a GET request to query Coinbase Usd Futures orders.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.endTime: The date until which we want to fetch data.symbol: The symbol of the pair used in the order (e.g., BTCUSDT).cursor: Used for pagination, specifies which page to fetch.type: Options include spot, ufutures. uFutures should be selected for Usd Futures Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Usd Futures Orders is 1.
Usd Futures Open Orders
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/api/v3/brokerage/orders/historical/batch. - The RCXT Endpoint is
api/v1/coinbase-futures/orders.
The user sends a GET request to query Coinbase Usd Futures Open orders.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.endTime: The date until which we want to fetch data.symbol: The symbol of the pair used in the order (e.g., BTCUSDT).cursor: Used for pagination, specifies which page to fetch.type: Options include spot, ufutures. uFutures should be selected for Usd Futures Open Orders.orderStatus: IforderStatusis “open”, it fetches Open Orders; if “closed”, it fetches Closed Orders.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Usd Futures Open Orders is 1.
Response Example:
{
"orders": [
{
"orderId": "1881364520706670592", #orderId
"symbol": "XRPUSDT", #symbol
"type": "MARKET", #type
"price": "3.335", #price
"side": "SELL", #side
"time": 1737387230537, #time
"status": "CLOSED", #status
"executedQuantity": "2.7", #executedQty
"quantity": "2.7" #origiQty
}
],
"cursor": ""
}Fetch DepositWithdrawals
Transfer In
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/v2/accounts/{accountID}/transactions - The RCXT Endpoint is
api/v1/coinbase/deposit-withdraw-history.
The user sends a GET request to query BingX transfer-in data.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.fromId: The transfer ID used to filter the specific transfer.type: Options include transferIn and transferOut. transferIn should be selected for Transfer In.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Transfer In is 10.
- A maximum of 300 entries can be fetched per page.
Transfer Out
- The Base Endpoint is
apiUrl(api.coinbase.com). - The Endpoint used is
/v2/accounts/{accountID}/transactions - The RCXT Endpoint is
api/v1/coinbase/deposit-withdraw-history.
The user sends a GET request to query Coinbase transfer-out data.
This request must include the required header parameters:
-
The
apiKeyandsecretKeyvalues are taken from the header. -
The following query parameters are required:
startTime: The date from which we want to fetch data.fromId: The transfer ID used to filter the specific transfer.type: Options include transferIn and transferOut. transferOut should be selected for Transfer Out.
-
Limiter:
- Each API endpoint is assigned a specific Request Weight value. The Request Weight value for Transfer Out is 1.
- A maximum of 300 entries can be fetched per page.
Response Example:
{
"depositWithdrawals": [
{
"fiatCurrency": "",
"cryptoCurrency": "USDT", #coin
"fiatAmount": "",
"cryptoAmount": "10", #amount
"price": "",
"address": "TNZcfzLhPXVUVe1NLyjdGrjKkPLbHbncJk", #address
"orderId": "",
"transactionId": "e4e406a067ff5ce1c05abc6056e6041478153fc03ba996b565f4727b01a708d8", #txId
"fee": "",
"network": "TRC20", #network
"status": "1", #status
"time": 1726576711847 #insertTime
}
],
"cursor": ""
}Fetch Ticker
Ticker
-
The Base Endpoint is
apiUrl(api.coinbase.com). -
The Endpoint used is
/api/v3/brokerage/market/products/ -
The RCXT Endpoint is
api/v1/coinbase/ticker. -
https://api.coinbase.com/api/v3/brokerage/market/products/: Provides the symbol and current price for cryptocurrency pairs traded only with USDT. -
The only query parameter required is
symbol(e.g. BTCUSDT):symbol: Specifies the symbol of the cryptocurrency pair.
Response Example:
{
"symbol": "BTCUSDT", #symbol
"price": "104562.53000000" #price
}