API

What Is API?

Bitstamp application programming interface (API) allows our clients to access and control their accounts, using custom written software.

With the inclusion of the new BTC/EUR currency pair, we've added new endpoints for some API calls (info about specific calls below). The old endpoints are still available and have not changed. We strongly suggest however, that you refer to the v2 API for future references. Please note that API v2 endpoints rounding is different, than the one used on the old endpoints.

Request limits

Do not make more than 8000 requests per 10 minutes or we will ban your IP address. For real time data please refer to the websocket API.

Public Data Functions

Ticker

Passing any GET parameters, will result in your request being rejected.

Request
GET https://www.bitstamp.net/api/ticker/
  Returns data for the BTC/USD currency pair.
GET https://www.bitstamp.net/api/v2/ticker/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Response (JSON)
last Last BTC price.
high Last 24 hours price high.
low Last 24 hours price low.
vwap Last 24 hours volume weighted average price.
volume Last 24 hours volume.
bid Highest buy order.
ask Lowest sell order.
timestamp Unix timestamp date and time.
open First price of the day.

Hourly ticker

Passing any GET parameters, will result in your request being rejected.

Request
GET https://www.bitstamp.net/api/ticker_hour/
  Returns data for the BTC/USD currency pair.
GET https://www.bitstamp.net/api/v2/ticker_hour/{currency_pair}/ API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Response (JSON)
Returns a JSON dictionary like the ticker call, with the calculated values being from within an hour.

Order book

Request
GET https://www.bitstamp.net/api/order_book/
  Returns data for the BTC/USD currency pair.
GET https://www.bitstamp.net/api/v2/order_book/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
group (Optional) The group parameter is used for accessing different data from order book. Possible values are 0 (orders are not grouped at same price), 1 (orders are grouped at same price - default) or 2 (orders with their order ids are not grouped at same price). API v2
Response (JSON): success
Returns a JSON dictionary with "bids" and "asks". Each is a list of open orders and each order is represented as a list holding the price and the amount.
Using optional group parameter with value 2 response will also have "microtimestamp" - when order book was generated and "bids" and "asks" list of orders will show price, amount and order id for each order. API v2
Response (JSON): failure
error (v1 calls only) The reason for the error.
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Order_book errors
POST method not allowed for this request. HTTP method other than GET used
Invalid GET parameter. Missing group parameter
Internal error. Order book unavailable

Transactions

Request
GET https://www.bitstamp.net/api/transactions/
  Returns data for the BTC/USD currency pair.
GET https://www.bitstamp.net/api/v2/transactions/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
time (Optional) The time interval from which we want the transactions to be returned. Possible values are minute, hour (default) or day.
Response (JSON) - descending list of transactions. Every transaction dictionary contains:
date Unix timestamp date and time.
tid Transaction ID.
price BTC price.
amount BTC amount.
type 0 (buy) or 1 (sell).

Trading pairs info

Request
GET https://www.bitstamp.net/api/v2/trading-pairs-info/API v2
Response (JSON) - list of trading pairs. Every trading pair dictionary contains:
name Trading pair.
url_symbol URL symbol of trading pair.
base_decimals Decimal precision for base currency (BTC/USD - base: BTC).
counter_decimals Decimal precision for counter currency (BTC/USD - counter: USD).
minimum_order Minimum order size.
trading Trading engine status (Enabled/Disabled).
description Trading pair description.

OHLC data

Request
GET https://www.bitstamp.net/api/v2/ohlc/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
start (Optional) Unix timestamp from when OHLC data will be started.
end (Optional) Unix timestamp to when OHLC data will be shown.
  If none from start or end timestamps are posted then endpoint returns OHLC data to current unixtime. If both start and end timestamps are posted, end timestamp will be used.
step Timeframe in seconds. Possible options are 60, 180, 300, 900, 1800, 3600, 7200, 14400, 21600, 43200, 86400, 259200
limit Limit OHLC results (minimum: 1; maximum: 1000)
Response (JSON): success - Returns a dictionary of tick data for selected trading pair. Each tick in the dictionary is represented as a list of OHLC data.
pair Trading pair
high Price high
timestamp Unix timestamp date and time
volume Volume
low Price low
close Closing price
open Opening price
Response (JSON): failure
code "Error code"
errors List with 'field', 'message' and 'code' fields.
OHLC errors
Missing data for required field. Step and limit parameters are missing.
Not a valid choice. Value entered in parameter is invalid.
Must be between 1 and 1000. Limit value must be between 1 and 1000.

EUR/USD conversion rate

Request
GET https://www.bitstamp.net/api/eur_usd/
Response (JSON)
buy Buy conversion rate.
sell Sell conversion rate.

API authentication

All private API calls require authentication. We have two authentication possibilities:

V1 authentication method

For a successful authentication you need to provide your API key, a signature and a nonce parameter.

API key

To get an API key, go to "Account", "Security" and then "API Access". Set permissions and click "Generate key".

Nonce

Nonce is a regular integer number. It must be increased with every request you make. Read more about it here. Example: if you set nonce to 1 in your first request, you must set it to at least 2 in your second request. You are not required to start with 1. Maximum value for nonce is 9223372036854775807. A common practice is to use unix time for that parameter.

Signature

Signature is a HMAC-SHA256 encoded message containing nonce, customer ID (can be found here) and API key. The HMAC-SHA256 code must be generated using a secret key that was generated with your API key. This code must be converted to it's hexadecimal representation (64 uppercase characters).

A short code example on how to generate a signature can be seen here:

PYTHON

import hmac
import hashlib

message = nonce + customer_id + api_key
signature = hmac.new(
    API_SECRET,
    msg=message,
    digestmod=hashlib.sha256).hexdigest().upper()
Authentication errors
Code Reason Action
API0000 Missing key, signature and nonce parameters Parameters were not posted in API request
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 api endpoint
API0004 Invalid nonce Check your nonce value. It must be greater than last nonce used
API0005 Invalid signature Posted signature doesn't match with ours
API0006 Your account is frozen Contact support to unfreeze your account
API0007 API key has invalid characters Check your API key value. It must consist of only ASCII letters and digits.
API0008 Authentication failed Can't find customer with selected API key

V2 authentication method

We introduced a new authentication method that allows for easier nonce handling and is much safer since all relevant content is signed.

Since we strive for simplicity and better security, we encourage you to use this new authentication method.

For a successful authentication you need to provide the following authorization headers in your request:

This is available only for API V2 endpoints.

Please note that you do not need to set key, signature and nonce request parameters using this authentication method. You also do not need to set Content-Type header if there is no body.

Request headers
X-Auth "BITSTAMP" + " " + api_key
X-Auth-Signature sha256.hmac(string_to_sign, api_secret)
X-Auth-Nonce Client generated random nonce:
- lowercase,
- 36 char string,
- each nonce can be used only once within a timeframe of 150 seconds.

Example: "f93c979d-b00d-43a9-9b9c-fd4cd9547fa6"
X-Auth-Timestamp Request departure timestamp UTC in milliseconds. If timestamp is more than 150 seconds from current server time, it will not allow to make the request.

Example: "1567755304968"
X-Auth-Version "v2"
Content-Type "application/x-www-form-urlencoded"

