Bitstamp
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).
| Field | Required | Description |
|---|---|---|
| Access Key | Yes | — |
| Secret Key | Yes | — |
| Client ID | Yes | The 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
| Command | Arguments | Description | Returns |
|---|---|---|---|
api | method, 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: Therawargument is an encoded"a=1&b=2"string (or an object); it is appended to the query string forGETandDELETEand to the form body for other methods. Withfalseas the last argument the request is not signed, andparamsgoes into the query string forGETandDELETEand 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'smoc_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 inMinNotional;MinQtyandMaxQtyare 0. exchange.GetTrades()returns the trades of the last hour (the exchange endpoint's default time window).