Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
AscendEx
Backpack
BigONE
Binance
Bitfinex
bitFlyer
Bitget
Bithumb
Bitstamp
Bybit
Coincheck
Coinone
CoinW
Crypto.com
DeepCoin
Deribit
DigiFinex
Gate
Gemini
HashKey
HitBTC
HTX
Korbit
Kraken
KuCoin
LBank
MEXC
OKX
Poloniex
Upbit
WEEX
WOO X
Zaif
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

Spot trading on Bitstamp; only spot pairs are served. The exchange has no conditional-order or order-history endpoint. Private endpoints need the account's customer ID (Client ID) for signing in addition to the API Key and Secret Key.

Names and Configuration

exchange.GetName(): Bitstamp (Spot).

FieldRequiredDescription
Access KeyYes—
Secret KeyYes—
Client IDYesThe Bitstamp account's customer ID, used in signing private requests.

Trading Pairs and Contract Codes

Pair examples: BTC_USD, ETH_EUR, BTC_USDT

Trading pairs are written BASE_QUOTE, matching the Bitstamp native code btcusd. USD is assumed when the quote currency is omitted (BTC means BTC_USD).

Exchange-specific IO Commands
CommandArgumentsDescriptionReturns
apimethod, path[, params[, raw[, sign]]]Call a Bitstamp endpoint directly; requests are signed by default, with params sent as a form body together with key, signature and nonce (Bitstamp private endpoints use POST). (more below the table)The raw exchange response; an error is raised when the response status is error or it carries an error field.

The rest of the longer descriptions in the table:

  • api: The raw argument is an encoded "a=1&b=2" string (or an object); it is appended to the query string for GET and DELETE and to the form body for other methods. With false as the last argument the request is not signed, and params goes into the query string for GET and DELETE and into a form body for other methods.

For the common commands base and currency see exchange.IO.

Function Support

Not supported (the call fails with an error and returns null): exchange.GetHistoryOrders, exchange.ModifyOrder, exchange.CreateConditionOrder, exchange.ModifyConditionOrder, exchange.CancelConditionOrder, exchange.GetConditionOrder, exchange.GetConditionOrders, exchange.GetHistoryConditionOrders.

Served through a fallback:

  • exchange.GetRecords: Native periods are 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 3d; other periods are synthesized by the docker.

Notes
  • The amount of a spot market buy order is in the base currency, not a quote-currency amount (Bitstamp's market order endpoint is used).
  • The exchange has no order-history endpoint, so exchange.GetHistoryOrders() is not supported; exchange.GetOrder() can still query completed orders.
  • Maker-only (postOnly) orders are placed with Bitstamp's moc_order; IOC and FOK limit orders are supported as well.
  • The minimum order size in exchange.GetMarkets() is the exchange's minimum order value (in the quote currency), given in MinNotional; MinQty and MaxQty are 0.
  • exchange.GetTrades() returns the trades of the last hour (the exchange endpoint's default time window).