string_to_sign is your signature message. Content-Type should not be added to the string if request.body is empty.

The following have to be combined into a single string:

PYTHON

"BITSTAMP" + " " + api_key + \
HTTP Verb + \
url.host + \
url.path + \
url.query + \
Content-Type + \
X-Auth-Nonce + \
X-Auth-Timestamp + \
X-Auth-Version + \
request.body

Below are the details describing each part of the signature message.

string_to_sign
"BITSTAMP" + " " + "$apiKey" Same as authorization header.
HTTP Verb The HTTP (uppercase) verb.

Example: "GET", "POST"
url.host The hostname (lowercase), matching the HTTP "Host" request header field (including any port number).

Example: "www.bitstamp.net"
url.path The HTTP request path with leading slash.

Example: "/api/v2/balance/"
url.query Any query parameters or empty string. This should be the exact string sent by the client, including urlencoding.

Example: "?limit=100&sort=asc"
Content-Type Same as authorization header.
X-Auth-Nonce Same as authorization header.
X-Auth-Timestamp Same as authorization header.
X-Auth-Version Same as authorization header.
request.body As is.
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 api endpoint
API0004 Invalid nonce Check your nonce value. It must be different than last nonce used in the last 150 seconds.
API0005 Invalid signature Posted signature doesn't match with 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, before using API. Check that you filled out the FATCA information form on your account.
API0010 Invalid version Check that you 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 in your request
API0013 X-Auth-Signature header is required X-Auth-Signature header is probably missing in your request
API0014 X-Auth-Nonce header is required X-Auth-Nonce header is probably missing in your request
API0015 X-Auth-Timestamp header is required X-Auth-Timestamp header is probably missing in your request
API0016 X-Auth-Version header is required X-Auth-Version header is probably missing in your request
API0017 X-Auth-Timestamp header is out of boundaries Timestamp you added in the header is either too old or too new. Check that timestamp is within 150 second timeframe.
API0018 X-Auth-Timestamp header is invalid Check the format of X-Auth-Timestamp header.
API0019 Content-Type header is not accepted Please specify the correct content type.
API0020 Content-Type header should not be present Please make sure you're not sending any body in the request.
API0021 Please make sure url query string is not too long Please make sure the total length of the url does not exceed 2000 characters.

Authentication examples:

PYTHON
import hashlib
import hmac
import time
import requests
import uuid
import sys

client_id = 'client_id'
api_key = 'api_key'
API_SECRET = b'api_key_secret'

timestamp = str(int(round(time.time() * 1000)))
nonce = str(uuid.uuid4())
content_type = 'application/x-www-form-urlencoded'
payload = {'offset': '1'}

if sys.version_info.major >= 3:
    from urllib.parse import urlencode
else:
    from urllib import urlencode

payload_string = urlencode(payload)

# '' (empty string) in message represents any query parameters or an empty string in case there are none
message = 'BITSTAMP ' + api_key + \
    'POST' + \
    'www.bitstamp.net' + \
    '/api/v2/user_transactions/' + \
    '' + \
    content_type + \
    nonce + \
    timestamp + \
    'v2' + \
    payload_string
message = message.encode('utf-8')
signature = hmac.new(API_SECRET, msg=message, digestmod=hashlib.sha256).hexdigest()
headers = {
    'X-Auth': 'BITSTAMP ' + api_key,
    'X-Auth-Signature': signature,
    'X-Auth-Nonce': nonce,
    'X-Auth-Timestamp': timestamp,
    'X-Auth-Version': 'v2',
    'Content-Type': content_type
}
r = requests.post(
    'https://www.bitstamp.net/api/v2/user_transactions/',
    headers=headers,
    data=payload_string
    )
if not r.status_code == 200:
    raise Exception('Status code not 200')

string_to_sign = (nonce + timestamp + r.headers.get('Content-Type')).encode('utf-8') + r.content
signature_check = hmac.new(API_SECRET, msg=string_to_sign, digestmod=hashlib.sha256).hexdigest()
if not r.headers.get('X-Server-Auth-Signature') == signature_check:
    raise Exception('Signatures do not match')

print(r.content)

        
JAVA
package com.example.AuthenticationExample;

import org.apache.commons.codec.binary.Hex;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.UUID;

