Skip to content
🎉 Welcome to atWallets Ecosystem! Visit AirDrop Rewards
Bitstamp

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_coderesponse_explanation (optional)
400.001Unknown validation error.
400.002Request rejected due to exceeded rate limit.
400.003Trading for provided market is disabled.
400.004POST parameter(s) is missing from request.
400.005POST parameter(s) is missing from request: amount.
400.006POST parameter(s) is missing from request: price.
400.007POST parameter(s) is malformed.
400.008POST parameter(s) is malformed: client_order_id.
400.009Insufficient balance for provided user.
400.010POST parameter(s) is malformed: offset.
400.011POST parameter(s) is malformed: limit.
400.012POST parameter(s) is malformed: sort.
400.013POST parameter(s) is malformed: since_timestamp.
400.014POST parameter(s) is missing from request: order_id.
400.015POST parameter(s) is missing from request: client_order_id.
400.016POST parameter(s) is malformed: order_id.
400.017POST parameter(s) is malformed: client_cancel_id.
400.018GET parameters not allowed for this request.
400.019Provided client_order_id already exists.
400.020Provided order size is lower than minimum order value.
400.021Provided price is out of range.
400.022POST parameter(s) is missing from request: expire_time.
400.023POST parameter(s) is malformed: expire_time.
400.024Only one of optional parameters can be set.
400.025Both limit_price and any optional parameter cannot be set.
400.026POST parameter(s) is malformed: amount.
400.027Sell if executed price must be higher than buy price.
400.028Buy 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.034POST parameter(s) is malformed: until_timestamp.
400.035POST parameter(s) is missing from request: id.
400.036POST parameter(s) is malformed: id.
400.037Provided order size is too large.
400.038Provided order amount is too large.
400.039Provided order size is higher than maximum order value.
400.040Provided leverage differs from ones on open orders.
400.041POST parameter(s) is malformed: price.
400.042Position management mode already active.
400.043No positions present.
400.044POST parameter(s) is malformed: leverage.
400.045Open orders present.
400.046Provided order amount is too low.
400.047POST parameter(s) is malformed: stop_price.
400.048POST parameter(s) is malformed: activation_price.
400.049POST parameter(s) is missing: subtype.
400.050POST parameter(s) is missing: trigger.
400.051POST parameter(s) is missing: reduce_only.
400.052Too many stop orders on market.
400.053Too many trailing stop orders on trade account.
400.054Invalid value for trailing_delta.
400.055Current price is lower than order price.
400.056Current price is higher than order price.
400.057Reduce only not supported with provided order parameters.
400.058Only GTC, FOK and IOC time in force allowed for take profit and stop loss orders.
400.059Either stop price or trailing price with trailing delta must be specified.
400.060Trailing delta is required for activation price.
400.061Date range exceeds limit.
400.062Position not found.
400.063Leverage not allowed.
400.064Collateral not allowed.
400.065Price should be less than 20% above trigger price.
400.066Price should be less than 20% below trigger price.
400.067Request rejected due to exceeded client rate limit.
400.068Request rejected due to exceeded market rate limit.
400.069Slippage tolerance is not supported for this order type.
400.070Price should be less than 500% of trigger price.
400.071Price should be less than 80% below trigger price.
403.001User verification failed.
403.002Trading is not allowed on lending account.
403.003Trading is not allowed on collateral account.
403.004Trading is blocked for user.
403.005Action not allowed at cross margin mode.
403.006Trading of this market type is not allowed on trade account.
403.007Position in liquidation.
403.008Account in liquidation.
403.009Maximum number of positions on system exceeded.
403.010The maximum size of open orders and positions on the market reached.
404.001Unknown not found error.
404.002Order not found for corresponding request.
404.003Currency pair not found for corresponding request.
404.004Trade account not found for provided API key.
404.005Order book not found.
404.006Currency not found for corresponding request.
404.007Market not found for corresponding request.
405.001GET method not allowed.
410.001Requested endpoint is deprecated.
500.001Unknown server error.
500.002One of Bitstamp internal services failed to process request.
500.003Unknown error while processing order.
500.004No sell orders for provided market.
500.005No buy orders for provided market.
500.006Cash sell order types are currently disabled.
500.007Error while serializing data.
500.008Margin option for provided market is disabled.
500.009Order book is currently unavailable.
500.010Instant trading for provided market is disabled.
500.011Market trading for provided market is disabled.
500.012Matching blocked for this order book.
500.013Unknown matching engine error.
500.014Cash order for provided market is disabled.
500.015Cannot place order. There are currently no orders for provided market.
500.016Your request timed out before order confirmation. Please check order status with id in “order_id” field.
500.017Order rejected by matching engine.
500.018No orders for provided market.
500.019Error at canceling orders.
500.020Pre reserved orders present.
500.021Post reserved orders present.
500.022More than one position present.
500.023Position 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

CodeReasonAction
API0001API key not foundCheck your API key value.
API0002IP address not allowedThis IP address has no permission to use this API key.
API0003No permission foundAPI key doesn’t have permission for calling this endpoint.
API0004Invalid nonceCheck your nonce value. It must differ from the last nonce used in the past 300 seconds.
API0005Invalid signaturePosted signature doesn’t match ours.
API0006Your account is frozenContact support to unfreeze your account.
API0008Authentication failedCan’t find customer with selected API key.
API0009Please update your profile with your FATCA informationEnsure you filled the FATCA information form.
API0010Invalid versionSend "v2" in the version authorization header.
API0011Wrong API key formatCheck that your API key string is correct.
API0012X-Auth header is requiredX-Auth header is probably missing.
API0013X-Auth-Signature header is requiredX-Auth-Signature header is probably missing.
API0014X-Auth-Nonce header is requiredX-Auth-Nonce header is probably missing.
API0015X-Auth-Timestamp header is requiredX-Auth-Timestamp header is probably missing.
API0016X-Auth-Version header is requiredX-Auth-Version header is probably missing.
API0017X-Auth-Timestamp header is out of boundariesTimestamp too old/new; must be within 150 seconds.
API0018X-Auth-Timestamp header is invalidCheck the timestamp format.
API0019Content-Type header is not acceptedSpecify the correct content type.
API0020Content-Type header should not be presentEnsure no body is sent with the request.
API0021URL query string too longEnsure 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)SpotTransferInTransferOutTicker
Fetch Balances1 Request Weight
Fetch Orders1 Request Weight
Fetch Trades1 Request Weight
Fetch DepositWithdrawals1 Request Weight1 Request Weight
Ticker1 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 apiKey and secretKey values 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 apiKey and secretKey values 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 apiKey and secretKey values 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: If orderStatus is “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 apiKey and secretKey values 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: If orderStatus is “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 apiKey and secretKey values 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 apiKey and secretKey values 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
}