Bitstamp
Bitstamp API Information
Bitstamp Api Link: https://www.bitstamp.net/api/#section/What-is-API
Main Endpoints
- Base Endpoint:
www.bitstamp.net/
Response Codes
Response code is a key that can be appended to an API response as response_code (string).
Additionally, an optional key response_explanation (string) may be included to provide further explanation.
| response_code | response_explanation (optional) |
|---|---|
| 400.001 | Unknown validation error. |
| 400.002 | Request rejected due to exceeded rate limit. |
| 400.003 | Trading for provided market is disabled. |
| 400.004 | POST parameter(s) is missing from request. |
| 400.005 | POST parameter(s) is missing from request: amount. |
| 400.006 | POST parameter(s) is missing from request: price. |
| 400.007 | POST parameter(s) is malformed. |
| 400.008 | POST parameter(s) is malformed: client_order_id. |
| 400.009 | Insufficient balance for provided user. |
| 400.010 | POST parameter(s) is malformed: offset. |
| 400.011 | POST parameter(s) is malformed: limit. |
| 400.012 | POST parameter(s) is malformed: sort. |
| 400.013 | POST parameter(s) is malformed: since_timestamp. |
| 400.014 | POST parameter(s) is missing from request: order_id. |
| 400.015 | POST parameter(s) is missing from request: client_order_id. |
| 400.016 | POST parameter(s) is malformed: order_id. |
| 400.017 | POST parameter(s) is malformed: client_cancel_id. |
| 400.018 | GET parameters not allowed for this request. |
| 400.019 | Provided client_order_id already exists. |
| 400.020 | Provided order size is lower than minimum order value. |
| 400.021 | Provided price is out of range. |
| 400.022 | POST parameter(s) is missing from request: expire_time. |
| 400.023 | POST parameter(s) is malformed: expire_time. |
| 400.024 | Only one of optional parameters can be set. |
| 400.025 | Both limit_price and any optional parameter cannot be set. |
| 400.026 | POST parameter(s) is malformed: amount. |
| 400.027 | Sell if executed price must be higher than buy price. |
| 400.028 | Buy if executed price must be lower than sell price. |
| 400.029 | ‘stop_order_id’ is None. |
| 400.030 | ‘stop_order_price’ is None. |
| 400.031 | ’expire_time’ is None. |
| 400.032 | ’expire_time’ must be set in future date. |
| 400.033 | ’expire_time’ must be None. |
| 400.034 | POST parameter(s) is malformed: until_timestamp. |
| 400.035 | POST parameter(s) is missing from request: id. |
| 400.036 | POST parameter(s) is malformed: id. |
| 400.037 | Provided order size is too large. |
| 400.038 | Provided order amount is too large. |
| 400.039 | Provided order size is higher than maximum order value. |
| 400.040 | Provided leverage differs from ones on open orders. |
| 400.041 | POST parameter(s) is malformed: price. |
| 400.042 | Position management mode already active. |
| 400.043 | No positions present. |
| 400.044 | POST parameter(s) is malformed: leverage. |
| 400.045 | Open orders present. |
| 400.046 | Provided order amount is too low. |
| 400.047 | POST parameter(s) is malformed: stop_price. |
| 400.048 | POST parameter(s) is malformed: activation_price. |
| 400.049 | POST parameter(s) is missing: subtype. |
| 400.050 | POST parameter(s) is missing: trigger. |
| 400.051 | POST parameter(s) is missing: reduce_only. |
| 400.052 | Too many stop orders on market. |
| 400.053 | Too many trailing stop orders on trade account. |
| 400.054 | Invalid value for trailing_delta. |
| 400.055 | Current price is lower than order price. |
| 400.056 | Current price is higher than order price. |
| 400.057 | Reduce only not supported with provided order parameters. |
| 400.058 | Only GTC, FOK and IOC time in force allowed for take profit and stop loss orders. |
| 400.059 | Either stop price or trailing price with trailing delta must be specified. |
| 400.060 | Trailing delta is required for activation price. |
| 400.061 | Date range exceeds limit. |
| 400.062 | Position not found. |
| 400.063 | Leverage not allowed. |
| 400.064 | Collateral not allowed. |
| 400.065 | Price should be less than 20% above trigger price. |
| 400.066 | Price should be less than 20% below trigger price. |
| 400.067 | Request rejected due to exceeded client rate limit. |
| 400.068 | Request rejected due to exceeded market rate limit. |
| 400.069 | Slippage tolerance is not supported for this order type. |
| 400.070 | Price should be less than 500% of trigger price. |
| 400.071 | Price should be less than 80% below trigger price. |
| 403.001 | User verification failed. |
| 403.002 | Trading is not allowed on lending account. |
| 403.003 | Trading is not allowed on collateral account. |
| 403.004 | Trading is blocked for user. |
| 403.005 | Action not allowed at cross margin mode. |
| 403.006 | Trading of this market type is not allowed on trade account. |
| 403.007 | Position in liquidation. |
| 403.008 | Account in liquidation. |
| 403.009 | Maximum number of positions on system exceeded. |
| 403.010 | The maximum size of open orders and positions on the market reached. |
| 404.001 | Unknown not found error. |
| 404.002 | Order not found for corresponding request. |
| 404.003 | Currency pair not found for corresponding request. |
| 404.004 | Trade account not found for provided API key. |
| 404.005 | Order book not found. |
| 404.006 | Currency not found for corresponding request. |
| 404.007 | Market not found for corresponding request. |
| 405.001 | GET method not allowed. |
| 410.001 | Requested endpoint is deprecated. |
| 500.001 | Unknown server error. |
| 500.002 | One of Bitstamp internal services failed to process request. |
| 500.003 | Unknown error while processing order. |
| 500.004 | No sell orders for provided market. |
| 500.005 | No buy orders for provided market. |
| 500.006 | Cash sell order types are currently disabled. |
| 500.007 | Error while serializing data. |
| 500.008 | Margin option for provided market is disabled. |
| 500.009 | Order book is currently unavailable. |
| 500.010 | Instant trading for provided market is disabled. |
| 500.011 | Market trading for provided market is disabled. |
| 500.012 | Matching blocked for this order book. |
| 500.013 | Unknown matching engine error. |
| 500.014 | Cash order for provided market is disabled. |
| 500.015 | Cannot place order. There are currently no orders for provided market. |
| 500.016 | Your request timed out before order confirmation. Please check order status with id in “order_id” field. |
| 500.017 | Order rejected by matching engine. |
| 500.018 | No orders for provided market. |
| 500.019 | Error at canceling orders. |
| 500.020 | Pre reserved orders present. |
| 500.021 | Post reserved orders present. |
| 500.022 | More than one position present. |
| 500.023 | Position management order not filled. |
Request Limits
All clients can make 400 requests per second. A default limit threshold of 10,000 requests per 10 minutes is in place.
Rate limits can be increased upon request and entering a bespoke agreement with Bitstamp.
For real-time data, use the WebSocket API.
Commercial Use of Bitstamp’s Exchange Data
Companies seeking to utilize Bitstamp’s exchange data for commercial purposes should contact: 📧 partners@bitstamp.net
Bitstamp allows incorporation and redistribution of its exchange data for commercial purposes, including:
- Creating ratios or calculations
- Generating new original works or statistics
- Building derived data products
Authentication
All private API calls require authentication. For a successful authentication, provide the following authorization headers in your request.
Possible Authentication Errors
| Code | Reason | Action |
|---|---|---|
| API0001 | API key not found | Check your API key value. |
| API0002 | IP address not allowed | This IP address has no permission to use this API key. |
| API0003 | No permission found | API key doesn’t have permission for calling this endpoint. |
| API0004 | Invalid nonce | Check your nonce value. It must differ from the last nonce used in the past 300 seconds. |
| API0005 | Invalid signature | Posted signature doesn’t match ours. |
| API0006 | Your account is frozen | Contact support to unfreeze your account. |
| API0008 | Authentication failed | Can’t find customer with selected API key. |
| API0009 | Please update your profile with your FATCA information | Ensure you filled the FATCA information form. |
| API0010 | Invalid version | Send "v2" in the version authorization header. |
| API0011 | Wrong API key format | Check that your API key string is correct. |
| API0012 | X-Auth header is required | X-Auth header is probably missing. |
| API0013 | X-Auth-Signature header is required | X-Auth-Signature header is probably missing. |
| API0014 | X-Auth-Nonce header is required | X-Auth-Nonce header is probably missing. |
| API0015 | X-Auth-Timestamp header is required | X-Auth-Timestamp header is probably missing. |
| API0016 | X-Auth-Version header is required | X-Auth-Version header is probably missing. |
| API0017 | X-Auth-Timestamp header is out of boundaries | Timestamp too old/new; must be within 150 seconds. |
| API0018 | X-Auth-Timestamp header is invalid | Check the timestamp format. |
| API0019 | Content-Type header is not accepted | Specify the correct content type. |
| API0020 | Content-Type header should not be present | Ensure no body is sent with the request. |
| API0021 | URL query string too long | Ensure URL length does not exceed 2000 characters. |
RCXT Bitstamp API Information
There is 1 Base Endpoint for the Bitstamp exchange:
- apiUrl:
www.bitstamp.net
Rate Limits
The rate limit set for each endpoint on the Bitstamp exchange is as follows:
| Limit (1 minute) | Spot | TransferIn | TransferOut | Ticker |
|---|---|---|---|---|
| Fetch Balances | 1 Request Weight | |||
| Fetch Orders | 1 Request Weight | |||
| Fetch Trades | 1 Request Weight | |||
| Fetch DepositWithdrawals | 1 Request Weight | 1 Request Weight | ||
| Ticker | 1 Request Weight |
Fetch Balances
Spot Balance
- The Base Endpoint is
apiUrl(www.bitstamp.net). - The Endpoint used is
/api/v2/account_balances. - The RCXT Endpoint is
api/v1/bitstamp/balances.
The user sends a GET request to query the Bitstamp 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": "SHIB", #asset
"total": "41634.28"
}
],
"margin": null,
"isolatedMargin": null,
"futures": null,
"earnings": null
}Fetch Trades
Spot Trades
- The Base Endpoint is
apiUrl(www.bitstamp.net). - The Endpoint used is
/api/v2/user_transactions/. - The RCXT Endpoint is
api/v1/bitstamp/trades.
The user sends a POST request to query the Bitstamp 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.symbol: The symbol of the pair used in the trade (e.g., BTCUSDT).offset: A parameter specifying how many records to skip in the transaction list. This is used for pagination.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.
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(www.bitstamp.net). - The Endpoint used is
/api/v2/user_transactions/. - The RCXT Endpoint is
api/v1/bitstamp/orders.
The user sends a POST request to query Bitstamp 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.symbol: The symbol of the pair used in the trade (e.g., BTCUSDT).offset: A parameter specifying how many records to skip in the transaction list. This is used for pagination.cursor: Used for pagination, specifies which page to fetch.orderId: The order ID used to filter orders.type: Options include 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(www.bitstamp.net). - The Endpoint used is
/api/v2/open_orders/. - The RCXT Endpoint is
api/v1/bitstamp/orders.
The user sends a POST request to query Bitstamp Spot 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.symbol: The symbol of the pair used in the trade (e.g., BTCUSDT).offset: A parameter specifying how many records to skip in the transaction list. This is used for pagination.cursor: Used for pagination, specifies which page to fetch.orderId: The order ID used to filter orders.type: Options include 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.
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(www.bitstamp.net). - The Endpoint used is
/api/v2/crypto-transactions/. - The RCXT Endpoint is
api/v1/bitstamp/deposit-withdraw-history.
The user sends a GET request to query Bitstamp transfer-in data.
This request must include the required header parameters:
The
apiKeyandsecretKeyvalues are taken from the header.The following query parameters are required:
offset: A parameter specifying how many records to skip in the transaction list. This is used for pagination.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 1.
- A maximum of 1000 entries can be fetched per page.
Transfer Out
- The Base Endpoint is
apiUrl(www.bitstamp.net). - The Endpoint used is
/api/v2/crypto-transactions/. - The RCXT Endpoint is
api/v1/bitstamp/deposit-withdraw-history.
The user sends a GET request to query Bitstamp transfer-out data.
This request must include the required header parameters:
The
apiKeyandsecretKeyvalues are taken from the header.The following query parameters are required:
offset: A parameter specifying how many records to skip in the transaction list. This is used for pagination.fromId: The transfer ID used to filter the specific transfer.type: Options include transferIn and transferOut. transferIn 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 1000 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(www.bitstamp.net).The Endpoint used is
/api/v2/ticker/.The RCXT Endpoint is
api/v1/bitstamp/ticker.https://www.bitstamp.net/api/v2/ticker/: 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
}