public class Authentication {
    public static void main(String[] args) {
        String apiKey = String.format("%s %s", "BITSTAMP", "api_key");
        String apiKeySecret = "api_key_secret";
        String httpVerb = "POST";
        String urlHost = "www.bitstamp.net";
        String urlPath = "/api/v2/user_transactions/";
        String urlQuery = "";
        String timestamp = String.valueOf(System.currentTimeMillis());
        String nonce = UUID.randomUUID().toString();
        String contentType = "application/x-www-form-urlencoded";
        String version = "v2";
        String payloadString = "offset=1";
        String signature = apiKey +
            httpVerb +
            urlHost +
            urlPath +
            urlQuery +
            contentType +
            nonce +
            timestamp +
            version +
            payloadString;

        try {
            SecretKeySpec secretKey = new SecretKeySpec(apiKeySecret.getBytes(), "HmacSHA256");
            Mac mac = Mac.getInstance("HmacSHA256");
            mac.init(secretKey);
            byte[] rawHmac = mac.doFinal(signature.getBytes());
            signature = new String(Hex.encodeHex(rawHmac)).toUpperCase();

            HttpClient client = HttpClient.newHttpClient();
            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://www.bitstamp.net/api/v2/user_transactions/"))
                .POST(HttpRequest.BodyPublishers.ofString(payloadString))
                .setHeader("X-Auth", apiKey)
                .setHeader("X-Auth-Signature", signature)
                .setHeader("X-Auth-Nonce", nonce)
                .setHeader("X-Auth-Timestamp", timestamp)
                .setHeader("X-Auth-Version", version)
                .setHeader("Content-Type", contentType)
                .build();

            HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());

            if (response.statusCode() != 200) {
                throw new RuntimeException("Status code not 200");
            }

            String serverSignature = response.headers().map().get("x-server-auth-signature").get(0);
            String responseContentType = response.headers().map().get("Content-Type").get(0);
            String stringToSign = nonce + timestamp + responseContentType + response.body();

            mac.init(secretKey);
            byte[] rawHmacServerCheck = mac.doFinal(stringToSign.getBytes());
            String newSignature = new String(Hex.encodeHex(rawHmacServerCheck));

            if (!newSignature.equals(serverSignature)) {
                throw new RuntimeException("Signatures do not match");
            }

            System.out.println(response.body());

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

        
C++
#include <curl/curl.h>
#include <openssl/hmac.h>
#include <uuid/uuid.h>

#include <iostream>
#include <string>
#include <chrono>
#include <iomanip>

static size_t write_call_back(void *contents, size_t size, size_t nmemb, void *userp)
{
    ((std::string*)userp)->append((char*)contents, size * nmemb);
    return size * nmemb;
}

std::string b2a_hex(char *byte_arr, int n)
{
    const static std::string hex_codes = "0123456789abcdef";
    std::string hex_string;
    for ( int i = 0; i < n ; ++i ) {
        unsigned char bin_value = byte_arr[i];
        hex_string += hex_codes[( bin_value >> 4 ) & 0x0F];
        hex_string += hex_codes[bin_value & 0x0F];
    }
    return hex_string;
}

std::string url_encode(std::string data)
{
    std::string res = data;
    CURL *curl = curl_easy_init();

    if(curl) {
        char *output = curl_easy_escape(curl, data.c_str(), data.length());
        if(output) {
            res = output;
            curl_free(output);
        }
    }

    return res;
}


int main() {

    const std::string api_key = "api_key";
    const std::string api_secret = "api_key_secret";

    std::chrono::milliseconds timestamp = std::chrono::duration_cast< std::chrono::milliseconds >(
            std::chrono::system_clock::now().time_since_epoch()
    );

    uuid_t uuid;
    uuid_string_t nonce;
    uuid_generate(uuid);
    uuid_unparse_lower(uuid, nonce);

    std::string x_auth = "BITSTAMP " + api_key;
    std::string x_auth_nonce = nonce;
    std::string x_auth_timestamp = std::to_string(timestamp.count());
    std::string x_auth_version = "v2";
    std::string content_type = "application/x-www-form-urlencoded";
    std::string payload = url_encode("{offset:1}");

    std::string http_method = "POST";
    std::string url_host = "www.bitstamp.net";
    std::string url_path = "/api/v2/user_transactions/";
    std::string url_query = "";

    std::string data_to_sign = "";
    data_to_sign.append(x_auth);
    data_to_sign.append(http_method);
    data_to_sign.append(url_host);
    data_to_sign.append(url_path);
    data_to_sign.append(url_query);
    data_to_sign.append(content_type);
    data_to_sign.append(x_auth_nonce);
    data_to_sign.append(x_auth_timestamp);
    data_to_sign.append(x_auth_version);
    data_to_sign.append(payload);

    // calculate hmac signature
    unsigned char* result;
    unsigned int len = 20;
    result = (unsigned char*)malloc(sizeof(char) * len);

    HMAC_CTX ctx;
    HMAC_CTX_init(&ctx);

    HMAC_Init_ex(&ctx, api_secret.c_str(), api_secret.length(), EVP_sha256(), NULL);
    HMAC_Update(&ctx, (unsigned char*)data_to_sign.c_str(), data_to_sign.length());
    HMAC_Final(&ctx, result, &len);
    HMAC_CTX_cleanup(&ctx);

    std::string x_auth_signature = b2a_hex( (char *)result, 32 );
    free(result);

    // send request
    CURL *curl;
    CURLcode res;
    std::string read_buffer;

    curl = curl_easy_init();

    if(curl) {

        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, ("X-Auth: " + x_auth).c_str());
        headers = curl_slist_append(headers, ("X-Auth-Signature: " + x_auth_signature).c_str());
        headers = curl_slist_append(headers, ("X-Auth-Nonce: " + x_auth_nonce).c_str());
        headers = curl_slist_append(headers, ("X-Auth-Timestamp: " + x_auth_timestamp).c_str());
        headers = curl_slist_append(headers, ("X-Auth-Version: " + x_auth_version).c_str());
        headers = curl_slist_append(headers, ("Content-Type: " + content_type).c_str());

        std::string url = "https://" + url_host + url_path + url_query;

        curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload.c_str());
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_call_back);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &read_buffer);

        res = curl_easy_perform(curl);

        if(res != CURLE_OK) {
            std::cout << "curl_easy_perform() failed: " << curl_easy_strerror(res) << std::endl;
        }

        std::cout << "curl_easy_perform() response: " << read_buffer << std::endl;

        curl_easy_cleanup(curl);

    }

    return 0;

}
    
        

Private Functions

Account balance

This API call is cached for 10 seconds. This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/balance/
POST https://www.bitstamp.net/api/v2/balance/API v2
  Returns all the balances.
POST https://www.bitstamp.net/api/v2/balance/API v2
  Returns the values relevant to the specified currency_pair parameter. Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
usd_balance USD balance.
btc_balance BTC balance.
eur_balance EUR balance.
xrp_balance XRP balance.
usd_reserved USD reserved.
btc_reserved BTC reserved.
eur_reserved EUR reserved.
xrp_reserved XRP reserved.
usd_available USD available for trading.
btc_available BTC available for trading.
eur_available EUR available for trading.
xrp_available XRP available for trading.
If https://www.bitstamp.net/api/v2/balance/
gbp_balance GBP balance.
ltc_balance LTC balance.
eth_balance ETH balance.
bch_balance BCH balance.
xlm_balance XLM balance.
pax_balance PAX balance.
link_balance LINK balance.
omg_balance OMG balance.
usdc_balance USDC balance.
dai_balance DAI balance.
knc_balance KNC balance.
mkr_balance MKR balance.
zrx_balance ZRX balance.
gusd_balance GUSD balance.
gbp_reserved GBP reserved.
ltc_reserved LTC reserved.
eth_reserved ETH reserved.
bch_reserved BCH reserved.
xlm_reserved XLM reserved.
pax_reserved PAX reserved.
link_reserved LINK reserved.
omg_reserved OMG reserved.
usdc_reserved USDC reserved.
dai_reserved DAI reserved.
knc_reserved KNC reserved.
mkr_reserved MKR reserved.
zrx_reserved ZRX reserved.
gusd_reserved GUSD reserved.
gbp_available GBP available for trading.
ltc_available LTC available for trading.
eth_available ETH available for trading.
bch_available BCH available for trading.
xlm_available XLM available for trading.
pax_available PAX available for trading.
link_available LINK available for trading.
omg_available OMG available for trading.
usdc_available USDC available for trading.
dai_available DAI available for trading.
knc_available KNC available for trading.
mkr_available MKR available for trading.
zrx_available ZRX available for trading.
gusd_available GUSD available for trading.
btcusd_fee Customer BTC/USD trading fee.
btceur_fee Customer BTC/EUR trading fee.
btcgbp_fee Customer BTC/GBP trading fee.
btcpax_fee Customer BTC/PAX trading fee.
btcusdc_fee Customer BTC/USDC trading fee.
gbpusd_fee Customer GBP/USD trading fee.
gbpeur_fee Customer GBP/EUR trading fee.
eurusd_fee Customer EUR/USD trading fee.
xrpusd_fee Customer XRP/USD trading fee.
xrpeur_fee Customer XRP/EUR trading fee.
xrpbtc_fee Customer XRP/BTC trading fee.
xrpgbp_fee Customer XRP/GBP trading fee.
xrppax_fee Customer XRP/PAX trading fee.
ltcusd_fee Customer LTC/USD trading fee.
ltceur_fee Customer LTC/EUR trading fee.
ltcbtc_fee Customer LTC/BTC trading fee.
ltcgbp_fee Customer LTC/GBP trading fee.
ethusd_fee Customer ETH/USD trading fee.
etheur_fee Customer ETH/EUR trading fee.
ethbtc_fee Customer ETH/BTC trading fee.
ethgbp_fee Customer ETH/GBP trading fee.
ethpax_fee Customer ETH/PAX trading fee.
ethusdc_fee Customer ETH/USDC trading fee.
bchusd_fee Customer BCH/USD trading fee.
bcheur_fee Customer BCH/EUR trading fee.
bchbtc_fee Customer BCH/BTC trading fee.
bchgbp_fee Customer BCH/GBP trading fee.
paxusd_fee Customer PAX/USD trading fee.
paxeur_fee Customer PAX/EUR trading fee.
paxgbp_fee Customer PAX/GBP trading fee.
xlmbtc_fee Customer XLM/BTC trading fee.
xlmusd_fee Customer XLM/USD trading fee.
xlmeur_fee Customer XLM/EUR trading fee.
xlmgbp_fee Customer XLM/GBP trading fee.
linkusd_fee Customer LINK/USD trading fee.
linkeur_fee Customer LINK/EUR trading fee.
linkgbp_fee Customer LINK/GBP trading fee.
linkbtc_fee Customer LINK/BTC trading fee.
linketh_fee Customer LINK/ETH trading fee.
omgusd_fee Customer OMG/USD trading fee.
omgeur_fee Customer OMG/EUR trading fee.
omggbp_fee Customer OMG/GBP trading fee.
omgbtc_fee Customer OMG/BTC trading fee.
usdcusd_fee Customer USDC/USD trading fee.
usdceur_fee Customer USDC/EUR trading fee.
daiusd_fee Customer DAI/USD trading fee.
kncusd_fee Customer KNC/USD trading fee.
knceur_fee Customer KNC/EUR trading fee.
kncbtc_fee Customer KNC/BTC trading fee.
mkrusd_fee Customer MKR/USD trading fee.
mkreur_fee Customer MKR/EUR trading fee.
mkrbtc_fee Customer MKR/BTC trading fee.
zrxusd_fee Customer ZRX/USD trading fee.
zrxeur_fee Customer ZRX/EUR trading fee.
zrxbtc_fee Customer ZRX/BTC trading fee.
gusdusd_fee Customer GUSD/USD trading fee.
usd_withdrawal_fee Customer USD withdrawal fee.
eur_withdrawal_fee Customer EUR withdrawal fee.
gbp_withdrawal_fee Customer GBP withdrawal fee.
btc_withdrawal_fee Customer BTC withdrawal fee.
xrp_withdrawal_fee Customer XRP withdrawal fee.
ltc_withdrawal_fee Customer LTC withdrawal fee.
eth_withdrawal_fee Customer ETH withdrawal fee.
bch_withdrawal_fee Customer BCH withdrawal fee.
xlm_withdrawal_fee Customer XLM withdrawal fee.
pax_withdrawal_fee Customer PAX withdrawal fee.
link_withdrawal_fee Customer LINK withdrawal fee.
omg_withdrawal_fee Customer OMG withdrawal fee.
usdc_withdrawal_fee Customer USDC withdrawal fee.
dai_withdrawal_fee Customer DAI withdrawal fee.
knc_withdrawal_fee Customer KNC withdrawal fee.
mkr_withdrawal_fee Customer MKR withdrawal fee.
zrx_withdrawal_fee Customer ZRX withdrawal fee.
gusd_withdrawal_fee Customer GUSD withdrawal fee.
Other
fee Customer trading fee.
Balance errors
Authentication errors

User transactions

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/user_transactions/
  Returns transactions for all currency pairs.
POST https://www.bitstamp.net/api/v2/user_transactions/API v2
  Returns transactions for all currency pairs.
POST https://www.bitstamp.net/api/v2/user_transactions/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
offset Skip that many transactions before returning results (default: 0, maximum: 200000).
If you need to export older history contact support OR use combination of limit and since_id parameters
limit Limit result to that many transactions (default: 100; maximum: 1000).
sort Sorting by date and time: asc - ascending; desc - descending (default: desc).
since_timestamp (Optional) Show only transactions from unix timestamp (for max 30 days old). API v2
since_id (Optional) Show only transactions from specified transaction id.
If since_id parameter is used, limit parameter is set to 1000.
API v2
Response (JSON): success - Returns a descending list of transactions, represented as dictionaries.
datetime Date and time.
id Transaction ID.
type Transaction type: 0 - deposit; 1 - withdrawal; 2 - market trade; 14 - sub account transfer; 32 - referral reward.
usd USD amount.
eur (v2 calls only) EUR amount.
btc BTC amount.
xrp (v2 calls only) XRP amount.
gbp (v2 calls only) GBP amount.
ltc (v2 calls only) LTC amount.
eth (v2 calls only) ETH amount.
bch (v2 calls only) BCH amount.
xlm (v2 calls only) XLM amount.
pax (v2 calls only) PAX amount.
link (v2 calls only) LINK amount.
omg (v2 calls only) OMG amount.
usdc (v2 calls only) USDC amount.
dai (v2 calls only) DAI amount.
knc (v2 calls only) KNC amount.
mkr (v2 calls only) MKR amount.
zrx (v2 calls only) ZRX amount.
gusd (v2 calls only) GUSD amount.
btc_usd (or other trading pair used, eg btc_eur) Exchange rate.
fee Transaction fee.
order_id Executed order ID.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
User_transactions errors
Authentication errors
Invalid offset Offset parameter should be number from 0 to 200000
Limit too large Max value of limit parameter is 1000
Invalid limit Limit parameter should be number from 1 to 1000
Invalid sort parameter Sort parameter can only be 'asc' or 'desc'
Invalid since_timestamp parameter since_timestamp can only be digit
since_timestamp parameter must be higher than .. Make sure that since_timestamp is less than 30 days in the past
Failed to convert since_timestamp parameter Check the value of since_timestamp parameter

Crypto Transactions

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/crypto-transactions/ API v2
  Returns data for all cryptocurrency deposits and withdrawals.
Request parameters
key API key.
signature Signature.
nonce Nonce.
limit Limit result to that many transactions (default: 100; minimum: 1; maximum: 1000).
offset Skip that many transactions before returning results (default: 0, maximum: 200000).
include_ious (Optional) True - shows also ripple IOU transactions.
Response (JSON): success - Returns list of cryptocurrency deposits and withdrawals, where each transaction is represented as a dictionary.
currency Currency
destinationAddress Destination Address
txid Transaction Hash
amount Amount
datetime Date and Time
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Crypto-Transactions errors
Authentication errors
Limit too large Max value of limit parameter is 1000
Invalid limit Limit parameter should be number from 1 to 1000
Offset too large Offset parameter cannot be larger than 200000
Invalid offset Offset parameter needs to be a number from 0 to 200000

Open orders

This API call is cached for 10 seconds. This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/open_orders/
  Returns data for the BTC/USD currency pair.
POST https://www.bitstamp.net/api/v2/open_orders/all/API v2
  Returns data for all currency pairs.
POST https://www.bitstamp.net/api/v2/open_orders/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON): success - Returns a list of open orders, where each order is represented as a dictionary.
id Order ID.
datetime Date and time.
type Type: 0 - buy; 1 - sell.
price Price.
amount Amount.
currency_pair (if all currency pairs) Currency Pair.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Open_orders errors
Authentication errors

Order status

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/order_status/
POST https://www.bitstamp.net/api/v2/order_status/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
id Order ID.
Response (JSON)
status Open, Finished or Canceled (v2 calls only).
id (v2 calls only) Order ID.
transactions Each transaction in dictionary is represented as a list of tid, usd, price, fee, btc, datetime and type (0 - deposit; 1 - withdrawal; 2 - market trade).
amount_remaining Amount remaining.
Order_status errors
Authentication errors
Missing id POST param Id parameter missing
Invalid order id Order id parameter can only be number
Order not found. Order with that id was not found in our system

Cancel order

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/cancel_order/
POST https://www.bitstamp.net/api/v2/cancel_order/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
id Order ID.
Response (JSON): success
If https://www.bitstamp.net/api/v2/cancel_order/
id Order id.
amount Order amount.
price Order price.
type Order type.
If https://www.bitstamp.net/api/cancel_order/
"True" Order has been found and canceled.
Response (JSON): failure
error The reason for the error.
Cancel_order errors
Authentication errors
Missing id POST param Id parameter missing
Invalid order id Order id parameter can only be number
Order not found Order with that id was not found in our system
Internal error Order could not be canceled (perhaps due to internal error or trade halt). Please retry cancelling order.

Cancel all orders

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/cancel_all_orders/
  Cancels all orders on an account.
POST https://www.bitstamp.net/api/v2/cancel_all_orders/ API v2
  Cancels all orders on an account.
POST https://www.bitstamp.net/api/v2/cancel_all_orders/{currency_pair}/ API v2
  Cancels all orders for specified currency_pair on an account.
Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
This call will cancel all open orders. Optionally (v2 only) limited to one currency pair.
https://www.bitstamp.net/api/v2/cancel_all_orders/
or https://www.bitstamp.net/api/v2/cancel_all_orders/{currency_pair}/
returns a dictionary with two keys
canceled A list of canceled orders. Where each order is represented as a dictionary.
An order
id Order id.
amount Order amount.
price Order price.
type Order type.
currency_pair Currency pair formatted as "BTC/USD".
success "true" if all orders were successfully canceled and "false" otherwise.
If https://www.bitstamp.net/api/cancel_all_orders/
"true" if all orders were successfully canceled and "false" otherwise.
Cancel_all_orders errors
Authentication errors

Buy limit order

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/buy/
  Opens an order in the BTC/USD orderbook.
POST https://www.bitstamp.net/api/v2/buy/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
price Price.
limit_price (Optional) If the order gets executed, a new sell order will be placed, with "limit_price" as its price.
daily_order (Optional) Opens buy limit order which will be canceled at 0:00 UTC unless it already has been executed. Possible value: TrueAPI v2
ioc_order (Optional) An Immediate-Or-Cancel (IOC) order is an order that must be executed immediately. Any portion of an IOC order that cannot be filled immediately will be cancelled. Possible value: TrueAPI v2
fok_order (Optional) A Fill-Or-Kill (FOK) order is an order that must be executed immediately in its entirety. If the order cannot be immediately executed in its entirety, it will be cancelled. Possible value: TrueAPI v2
Response (JSON): success
id Order ID.
datetime Date and time.
type 0 (buy) or 1 (sell).
price Price.
amount Amount.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Buy errors
Authentication errors
Missing amount and/or price POST parameters Missing one or both parameters
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
Minimum order size is 25 USD / Minimum order size is 0.001 BTC Order value must be at least 25 USD / 0.001 BTC
Price is more than 20% above market price. Order price must not exceed 20% of current price
You need 'order_value' USD to open that order. You have only 'available_fiat' USD available. Check your account balance for details. Account has less 'available_fiat' than is required to make this order
Sell if executed price must be higher than buy price. 'limit_price' must be larger than 'price' parameter
Both limit_price and daily_order cannot be set. Only one of those parameters can be setAPI v2
Order could not be placed. Order could not be placed (perhaps due to internal error or trade halt). Please retry placing order.

Buy market order

07FC3049-12DA-4CCA-A282-D7DA834035BF Created with sketchtool. By placing a market order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen.

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/v2/buy/market/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
Response (JSON): success
id Order ID.
datetime Date and time.
type 0 (buy) or 1 (sell).
price Price.
amount Amount.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Market buy errors
Authentication errors
Missing amount and/or price POST parameters Missing one or both parameters
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
Minimum order size is 25 USD / Minimum order size is 0.001 BTC Order value must be at least 25 USD / 0.001 BTC
You can only buy 'amount' 'currency'. Check your account balance for details. Account has less 'available_currency' than is required to make this order
Maximum market buy amount at the moment is 'amount' 'currency'. Please use limit order instead. Order amount exceeds the limit amount set for market buy orders
Order could not be placed. Order could not be placed (perhaps due to internal error or trade halt). Please retry placing order.

Buy instant order

07FC3049-12DA-4CCA-A282-D7DA834035BF Created with sketchtool. By placing an instant order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen.

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/v2/buy/instant/{currency_pair}/ API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
Response (JSON): success
id Order ID.
datetime Date and time.
type 0 (buy) or 1 (sell).
price Price.
amount Amount.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Instant buy errors
Authentication errors
Missing amount and/or price POST parameters Missing one or both parameters
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
Minimum order size is 25 USD / Minimum order size is 0.001 BTC Order value must be at least 25 USD / 0.001 BTC
You can only buy 'amount' 'currency'. Check your account balance for details. Account has less 'available_currency' than is required to make this order
Order could not be placed. Order could not be placed (perhaps due to internal error or trade halt). Please retry cancelling order.

Sell limit order

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/sell/
  Opens an order in the BTC/USD orderbook.
POST https://www.bitstamp.net/api/v2/sell/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
price Price.
limit_price (Optional) If the order gets executed, a new buy order will be placed, with "limit_price" as its price.
daily_order (Optional) Opens sell limit order which will be canceled at 0:00 UTC unless it already has been executed. Possible value: TrueAPI v2
ioc_order (Optional) An Immediate-Or-Cancel (IOC) order is an order that must be executed immediately. Any portion of an IOC order that cannot be filled immediately will be cancelled. Possible value: TrueAPI v2
fok_order (Optional) A Fill-Or-Kill (FOK) order is an order that must be executed immediately in its entirety. If the order cannot be immediately executed in its entirety, it will be cancelled. Possible value: TrueAPI v2
Response (JSON): success
id Order ID.
datetime Date and time.
type 0 (buy) or 1 (sell).
price Price.
amount Amount.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Sell errors
Authentication errors
Missing amount and/or price POST parameters Missing one or both parameters
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
Minimum order size is 25 USD / Minimum order size is 0.001 BTC Order value must be at least 25 USD / 0.001 BTC
Price is more than 20% below market price. Order price must not exceed 20% of current price
You have only 'available_btc' BTC available. Check your account balance for details. Account has less 'available_btc' than is required to make this order
Buy if executed price must be lower than sell price. 'limit_price' must be lower than 'price' parameter
Both limit_price and daily_order cannot be set. Only one of those parameters can be setAPI v2
Order could not be placed. Order could not be placed (perhaps due to internal error or trade halt). Please retry placing order.

Sell market order

07FC3049-12DA-4CCA-A282-D7DA834035BF Created with sketchtool. By placing a market order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen.

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/v2/sell/market/{currency_pair}/API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
Response (JSON): success
id Order ID.
datetime Date and time.
type 0 (buy) or 1 (sell).
price Price.
amount Amount.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Market sell errors
Authentication errors
Missing amount and/or price POST parameters Missing one or both parameters
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
Minimum order size is 25 USD / Minimum order size is 0.001 BTC Order value must be at least 25 USD / 0.001 BTC
You can only sell 'amount' 'currency'. Check your account balance for details. Account has less 'available_currency' than is required to make this order
No buy orders for currency pair 'currency_pair' The buy side of the orderbook for 'currency_pair' is empty, therefore a market sell order cannot be placed
Maximum market sell amount at the moment is 'amount' 'currency'. Please use limit order instead. Order amount exceeds the limit amount set for market sell orders
Order could not be placed. Order could not be placed (perhaps due to internal error or trade halt). Please retry placing order.

Sell instant order

07FC3049-12DA-4CCA-A282-D7DA834035BF Created with sketchtool. By placing an instant order you acknowledge that the execution of your order depends on the market conditions and that these conditions may be subject to sudden changes that cannot be foreseen.

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/v2/sell/instant/{currency_pair}/ API v2
  Supported values for currency_pair: btcusd, btceur, btcgbp, btcpax, btcusdc, gbpusd, gbpeur, eurusd, xrpusd, xrpeur, xrpbtc, xrpgbp, xrppax, ltcusd, ltceur, ltcbtc, ltcgbp, ethusd, etheur, ethbtc, ethgbp, ethpax, ethusdc, bchusd, bcheur, bchbtc, bchgbp, paxusd, paxeur, paxgbp, xlmbtc, xlmusd, xlmeur, xlmgbp, linkusd, linkeur, linkgbp, linkbtc, linketh, omgusd, omgeur, omggbp, omgbtc, usdcusd, usdceur, daiusd, kncusd, knceur, kncbtc, mkrusd, mkreur, mkrbtc, zrxusd, zrxeur, zrxbtc, gusdusd
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
amount_in_counter (Optional) Instant sell orders allow you to sell an amount of the base currency determined by the value of it in the counter-currency. Amount_in_counter sets the amount parameter to refer to the counter currency instead of the base currency of the selected trading pair. Possible value: TrueAPI v2
Response (JSON): success
id Order ID.
datetime Date and time.
type 0 (buy) or 1 (sell).
price Price.
amount Amount.
Response (JSON): failure
status (v2 calls only) "error"
reason (v2 calls only) The reason for the error.
Instant sell errors
Authentication errors
Missing amount and/or price POST parameters Missing one or both parameters
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
Minimum order size is 25 USD / Minimum order size is 0.001 BTC Order value must be at least 25 USD / 0.001 BTC
You can only sell 'amount' 'currency'. Check your account balance for details. Account has less 'available_currency' than is required to make this order
Order could not be placed. Order could not be placed (perhaps due to internal error or trade halt). Please retry placing order.

'Order could not be placed' error response

Should you receive the error response 'Order could not be placed' when trying to place an order, please retry order placement.

Withdrawal requests

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/withdrawal_requests/
POST https://www.bitstamp.net/api/v2/withdrawal-requests/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
timedelta (Optional, default 86400) Withdrawal requests from number of seconds ago to now (max. 50000000).
Response (JSON)
id Withdrawal ID.
datetime Date and time.
type 0 (SEPA), 2 (WIRE transfer), 1 (BTC), 14 (XRP), 15 (LTC), 16 (ETH), 17 (BCH), 19 (XLM), 18 (PAX), 20 (LINK), 21 (OMG), 22 (USDC), 27 (DAI), 28 (KNC), 29 (MKR), 30 (ZRX), 31 (GUSD)
currency (v2 calls only) Currency.
amount Amount.
status 0 (open), 1 (in process), 2 (finished), 3 (canceled) or 4 (failed).
data (v1 calls only) Additional withdrawal request data.
address (crypto withdrawals only) Withdrawal address.
transaction_id (crypto withdrawals only) Transaction id.
Withdrawal_requests errors
Authentication errors
Invalid timedelta Timedelta needs to have only numeric characters.
Timedelta too large Timedelta too large.

Bitcoin withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/bitcoin_withdrawal/
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Bitcoin amount.
address Bitcoin address.
Response (JSON)
id Withdrawal ID.
BTC withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Bitcoin withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Bitcoin address API key is set for withdrawing to another Bitcoin address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' BTC available. Check your account balance for details Account has less 'available' BTC that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Ensure this value is greater than or equal to 0.00006 Minimum withdrawal amount is 0.00006.
Ensure this value has at least 25 characters (it has x)
Ensure this value has at most 90 characters (it has x)
Address parameter must be between 25 and 90 characters long.

XRP withdrawal

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/v2/xrp_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount XRP amount.
address XRP address.
destination_tag (Optional) Address destination tag.
Response (JSON)
id Withdrawal ID.
XRP withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
XRP withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified XRP address API key is set for withdrawing to another XRP address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' XRP available. Check your account balance for details Account has less 'available' XRP that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Ensure this value is greater than or equal to 20 Minimum withdrawal amount is 20.
Ensure this value has at least 25 characters (it has x)
Ensure this value has at most 34 characters (it has x)
Address parameter must be between 25 and 34 characters long.
Failed to access the Ripple network. Please try again later The Ripple network is down.

Litecoin withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/ltc_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Litecoin amount.
address Litecoin address.
Response (JSON)
id Withdrawal ID.
LTC withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Litecoin withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Litecoin address API key is set for withdrawing to another Litecoin address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' LTC available. Check your account balance for details Account has less 'available' LTC that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Ensure this value is greater than or equal to 0.001 Minimum withdrawal amount is 0.001.
Ensure this value has at least 25 characters (it has x)
Ensure this value has at most 34 characters (it has x)
Address parameter must be between 25 and 34 characters long.

Ether withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/eth_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Ether amount.
address Ether address.
Response (JSON)
id Withdrawal ID.
ETH withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Ether withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Ether address API key is set for withdrawing to another Ether address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' ETH available. Check your account balance for details Account has less 'available' ETH that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Ensure this value is greater than or equal to 0.001 Minimum withdrawal amount is 0.001.
Ensure this value has at least 40 characters (it has x)
Ensure this value has at most 42 characters (it has x)
Address parameter must be between 40 and 42 characters long.

Bitcoin Cash withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/bch_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Bitcoin Cash amount.
address Bitcoin Cash address.
Response (JSON)
id Withdrawal ID.
BCH withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Bitcoin Cash withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Bitcoin Cash address API key is set for withdrawing to another Bitcoin Cash address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' BCH available. Check your account balance for details Account has less 'available' BCH that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Ensure this value is greater than or equal to 0.001 Minimum withdrawal amount is 0.001.
Ensure this value has at least 25 characters (it has x)
Ensure this value has at most 34 characters (it has x)
Address parameter must be between 25 and 34 characters long.

Stellar Lumens withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/xlm_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Stellar Lumens amount.
address Stellar Lumens address.
memo_id (Optional) Address memo id.
Response (JSON)
id Withdrawal ID.
XLM withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Stellar Lumens withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Stellar Lumens address API key is set for withdrawing to another Stellar Lumens address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' XLM available. Check your account balance for details Account has less 'available' XLM that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Paxos Standard withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/pax_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Paxos Standard amount.
address Paxos Standard address.
Response (JSON)
id Withdrawal ID.
PAX withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Paxos Standard withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Paxos Standard address API key is set for withdrawing to another Paxos Standard address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' PAX available. Check your account balance for details Account has less 'available' PAX that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/link_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Chainlink amount.
address Chainlink address.
Response (JSON)
id Withdrawal ID.
LINK withdrawal errors

OMG Network withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/omg_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount OMG Network amount.
address OMG Network address.
Response (JSON)
id Withdrawal ID.
OMG withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
OMG Network withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified OMG Network address API key is set for withdrawing to another OMG Network address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' OMG available. Check your account balance for details Account has less 'available' OMG that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

USD Coin withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/usdc_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount USD Coin amount.
address USD Coin address.
Response (JSON)
id Withdrawal ID.
USDC withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
USD Coin withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified USD Coin address API key is set for withdrawing to another USD Coin address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' USDC available. Check your account balance for details Account has less 'available' USDC that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

DAI withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/dai_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount DAI amount.
address DAI address.
Response (JSON)
id Withdrawal ID.
DAI withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
DAI withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified DAI address API key is set for withdrawing to another DAI address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' DAI available. Check your account balance for details Account has less 'available' DAI that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Kyber Network withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/knc_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Kyber Network amount.
address Kyber Network address.
Response (JSON)
id Withdrawal ID.
KNC withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Kyber Network withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Kyber Network address API key is set for withdrawing to another Kyber Network address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' KNC available. Check your account balance for details Account has less 'available' KNC that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Maker withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/mkr_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Maker amount.
address Maker address.
Response (JSON)
id Withdrawal ID.
MKR withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Maker withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Maker address API key is set for withdrawing to another Maker address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' MKR available. Check your account balance for details Account has less 'available' MKR that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

0x withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/zrx_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount 0x amount.
address 0x address.
Response (JSON)
id Withdrawal ID.
ZRX withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
0x withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified 0x address API key is set for withdrawing to another 0x address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' ZRX available. Check your account balance for details Account has less 'available' ZRX that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Gemini Dollar withdrawal

This call will be executed on the account, to which the used API key is bound to. This call is for your main account only.

Request
POST https://www.bitstamp.net/api/v2/gusd_withdrawal/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Gemini Dollar amount.
address Gemini Dollar address.
Response (JSON)
id Withdrawal ID.
GUSD withdrawal errors
Authentication errors
Missing amount and/or address POST parameters One or both parameters missing.
User not verified Your account needs to be verified before you can use this endpoint.
Gemini Dollar withdrawals are currently unavailable for your account Contact support for additional information.
Not allowed to withdraw to specified Gemini Dollar address API key is set for withdrawing to another Gemini Dollar address.
Enter a number. Use "." as a decimal point Amount parameter can only be number.
You have only 'available' GUSD available. Check your account balance for details Account has less 'available' GUSD that are required to make this withdrawal.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Ripple withdrawal

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/ripple_withdrawal/
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Currency amount.
address XRP address.
currency Currency.
Response (JSON)
Returns "true" if successful.
Ripple withdrawal errors
Authentication errors
Missing amount and/or address and/or currency POST parameters One or all parameters are missing
User not verified You need to verify account before withdrawal
XRP withdrawals are currently unavailable for your account. Contact support for additional information.
Ensure this value has at least 25 characters (it has x)
Ensure this value has at most 50 characters (it has x)
Address parameter must be between 25 and 50 characters long
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
You have only 'available' 'currency' available. Check your account balance for details. Account has less 'available' 'currency' than is required to make this withdrawal
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Bitcoin deposit address

Request
POST https://www.bitstamp.net/api/bitcoin_deposit_address/
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your BTC deposit address.
BTC deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

XRP deposit address

This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/v2/xrp_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your XRP deposit address and destination tag.
XRP deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Litecoin deposit address

Request
POST https://www.bitstamp.net/api/v2/ltc_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your LTC deposit address.
LTC deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Ether deposit address

Request
POST https://www.bitstamp.net/api/v2/eth_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your ETH deposit address.
ETH deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Address not ready due to network congestion. Please try again in few minutes We couldn't provide you with an address due to network congestion.

Bitcoin Cash deposit address

Request
POST https://www.bitstamp.net/api/v2/bch_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your BCH deposit address.
BCH deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Stellar Lumens deposit address

Request
POST https://www.bitstamp.net/api/v2/xlm_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your XLM deposit address.
XLM deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Paxos Standard deposit address

Request
POST https://www.bitstamp.net/api/v2/pax_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your PAX deposit address.
PAX deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.
Request
POST https://www.bitstamp.net/api/v2/link_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your LINK deposit address.
LINK deposit address errors

OMG Network deposit address

Request
POST https://www.bitstamp.net/api/v2/omg_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your OMG deposit address.
OMG deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

USD Coin deposit address

Request
POST https://www.bitstamp.net/api/v2/usdc_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your USDC deposit address.
USDC deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

DAI deposit address

Request
POST https://www.bitstamp.net/api/v2/dai_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your DAI deposit address.
DAI deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Kyber Network deposit address

Request
POST https://www.bitstamp.net/api/v2/knc_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your KNC deposit address.
KNC deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Maker deposit address

Request
POST https://www.bitstamp.net/api/v2/mkr_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your MKR deposit address.
MKR deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

0x deposit address

Request
POST https://www.bitstamp.net/api/v2/zrx_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your ZRX deposit address.
ZRX deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Gemini Dollar deposit address

Request
POST https://www.bitstamp.net/api/v2/gusd_address/ API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your GUSD deposit address.
GUSD deposit address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Ripple IOU deposit address

This API call is cached for 60 seconds. This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/ripple_address/
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON)
Returns your Ripple IOU deposit address.
Ripple_address errors
Authentication errors
User not verified Your account needs to be verified before you can use this endpoint.
Your deposits are currently disabled No new deposits can be made at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Unconfirmed bitcoin deposits

This API call is cached for 60 seconds. This call will be executed on the account (Sub or Main), to which the used API key is bound to.

Request
POST https://www.bitstamp.net/api/unconfirmed_btc/
Request parameters
key API key.
signature Signature.
nonce Nonce.
Response (JSON) - list of unconfirmed bitcoin transactions. Each transaction is represented as dictionary
amount Bitcoin amount.
address Deposit address used.
confirmations Number of confirmations.
Unconfirmed_btc errors
Authentication errors

Transfer balance from Sub to Main account

Transfers the desired balance from a Sub Account to your Main Account. Can be called by either the Main Account or a Sub Account, but requires a permission in both cases. The subAccount parameter must be provided if the Main Account is initiating the call. If a Sub Account is making the call, then it is the target Sub Account for the transfer and no further clarification is required. In that case, passing this parameter will have no additional effect.

Request
POST https://www.bitstamp.net/api/v2/transfer-to-main/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
currency Currency.
subAccount (Optional) The Sub Account unique identifier.
Response (JSON)
status "ok" or "error"
reason (available only if status is "error") Additional error info.
Transfer-to-main errors
Authentication errors
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
You have only 'available' 'currency' available. Check your account balance for details. Account has less 'available_currency' than is required to make this transfer
Select a valid choice. X is not one of the available choices. X is not valid currency. Possible choices USD, EUR, GBP, BTC, XRP, LTC, ETH, BCH, XLM, PAX, LINK, OMG, USDC, DAI, KNC, MKR, ZRX, GUSD.
Sub account with identifier "X" does not exist. Can't find sub account with id X.

Transfer balance from Main to Sub Account

Transfers the desired balance from your Main Account to a Sub Account, specified by the subAccount parameter. This call can only be performed by your Main Account.

Request
POST https://www.bitstamp.net/api/v2/transfer-from-main/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount Amount.
currency Currency.
subAccount The Sub Account unique identifier.
Response (JSON)
status "ok" or "error"
reason (available only if status is "error") Additional error info.
Transfer-from-main errors
Authentication errors
'parameter': Enter a number. Use "." as a decimal point. 'parameter' can only be number
You have only 'available' 'currency' available. Check your account balance for details. Account has less 'available_currency' than is required to make this transfer
Select a valid choice. X is not one of the available choices. X is not valid currency. Possible choices USD, EUR, GBP, BTC, XRP, LTC, ETH, BCH, XLM, PAX, LINK, OMG, USDC, DAI, KNC, MKR, ZRX, GUSD.
Sub account with identifier "X" does not exist. Can't find sub account with id X.

Open bank withdrawal

Opens a bank withdrawal request (SEPA or international). Withdrawal requests opened via API are automatically confirmed (no confirmation e-mail will be sent), but are processed just like withdrawals opened through the platform's interface. This call can only be performed by your Main Account.

Request
POST https://www.bitstamp.net/api/v2/withdrawal/open/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
amount The amount to withdraw.
account_currency The balance from which you wish to withdraw. Can be either "USD", "EUR" or "GBP".
name Full user or company name.
iban User or company IBAN.
bic The target bank BIC.
address User or company address.
postal_code User or company postal code.
city User or company city.
country User or company country. Country codes must be in accordance with the ISO 3166-1 standard (use two character Alpha-2 codes). Disclaimer: Not all country choices listed at this reference URL are supported. For a detailed list please refer to our platform's withdrawal interfaces.
type Type of the withdrawal request ("sepa" or "international").
bank_name (international withdrawals only) Target bank name.
bank_address (international withdrawals only) Target bank address.
bank_postal_code (international withdrawals only) Target bank postal code.
bank_city (international withdrawals only) Target bank city.
bank_country (international withdrawals only) Target bank country. Country codes must be in accordance with the ISO 3166-1 standard (use two character Alpha-2 codes). Disclaimer: Not all country choices listed at this reference URL are supported. For a detailed list please refer to our platform's withdrawal interfaces.
currency (international withdrawals only) The currency in which the funds should be withdrawn (may involve conversion fees). Currency codes must be in accordance with the ISO 4217 standard. Disclaimer: Not all currency choices listed at this reference URL are supported. For a detailed list please refer to our platform's withdrawal interfaces.
comment (Optional) Withdrawal comment.
Response (JSON): success
id Id of the opened withdrawal request.
Response (JSON): failure
status "error"
reason (available only if status is "error") Additional error info.
Open bank withdrawal errors
Authentication errors
Opening bank withdrawals with sub account API keys is not supported. This API endpoint can only be utilized by your main account.
'X': ['This field is required.'] Parameter X is required for this call.
'X': ['Select a valid choice. Y is not one of the available choices.'] Y is not a valid value for parameter X.
Bank withdrawals temporarily disabled. No new bank withdrawals can be opened at this time.
Unsupported withdrawal type (must be either SEPA or international). When opening bank withdrawals, you must specify one of the two supported types: SEPA or international.
You have only 'amount' currency available. Check your account balance for details. To open this withdrawal, your balance must have at least 'amount' of target currency available.
'X': ['Enter a number. Use "." as a decimal point.'] Parameter X can only be a decimal number.
Your withdrawals are currently disabled No new withdrawals can be opened at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Bank withdrawal status

Checks the status of a bank withdrawal request. This call can only be performed by your Main Account.

Request
POST https://www.bitstamp.net/api/v2/withdrawal/status/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
id ID of the withdrawal request.
Response (JSON): success
status Status of the withdrawal request.
Response (JSON): failure
status "error"
reason The reason for the error.
Bank withdrawal status errors
Authentication errors
Performing bank withdrawal status checks with sub account API keys is not supported. This API endpoint can only be utilized by your main account.
Missing parameters: [...]. Parameters stated in the list ([...]) are required for this call.
No bank withdrawal with id=X found. Could not find any bank withdrawal with the id X.

Cancel bank withdrawal

Cancels a bank withdrawal request. This call can only be performed by your Main Account.

Request
POST https://www.bitstamp.net/api/v2/withdrawal/cancel/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
id ID of the withdrawal request.
Response (JSON): success
id ID of the cancelled withdrawal request.
amount Amount of the cancelled withdrawal request.
currency Currency of the cancelled withdrawal request.
account_currency Account currency (balance currency from which the withdrawal was requested) of the cancelled withdrawal request.
type The type of the cancelled withdrawal request.
Response (JSON): failure
status "error"
reason The reason for the error.
Cancel bank withdrawal errors
Authentication errors
Cancelling bank withdrawals with sub account API keys is not supported. This API endpoint can only be utilized by your main account.
Missing parameters: [...]. Parameters stated in the list ([...]) are required for this call.
No active bank withdrawal with id=X found. Could not find any active bank withdrawal with the id X. Will return the same response for already cancelled withdrawal requests.
Cannot cancel a withdrawal in process (id=X). The bank withdrawal request with id=X is currently being processed and cannot be cancelled.
Your withdrawals are currently disabled No bank withdrawals can be canceled at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

New liquidation address

Creates new liquidation address which will automatically sell your BTC for specified liquidation_currency.

Request
POST https://www.bitstamp.net/api/v2/liquidation_address/new/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
liquidation_currency Deposited BTCs will be automatically converted to liquidation_currency.
address_format Address format. Can be either "P2SHP2WSH" or "BECH32".
Response (JSON): success
address Address set for automatic conversion.
Response (JSON): failure
status "error"
reason The reason for the error.
New liquidation address errors
Authentication errors
Missing liquidation_currency parameter. Parameter liquidation_currency is required for this call.
Invalid currency. or Currency [...] not supported. Invalid liquidation_currency.
Cannot create new address, please try later. At the moment we can't create new deposit address. Try again later.
Invalid address format. Invalid address_format.
Your trading features are currently disabled No new liquidation addresses can be created at this time. If a URL is provided you can follow it to resolve any issues which might be causing this.

Liquidation address info

Shows transactions (BTC to liquidation_currency) for liquidation address.

Request
POST https://www.bitstamp.net/api/v2/liquidation_address/info/API v2
Request parameters
key API key.
signature Signature.
nonce Nonce.
address (Optional) Shows transactions for specific liquidation address or for all users liquidation addresses.
Response (JSON): success
address Address for automatic conversion.
currency_pair Currency pair used for automatic conversion.
transactions List of JSON objects which include order_id(conversion order id), count(number of transactions) and trades (JSON with exchange_rate, btc_amount and fees).
Response (JSON): failure
status "error"
reason The reason for the error.
Liquidation address info errors
Authentication errors
Address not found. Provided address is wrong.