NAV Navigation
cURL Python Java Node.JS

Bitpanda Pro API v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Introduction

The Bitpanda Pro API is designed to allow programmatic access to exchange features. This documentation provides information on the available functionality of the Bitpanda Pro. We provide two APIs: HTTP REST and WebSockets. For detailed information about our API visit the Rest API Overview section or the WSS Overview section.

Rate limits

Both Bitpanda Pro REST and Websocket APIs are rate limited. The limits are counted by IP addresses and per account.

If requests from one IP address exceed 240 requests per minute, the connection will be throttled and requests will be blocked for the next hour.

On authenticated endpoints, there is a limit of 200 requests per minute. Accounts that violate this limit will be throttled for the next minute with an HTTP status code 429. Please note, that requests are counted per account, not per API key. The bp-remaining-quota response header reports the number of remaining requests before a client is throttled. If that header is not present, the request did not count towards your rate limit.

If for one or another reason requests are blocked due to exceeding rate limits, it means you are polling the REST API too often or using it in a way it was not designed to. For users who need high-frequency connections and realtime experience, we recommend using the Websocket API.

Websocket API puts a rate limit of 30 connections per minute, after which subscribers will be blocked with an HTTP status code 429.

Order placement limits

Each user can have at most 200 open orders at a given time. This limit is global, across all instruments. When submitting a new order that exceeds this limit, it will be rejected with an HTTP status 422 and an error code MAX_OPEN_ORDERS_EXCEEDED.

Getting started

Base URLs:

Authentication

The Bitpanda Pro API requires an api key to access private endpoints. You can generate API keys via the Bitpanda Pro website. Our knowledge base contains a detailed guide on how to work with API keys.

⚠️ Never share an API key, if you suspect that an API key was compromised revoke it immediately.

When generating an API key, you may select one or more scopes for the key.

You may optionally add an IP restriction. Any request using that API key is rejected, unless the source IP of the request is one of the trusted IPs.

⚠️ Always select the minimal required scope for an api key. We recommend to set one or more trusted IPs to further harden API keys with scope Trade or Withdraw.

Requests to private endpoints MUST use the Bearer Token Scheme to be authenticated. The API key must be transmitted via the Authorization header with the Bearer scheme

Authorization: Bearer eyJvcmciOiJiaXRwYW5kYS1nZSIsImFsZyI6IlJTMjU2Iiwia2lkIjoiZXhjaGFuZ2UtbGl2ZSJ9.eyJhdW...

To protect API keys and sensitive data in transit, all requests to the Bitpanda Pro API MUST use TLS encryption. Plain HTTP requests are not accepted.

⚠️ Make sure that your client validates the server certificate and aborts if validation fails.

Authenticated requests are subject to rate limiting (up to 200 requests per minute). The bp-remaining-quota response header reports the number of remaining requests before a client is throttled. If that header is not present, the request did not count towards your rate limit.

Public

Everything that is publicly available without any authorisation

Currencies

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/currencies \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/currencies', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/currencies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/currencies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /currencies

Get a list of all available currencies.

Example responses

200 Response

[
  {
    "code": "BEST",
    "precision": 8
  },
  {
    "code": "XRP",
    "precision": 8
  },
  {
    "code": "MIOTA",
    "precision": 8
  },
  {
    "code": "EUR",
    "precision": 2
  }
]

Responses

Status Meaning Description Schema
200 OK Array of available currencies Currency

Candlesticks

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/candlesticks/{instrument_code}?unit=HOURS&period=1&from=2019-10-03T04%3A59%3A59.999Z&to=2019-10-03T07%3A59%3A59.999Z \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/candlesticks/{instrument_code}', params={
  'unit': 'HOURS',  'period': '1',  'from': '2019-10-03T04:59:59.999Z',  'to': '2019-10-03T07:59:59.999Z'
}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/candlesticks/{instrument_code}?unit=HOURS&period=1&from=2019-10-03T04%3A59%3A59.999Z&to=2019-10-03T07%3A59%3A59.999Z");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/candlesticks/{instrument_code}?unit=HOURS&period=1&from=2019-10-03T04%3A59%3A59.999Z&to=2019-10-03T07%3A59%3A59.999Z',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /candlesticks/{instrument_code}

Get instrument's candlesticks for a specified time period.

Parameters

Name In Type Required Description
unit query string true Defines the unit of candlestick TimeGranularity
period query number true Defines the period of candlestick Granularity
from query MarketTime true Defines start of a query search
to query MarketTime true Defines end of a query search
instrument_code path Instrument true Defines market by using unique instrument

Example responses

200 Response

[
  {
    "last_sequence": 49838,
    "instrument_code": "BTC_EUR",
    "granularity": {
      "unit": "HOURS",
      "period": 1
    },
    "high": "7658.87",
    "low": "7633.86",
    "open": "7634.26",
    "close": "7633.86",
    "total_amount": "0.27459",
    "volume": "2097.5213865",
    "time": "2019-10-03T04:59:59.999Z"
  },
  {
    "last_sequence": 49864,
    "instrument_code": "BTC_EUR",
    "granularity": {
      "unit": "HOURS",
      "period": 1
    },
    "high": "7638.46",
    "low": "7600.0",
    "open": "7630.76",
    "close": "7601.84",
    "total_amount": "1.43793",
    "volume": "10960.99153",
    "time": "2019-10-03T05:59:59.999Z"
  }
]

Responses

Status Meaning Description Schema
200 OK Array of Candlesticks Candlestick

Fee Groups

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/fees \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/fees', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/fees");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/fees',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /fees

Returns details of all general Fee Groups. fee_discount_rate and minimum_price_value are applied when BEST fee collection is enabled.

Example responses

200 Response

[
  {
    "fee_group_id": "default",
    "display_text": "The standard fee plan.",
    "fee_tiers": [
      {
        "volume": "0.0",
        "fee_group_id": "default",
        "maker_fee": "0.1",
        "taker_fee": "0.1"
      },
      {
        "volume": "100.0",
        "fee_group_id": "default",
        "maker_fee": "0.09",
        "taker_fee": "0.1"
      },
      {
        "volume": "250.0",
        "fee_group_id": "default",
        "maker_fee": "0.08",
        "taker_fee": "0.1"
      },
      {
        "volume": "1000.0",
        "fee_group_id": "default",
        "maker_fee": "0.07",
        "taker_fee": "0.09"
      },
      {
        "volume": "5000.0",
        "fee_group_id": "default",
        "maker_fee": "0.06",
        "taker_fee": "0.08"
      },
      {
        "volume": "10000.0",
        "fee_group_id": "default",
        "maker_fee": "0.05",
        "taker_fee": "0.07"
      },
      {
        "volume": "20000.0",
        "fee_group_id": "default",
        "maker_fee": "0.05",
        "taker_fee": "0.06"
      },
      {
        "volume": "50000.0",
        "fee_group_id": "default",
        "maker_fee": "0.05",
        "taker_fee": "0.05"
      }
    ],
    "fee_discount_rate": "25.0",
    "minimum_price_value": "0.12"
  }
]

Responses

Status Meaning Description Schema
200 OK Available fee groups and their fee tiers FeeGroup

Instruments

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/instruments \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/instruments', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/instruments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/instruments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /instruments

Get a list of all available trade instruments

Example responses

200 Response

[
  {
    "state": "ACTIVE",
    "base": {
      "code": "BTC",
      "precision": 8
    },
    "quote": {
      "code": "EUR",
      "precision": 2
    },
    "amount_precision": 5,
    "market_precision": 2,
    "min_size": "10.0"
  },
  {
    "state": "ACTIVE",
    "base": {
      "code": "BTC",
      "precision": 8
    },
    "quote": {
      "code": "USDT",
      "precision": 6
    },
    "amount_precision": 5,
    "market_precision": 2,
    "min_size": "10.0"
  },
  {
    "state": "ACTIVE",
    "base": {
      "code": "BEST",
      "precision": 8
    },
    "quote": {
      "code": "BTC",
      "precision": 8
    },
    "amount_precision": 4,
    "market_precision": 8,
    "min_size": "0.001"
  },
  {
    "state": "ACTIVE",
    "base": {
      "code": "BEST",
      "precision": 8
    },
    "quote": {
      "code": "USDT",
      "precision": 6
    },
    "amount_precision": 0,
    "market_precision": 5,
    "min_size": "10.0"
  },
  {
    "state": "ACTIVE",
    "base": {
      "code": "ETH",
      "precision": 8
    },
    "quote": {
      "code": "EUR",
      "precision": 2
    },
    "amount_precision": 4,
    "market_precision": 2,
    "min_size": "10.0"
  },
  {
    "state": "SUSPENDED",
    "base": {
      "code": "XRP",
      "precision": 8
    },
    "quote": {
      "code": "BTC",
      "precision": 8
    },
    "amount_precision": 0,
    "market_precision": 8,
    "min_size": "0.001"
  }
]

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» base CurrencyCode true none Currency code for any monetary currency.
» quote CurrencyCode true none Currency code for any monetary currency.
» min_size BigDecimal true none A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
» amount_precision number true none The maximum allowed precision of the amount when creating an order
» market_precision number true none The maximum allowed precision of the price when creating an order
» state string true none Current status of the instrument

Enumerated Values

Property Value
state ACTIVE
state SUSPENDED
state IN_MAINTENANCE
state CLOSED
state UNDEFINED

Order Book

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/order-book/{instrument_code} \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/order-book/{instrument_code}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/order-book/{instrument_code}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/order-book/{instrument_code}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /order-book/{instrument_code}

Get given instrument's order book.

Parameters

Name In Type Required Description
level query number false Specifies which level of order-book should be returned. Level 1 means only the best bid and ask, Level 2 is a compiled orderbook up to market precision and level 3 is a full orderbook. Orderbook level 3 is returned if no level is specified. If you wish to get regular updates about orderbooks please use our Websocket channel. Heavy usage of this endpoint may result in limited access according to our rate limits rules.
depth query number false Specifies how many ask/bids should be returned. If there are more entries available, each orderbook side is
instrument_code path Instrument true Defines market by using unique instrument

Detailed descriptions

depth: Specifies how many ask/bids should be returned. If there are more entries available, each orderbook side is truncated to the given depth. The order of entries is preserved. The depth of a level 1 orderbook cannot be limited.

Example responses

This example shows all three representations of possible responses, not an actual response. You can only get one type based on what level of order book you choose

{
  "instrument_code": "BTC_EUR",
  "time": "2019-07-08T18:01:39.106Z",
  "bids": [
    {
      "value": {
        "price": "8888.0",
        "amount": "16.464",
        "number_of_orders": 3
      }
    }
  ],
  "asks": [
    {
      "value": {
        "price": "9449.0",
        "amount": "54.46",
        "number_of_orders": 23
      }
    }
  ]
}
{
  "instrument_code": "BTC_EUR",
  "time": "2019-07-08T18:01:39.106Z",
  "bids": [
    {
      "price": "8673.0",
      "amount": "14.48",
      "number_of_orders": 2
    },
    {
      "price": "8670.0",
      "amount": "6.354",
      "number_of_orders": 12
    }
  ],
  "asks": [
    {
      "price": "8978.0",
      "amount": "624.24",
      "number_of_orders": 124
    },
    {
      "price": "9757.0",
      "amount": "12.7",
      "number_of_orders": 7
    }
  ]
}
{
  "instrument_code": "BTC_EUR",
  "time": "2019-07-08T18:01:39.106Z",
  "bids": [
    {
      "price": "8882.0",
      "amount": "0.1156316",
      "order_id": "e10c6e89-d722-48c2-849b-9a51a470c5e1"
    }
  ],
  "asks": [
    {
      "price": "8945.4",
      "amount": "0.1",
      "order_id": "7b3b4a81-592d-4dc2-be1e-3f01e3daf8bd"
    },
    {
      "price": "8945.9",
      "amount": "0.95574218",
      "order_id": "7950480f-6264-48d9-b754-a4be4bbd0d74"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK This example shows all three representations of possible responses, not an actual response. You can only get one type based on what level of order book you choose OrderBookSnapshot

Market Ticker

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/market-ticker \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/market-ticker', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/market-ticker");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/market-ticker',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /market-ticker

Returns statistics on all available instruments.

Example responses

200 Response

[
  {
    "instrument_code": "BTC_EUR",
    "sequence": 1337,
    "state": "ACTIVE",
    "is_frozen": 0,
    "quote_volume": "123456.78",
    "base_volume": "987.654321",
    "last_price": "9214.23",
    "best_bid": "9199.2345",
    "best_ask": "9331.9999",
    "price_change": "1200.30",
    "price_change_percentage": "42.21",
    "high": "10142.21",
    "low": "9213.89"
  },
  {
    "instrument_code": "XRP_BTC",
    "sequence": 1200,
    "state": "IN_MAINTENANCE",
    "is_frozen": 1,
    "quote_volume": "91.2345678",
    "base_volume": "123456.654321",
    "last_price": "0.12345",
    "best_bid": "0.12345",
    "best_ask": "0.12346",
    "price_change": "0.0045",
    "price_change_percentage": "-21.42",
    "high": "0.1458",
    "low": "0.0034567"
  }
]

Responses

Status Meaning Description Schema
200 OK Array of latest market-ticks MarketTick

Market Ticker For Instrument

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/market-ticker/{instrument_code} \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/market-ticker/{instrument_code}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/market-ticker/{instrument_code}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/market-ticker/{instrument_code}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /market-ticker/{instrument_code}

Get statistics on a single market.

Parameters

Name In Type Required Description
instrument_code path Instrument true Defines market by using unique instrument

Example responses

200 Response

[
  {
    "instrument_code": "BTC_EUR",
    "sequence": 1337,
    "state": "ACTIVE",
    "is_frozen": 0,
    "quote_volume": "123456.78",
    "base_volume": "987.654321",
    "last_price": "9214.23",
    "best_bid": "9199.2345",
    "best_ask": "9331.9999",
    "price_change": "1200.30",
    "price_change_percentage": "42.21",
    "high": "10142.21",
    "low": "9213.89"
  }
]

Responses

Status Meaning Description Schema
200 OK Array of Market-ticks MarketTick

Price Ticks For Instrument

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/price-ticks/{instrument_code} \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/price-ticks/{instrument_code}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/price-ticks/{instrument_code}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/price-ticks/{instrument_code}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /price-ticks/{instrument_code}

Returns price ticks for a specific market with an interval of maximum of 4 hours. Sorted by latest first.

Parameters

Name In Type Required Description
from query MarketTime false Specifies time of the oldest pricetick that should be returned.
to query MarketTime false Specifies time of the latest price-tick that should be returned.
instrument_code path Instrument true Defines market by using unique instrument

Example responses

200 Response

[
  {
    "instrument_code": "BTC_EUR",
    "price": "7442.27",
    "amount": "0.23111",
    "taker_side": "BUY",
    "volume": "1719.9830197",
    "time": "2019-10-04T07:58:10.407Z",
    "trade_timestamp": 1570175890407,
    "sequence": 50973
  },
  {
    "instrument_code": "BTC_EUR",
    "price": "7439.42",
    "amount": "0.02021",
    "taker_side": "BUY",
    "volume": "150.3506782",
    "time": "2019-10-04T07:46:09.687Z",
    "trade_timestamp": 1570175169687,
    "sequence": 50971
  },
  {
    "instrument_code": "BTC_EUR",
    "price": "7426.51",
    "amount": "0.13845",
    "taker_side": "BUY",
    "volume": "1028.2003095",
    "time": "2019-10-04T07:44:09.756Z",
    "trade_timestamp": 1570175049756,
    "sequence": 50969
  },
  {
    "instrument_code": "BTC_EUR",
    "price": "7432.31",
    "amount": "0.16467",
    "taker_side": "BUY",
    "volume": "1223.8784877",
    "time": "2019-10-04T07:38:09.658Z",
    "trade_timestamp": 1570174689658,
    "sequence": 50967
  }
]

Responses

Status Meaning Description Schema
200 OK Array of price-ticks PriceTick

Time

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/time \
  -H 'Accept: application/json'

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/time', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/time");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.exchange.bitpanda.com/public/v1/time',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /time

Returns the current server time in UTC.

Example responses

200 Response

{
  "iso": "2018-12-11T10:58:41.219Z",
  "epoch_millis": 1544525921219
}

Responses

Status Meaning Description Schema
200 OK Time Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» iso MarketTime(date-time) true none Zoned date time value which adheres to RFC3339. All market times are in UTC.
» epoch_millis number true none elapsed milliseconds since Unix Epoch.

Private

Everything regarding user accounts and order management. Private endpoints are protected by api keys and rate limits.

Balances

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/balances \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/balances', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/balances");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/balances',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/balances

Account balances

Returns the balance details for an account. If you which to have real time balance updates, it is recommented to use our websocket Account History Channel. This endpoint is subject to rate limits described in our rate limits section.

Example responses

200 Response

{
  "account_id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
  "balances": [
    {
      "account_id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
      "currency_code": "BTC",
      "change": "0.50000000",
      "available": "10.0",
      "locked": "1.1234567",
      "sequence": 5,
      "time": "2019-04-01T13:39:17.155Z"
    },
    {
      "account_id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
      "currency_code": "ETH",
      "change": "0.50000000",
      "available": "10.0",
      "locked": "1.1234567",
      "sequence": 6,
      "time": "2019-04-01T13:39:17.155Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Balance information Account

Deposit Crypto

Code samples

# You can also use wget
curl -X POST https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "currency": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /account/deposit/crypto

Deposits for currency

Creates a new deposit address for the given currency code. Make sure to use a valid api key with the scope WITHDRAW, otherwise this operation will be rejected. The api key can be generated via the user interface at https://exchange.bitpanda.com/account/api/keys.

Body parameter

{
  "currency": "string"
}

Parameters

Name In Type Required Description
body body object true none
» currency body string false Currency code of crypto asset

Example responses

200 Response

{
  "address": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
  "destination_tag": null,
  "enabled": true,
  "is_smart_contract": false
}

Responses

Status Meaning Description Schema
200 OK Deposit address created Inline

Response Schema

Crypto Deposit Address

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto/{currency_code} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto/{currency_code}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto/{currency_code}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto/{currency_code}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/deposit/crypto/{currency_code}

Returns a deposit address for the given crypto currency code. Fiat currency codes will not work! Make sure to use a valid API key with the scope WITHDRAW, otherwise this operation will be rejected. The api key can be generated via the user interface.

Parameters

Name In Type Required Description
currency_code path CurrencyCode true Defines currency by using it's unique currency code

Example responses

200 Response

{
  "address": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
  "destination_tag": null,
  "enabled": true,
  "is_smart_contract": false,
  "can_create_more": false
}

Responses

Status Meaning Description Schema
200 OK Deposit Address Inline

Response Schema

Fiat Deposit Info

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/deposit/fiat/EUR \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/deposit/fiat/EUR', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/deposit/fiat/EUR");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/deposit/fiat/EUR',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/deposit/fiat/EUR

Returns deposit information for SEPA payments. Make sure to use a valid API key with the scope WITHDRAW, otherwise this operation will be rejected. The API key can be generated via the user interface.

Example responses

200 Response

{
  "iban": "AT775700020011211250",
  "bic": "HYPTAT22XXX",
  "bank": "HYPO TIROL BANK AG",
  "address": "Meraner Strasse 8, 6020, Innsbruck, AT",
  "receiver": "Bitpanda GmbH",
  "receiver_address": "Campus 2, Jakov-Lind-Straße 2, A-1020 Vienna",
  "unique_payment_number": "12345678901"
}

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Withdraw Crypto

Code samples

# You can also use wget
curl -X POST https://api.exchange.bitpanda.com/public/v1/account/withdraw/crypto \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.exchange.bitpanda.com/public/v1/account/withdraw/crypto', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/withdraw/crypto");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "currency": "BTC",
  "amount": "1234.5678",
  "recipient": {
    "address": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
    "destination_tag": ""
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/withdraw/crypto',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /account/withdraw/crypto

Initiates a withdrawal. Make sure to use a valid api key with the scope WITHDRAW, otherwise this operation will be rejected. The api key can be generated via the user interface. 2FA is disabled and the withdraw operation will not require an approval by email. It's best practice to limit the api key to one IP address and never give out the api key. Only crypto currencies are allowed to withdraw on this endpoint! The destination_tag field is optional and only needed for currencies that supports a destination_tag.

Body parameter

{
  "currency": "BTC",
  "amount": "1234.5678",
  "recipient": {
    "address": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
    "destination_tag": ""
  }
}

Parameters

Name In Type Required Description
body body WithdrawCrypto true Withdrawal information

Example responses

200 Response

{
  "amount": "1234.5678",
  "fee": "1234.5678",
  "recipient": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
  "destination_tag": "",
  "transaction_id": "d0f8529f-f832-4e6a-9dc5-b8d5797badb2"
}

Responses

Status Meaning Description Schema
200 OK Successful withdrawal CryptoWithdraw
422 Unprocessable Entity The request is unprocessable due to various reasons.

- INVALID_PRECISION = The precision specified does not match the maximum allowed currency precision.
- SUSPENDED_WITHDRAW_FOR_ACCOUNT = The account is not allowed to withdraw. Please contact support for more information and make sure your account is verified.
- WITHDRAWAL_LIMIT_EXCEEDED = The withdrawal limit is exceeded. Daily limits are applicable within a 24 hour period.
- WITHDRAWAL_AMOUNT_TOO_LOW = The amount of the withdrawal is too low. Please checkout the limits on our homepage.
Inline

Response Schema

Withdraw Fiat

Code samples

# You can also use wget
curl -X POST https://api.exchange.bitpanda.com/public/v1/account/withdraw/fiat \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.exchange.bitpanda.com/public/v1/account/withdraw/fiat', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/withdraw/fiat");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "currency": "BTC",
  "amount": "1234.5678",
  "payout_account_id": "66756a10-3e86-48f4-9678-b634c4b135b2"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/withdraw/fiat',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /account/withdraw/fiat

Initiates a withdrawal. Make sure to use a valid api key with the scope WITHDRAW, otherwise this operation will be rejected. The api key can be generated via the user interface. 2FA is disabled and the withdrawal operation will not require an approval by E-Mail. A best practice is to limit the api key to one IP and never hand out the api key. Only EUR can be withdrawn on this endpoint!

Body parameter

{
  "currency": "BTC",
  "amount": "1234.5678",
  "payout_account_id": "66756a10-3e86-48f4-9678-b634c4b135b2"
}

Parameters

Name In Type Required Description
body body WithdrawFiat true Information required for fiat withdrawal.

Example responses

200 Response

{
  "transaction_id": "54236cd0-4413-11e9-93fb-5fea7e5b5df6"
}

Responses

Status Meaning Description Schema
200 OK Withdrawal initiated Inline
422 Unprocessable Entity The request is unprocessable due to various reasons.

- INVALID_PRECISION = The precision specified does not match the maximum allowed currency precision.
- SUSPENDED_WITHDRAW_FOR_ACCOUNT = The account is not allowed to withdraw. Please contact support for more information and make sure your account is verified.
- WITHDRAWAL_LIMIT_EXCEEDED = The withdrawal limit is exceeded. Daily limits are applicable within a 24 hour period.
- WITHDRAWAL_AMOUNT_TOO_LOW = The amount of the withdrawal is too low. Please checkout the limits on our homepage.
Inline

Response Schema

Fees

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/fees \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/fees', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/fees");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/fees',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/fees

Current fees

Returns the fee tiers, the running trading volume, the active fee tier specific for an account and the BEST fee collection settings.

Example responses

200 Response

{
  "account_id": "ed524d00-820a-11e9-8f1e-69602df16d85",
  "running_trading_volume": "0.0",
  "fee_group_id": "default",
  "collect_fees_in_best": false,
  "fee_discount_rate": "25.0",
  "minimum_price_value": "0.12",
  "fee_tiers": [
    {
      "volume": "0.0",
      "fee_group_id": "default",
      "maker_fee": "0.1",
      "taker_fee": "0.1"
    },
    {
      "volume": "100.0",
      "fee_group_id": "default",
      "maker_fee": "0.09",
      "taker_fee": "0.1"
    },
    {
      "volume": "250.0",
      "fee_group_id": "default",
      "maker_fee": "0.08",
      "taker_fee": "0.1"
    },
    {
      "volume": "1000.0",
      "fee_group_id": "default",
      "maker_fee": "0.07",
      "taker_fee": "0.09"
    },
    {
      "volume": "5000.0",
      "fee_group_id": "default",
      "maker_fee": "0.06",
      "taker_fee": "0.08"
    },
    {
      "volume": "10000.0",
      "fee_group_id": "default",
      "maker_fee": "0.05",
      "taker_fee": "0.07"
    },
    {
      "volume": "20000.0",
      "fee_group_id": "default",
      "maker_fee": "0.05",
      "taker_fee": "0.06"
    },
    {
      "volume": "50000.0",
      "fee_group_id": "default",
      "maker_fee": "0.05",
      "taker_fee": "0.05"
    }
  ],
  "active_fee_tier": {
    "volume": "0.0",
    "fee_group_id": "default",
    "maker_fee": "0.1",
    "taker_fee": "0.1"
  }
}

Responses

Status Meaning Description Schema
200 OK Fee information for account AccountFeeGroup

Toggle BEST Fee Collection

Code samples

# You can also use wget
curl -X POST https://api.exchange.bitpanda.com/public/v1/account/fees \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.exchange.bitpanda.com/public/v1/account/fees', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/fees");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "collect_fees_in_best": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/fees',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /account/fees

Updates the fee toggle to enable or disable fee collection with BEST (Bitpanda Ecosystem Token). When the BEST fee collection feature is enabled a discount defined in fee_discount_rate will be deducted. In the payload example the value would be 25%. Additionally a minimum_price_value will be used for calculating how much BEST is deducted. In the example payload a price of 0.12 EUR would be used. If the price of BEST is lower than this value, then the minimum_price_value will be used for the calculation. Make sure you have enough BEST when a trade is executed, otherwise the fee discount and the minimum price value will not be applied!

Body parameter

{
  "collect_fees_in_best": true
}

Parameters

Name In Type Required Description
body body object true none
» collect_fees_in_best body boolean false none

Example responses

200 Response

{
  "account_id": "ed524d00-820a-11e9-8f1e-69602df16d85",
  "running_trading_volume": "0.0",
  "fee_group_id": "default",
  "collect_fees_in_best": true,
  "fee_discount_rate": "25.0",
  "minimum_price_value": "0.12",
  "fee_tiers": [
    {
      "volume": "0.0",
      "fee_group_id": "default",
      "maker_fee": "0.1",
      "taker_fee": "0.1"
    },
    {
      "volume": "100.0",
      "fee_group_id": "default",
      "maker_fee": "0.09",
      "taker_fee": "0.1"
    },
    {
      "volume": "250.0",
      "fee_group_id": "default",
      "maker_fee": "0.08",
      "taker_fee": "0.1"
    },
    {
      "volume": "1000.0",
      "fee_group_id": "default",
      "maker_fee": "0.07",
      "taker_fee": "0.09"
    },
    {
      "volume": "5000.0",
      "fee_group_id": "default",
      "maker_fee": "0.06",
      "taker_fee": "0.08"
    },
    {
      "volume": "10000.0",
      "fee_group_id": "default",
      "maker_fee": "0.05",
      "taker_fee": "0.07"
    },
    {
      "volume": "20000.0",
      "fee_group_id": "default",
      "maker_fee": "0.05",
      "taker_fee": "0.06"
    },
    {
      "volume": "50000.0",
      "fee_group_id": "default",
      "maker_fee": "0.05",
      "taker_fee": "0.05"
    }
  ],
  "active_fee_tier": {
    "volume": "0.0",
    "fee_group_id": "default",
    "maker_fee": "0.1",
    "taker_fee": "0.1"
  }
}

Responses

Status Meaning Description Schema
200 OK none AccountFeeGroup

Get Orders

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/orders \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/orders', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/orders

Return a paginated report on currently open orders, sorted by creation timestamp (newest first). Query parameters and filters can be used to specify if historical orders should be reported as well. If no query filters are defined, all orders which are currently active will be returned. If you want to query specific time frame parameters, from and to are mandatory, otherwise it will start from the latest orders. The maximum time frame you can query at one time is 100 days.

Parameters

Name In Type Required Description
from query MarketTime false Defines start of a query search
to query MarketTime false Defines end of a query search
instrument_code query Instrument false Filter order history by instrument code
with_cancelled_and_rejected query boolean false Return orders which have been cancelled by the user before being filled or rejected by the system as invalid. Additionally, all inactive filled orders which would return with "with_just_filled_inactive".
with_just_filled_inactive query boolean false Return order history for orders which have been filled and are no longer open. Use of "with_cancelled_and_rejected" extends "with_just_filled_inactive" and in case both are specified the latter is ignored.
with_just_orders query boolean false Returns order history for orders but does not return any trades corresponsing to the orders. It may be significanly faster and should be used if user is not interesting in trade information. Can be combined with any other filter.
max_page_size query integer false Set max desired page size. If no value is provided, it defaults to 100 results per page. The maximum upper limit of results per page is 100.
cursor query string false Pointer specifying the position from which the next pages should be returned.

Example responses

200 Response

{
  "order_history": [
    {
      "order": {
        "trigger_price": "12089.88",
        "order_id": "d453ca12-c650-46dd-9dee-66910d96bfc0",
        "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
        "instrument_code": "BTC_USDT",
        "time": "2019-08-23T10:02:31.663Z",
        "side": "SELL",
        "price": "10159.76",
        "average_price": "10159.76",
        "amount": "0.2",
        "filled_amount": "0.2",
        "type": "STOP",
        "sequence": 8,
        "status": "FILLED_FULLY"
      },
      "trades": [
        {
          "fee": {
            "fee_amount": "0.4188869",
            "fee_currency": "USDT",
            "fee_percentage": "0.1",
            "fee_group_id": "default",
            "fee_type": "TAKER",
            "running_trading_volume": "0.0"
          },
          "trade": {
            "trade_id": "ec82896f-fd1b-4cbb-89df-a9da85ccbb4b",
            "order_id": "d453ca12-c650-46dd-9dee-66910d96bfc0",
            "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
            "amount": "0.2",
            "side": "SELL",
            "instrument_code": "BTC_USDT",
            "price": "10159.76",
            "time": "2019-08-23T10:02:32.663Z",
            "sequence": 9
          }
        }
      ]
    },
    {
      "order": {
        "order_id": "5151a99e-f414-418f-8cf1-2568d0a63ea5",
        "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
        "instrument_code": "BTC_USDT",
        "time": "2019-08-23T10:01:36.773Z",
        "side": "SELL",
        "price": "12289.88",
        "amount": "0.5",
        "filled_amount": "0.0",
        "type": "LIMIT",
        "sequence": 7,
        "status": "OPEN"
      },
      "trades": []
    },
    {
      "order": {
        "order_id": "ac80d857-75e1-4733-9070-fd4288395fdc",
        "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
        "instrument_code": "BTC_USDT",
        "time": "2019-08-23T10:01:25.031Z",
        "side": "SELL",
        "price": "11089.88",
        "amount": "0.1",
        "filled_amount": "0.0",
        "type": "LIMIT",
        "sequence": 6,
        "status": "OPEN"
      },
      "trades": []
    }
  ],
  "max_page_size": 100
}

Responses

Status Meaning Description Schema
200 OK Order history for account OrderHistory

Create Order

Code samples

# You can also use wget
curl -X POST https://api.exchange.bitpanda.com/public/v1/account/orders \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.exchange.bitpanda.com/public/v1/account/orders', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "instrument_code": "BTC_EUR",
  "type": "MARKET",
  "side": "BUY",
  "amount": "1234.5678",
  "price": "1234.5678",
  "trigger_price": "1234.5678",
  "client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
  "time_in_force": "GOOD_TILL_CANCELLED"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/orders',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /account/orders

Create a new order of the type LIMIT, MARKET or STOP. LIMIT Orders support GOOD_TILL_CANCELLED, IMMEDIATE_OR_CANCELLED and FILL_OR_KILL as time_in_force options. If none is specified GOOD_TILL_CANCELLED will be used. There is a minimum size per order which can be looked up by querying the /instruments endpoint. Additionally, the precision limitations can be found there. Globally across all markets, at most 200 orders can be kept open at any given point in time. Optionally a "client_id" can be set by clients to prevent duplicate order executions. Other orders with the same "client_id" will be rejected as duplicates. The "client_id" is not the same as the "order_id" assigned from the server. Every executed order can be tracked by its "order_id" Make sure to have a valid api key with the scope TRADE, otherwise this operation will be rejected. The api key can be generated via the user interface at https://exchange.bitpanda.com/account/api/keys.

Body parameter

{
  "instrument_code": "BTC_EUR",
  "type": "MARKET",
  "side": "BUY",
  "amount": "1234.5678",
  "price": "1234.5678",
  "trigger_price": "1234.5678",
  "client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
  "time_in_force": "GOOD_TILL_CANCELLED"
}

Parameters

Name In Type Required Description
body body CreateOrder true JSON payload used to create orders

Example responses

201 Response

{
  "order_id": "d5492c24-2995-4c18-993a-5b8bf8fffc0d",
  "client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
  "account_id": "a4c699f6-338d-4a26-941f-8f9853bfc4b9",
  "instrument_code": "BTC_EUR",
  "time": "2019-08-01T08:00:44.026Z",
  "side": "BUY",
  "price": "5000",
  "amount": "1",
  "filled_amount": "0.5",
  "type": "LIMIT",
  "time_in_force": "GOOD_TILL_CANCELLED"
}

400 Response

{
  "error": "INVALID_PRICE"
}

Responses

Status Meaning Description Schema
201 Created The order is valid and was successfuly accepted. Order
400 Bad Request An invalid body was provided and therefore the request was rejected. Please check your request body.

- INVALID_ORDER_REQUEST = invalid json was sent
422 Unprocessable Entity The request is unprocessable due to various reasons.

- INSUFFICIENT_FUNDS = The account does not have enough funds
- MAX_OPEN_ORDERS_EXCEEDED = The maxmium of allowed open orders was reached, cancel some to submit new orders
- ALREADY_IN_PROGRESS = The system is processing the action, a new call does not trigger a new execution
- IN_MAINTENANCE = The instrument is currently in maintenance mode.
- NO_TRADING = Trading is currently suspended
- CLOSED_MARKET = The instrument was decommissioned and cannot be used any more
Inline

Response Schema

Close All Orders

Code samples

# You can also use wget
curl -X DELETE https://api.exchange.bitpanda.com/public/v1/account/orders \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.exchange.bitpanda.com/public/v1/account/orders', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/orders',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /account/orders

Close all orders

Submits a close request for all open orders of an account.
Optionally the user can specify either the instrument_code or a list of ids as HTTP query parameters. The instrument_code parameter will only close orders for a given instrument, while the ids parameter can be used to specify various orders regardless to which markets they belong. Calling this endpoint without any of the optional parameters will close all orders of the account. Calling this endpoint with both query parameters set is not supported.
There is an upper limit of 20 orders that can be closed at a time through the ids parameter.
The orders must be submitted by the account that the API key has been created for.
When the API returns 200 OK, it returns a list of UUIDs representing the orders that were submitted for cancellation.
Bitpanda Pro will always fill orders with best effort. Therefore, when attempting to close all orders, these orders may be in the process of being filled. In this case, Bitpanda Pro will attempt to close the orders but the order may already be partially/fully filled.
Make sure to have a valid API key with the scope TRADE, otherwise this operation will be rejected. The API key can be generated via the user interface at https://exchange.bitpanda.com/account/api/keys.

Parameters

Name In Type Required Description
instrument_code query string false Only close orders in given market (omit to close all orders)
ids query string false An array of comma separated UUIDs, of the form [UUID_1,UUID_2,UUID_3,...,UUID_N]

Example responses

200 Response

[
  "d1efc79d-f78d-4a9d-a4c0-dbe76c9a4e6f",
  "8ada8f2d-56ea-4b24-bfd4-06723dfbb3be",
  "82d36d62-9d02-4154-8686-9b16472a4a38",
  "09759fa5-8b3a-47e7-a8c7-a0833b749855",
  "6eb6a84a-eca9-4348-8c2d-cac1a18e81e7"
]

400 Response

{
  "error": "MAX_NUMBER_OF_ORDERS_TO_CLOSE_EXCEEDED"
}

404 Response

{
  "error": "INVALID_ORDER_ID"
}

Responses

Status Meaning Description Schema
200 OK The following orders ids were submitted for closing Inline
400 Bad Request The number of UUIDs to cancel exceeds the advertised upper limit Error
404 Not Found A supplied UUID value was invalid Error

Response Schema

Get Order

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/orders/{order_id}

Get information for an order by orderId

Get information for an order

Parameters

Name In Type Required Description
order_id path string(uuid) true Order id of order which should be closed.

Example responses

200 Response

{
  "order": {
    "order_id": "36bb2437-7402-4794-bf26-4bdf03526439",
    "account_id": "a4c699f6-338d-4a26-941f-8f9853bfc4b9",
    "time_last_updated": "2019-09-27T15:05:35.096Z",
    "sequence": 48782,
    "price": "7349.2",
    "filled_amount": "100.0",
    "status": "FILLED_FULLY",
    "amount": "100.0",
    "instrument_code": "BTC_EUR",
    "side": "BUY",
    "time": "2019-09-27T15:05:32.063Z",
    "type": "MARKET"
  },
  "trades": [
    {
      "fee": {
        "fee_amount": "0.0014",
        "fee_currency": "BTC",
        "fee_percentage": "0.1",
        "fee_group_id": "default",
        "fee_type": "TAKER",
        "running_trading_volume": "0.0"
      },
      "trade": {
        "trade_id": "fdff2bcc-37d6-4a2d-92a5-46e09c868664",
        "order_id": "36bb2437-7402-4794-bf26-4bdf03526439",
        "account_id": "a4c699f6-338d-4a26-941f-8f9853bfc4b9",
        "amount": "1.4",
        "side": "BUY",
        "instrument_code": "BTC_EUR",
        "price": "7341.4",
        "time": "2019-09-27T15:05:32.564Z",
        "sequence": 48670
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none OrderHistoryEntry

Close Order

Code samples

# You can also use wget
curl -X DELETE https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id} \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /account/orders/{order_id}

Close an order

Close a previously placed order. The order must be submitted by the account that the api key has been created for. Make sure to have a valid api key with the scope TRADE, otherwise this operation will be rejected. The api key can be generated via the user interface at https://exchange.bitpanda.com/account/api/keys. In some cases, orders can not be closed successfully as they have already been closed or filled. An error response will point to the reason in a such scenario.

Parameters

Name In Type Required Description
order_id path string(uuid) true Order id of order which should be closed.

Responses

Status Meaning Description Schema
204 No Content Order successfully closed None
404 Not Found Order not found, it might be already closed None
422 Unprocessable Entity Request could not be processed None

Trades For Order

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}/trades \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}/trades', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}/trades");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}/trades',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/orders/{order_id}/trades

Get trade information for a specific order.

Parameters

Name In Type Required Description
order_id path string(uuid) true none

Example responses

200 Response

{
  "trade_history": [
    {
      "fee": {
        "fee_amount": "0.4188869",
        "fee_currency": "USDT",
        "fee_percentage": "0.1",
        "fee_group_id": "default",
        "fee_type": "TAKER",
        "running_trading_volume": "0.0"
      },
      "trade": {
        "trade_id": "ec82896f-fd1b-4cbb-89df-a9da85ccbb4b",
        "order_id": "cab1ca1d-8102-4e97-b7a0-b53f66c811d0",
        "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
        "amount": "0.04123",
        "side": "SELL",
        "instrument_code": "BTC_USDT",
        "price": "10159.76",
        "time": "2019-08-23T09:33:52.433Z",
        "sequence": 4
      }
    },
    {
      "fee": {
        "fee_amount": "0.56020971",
        "fee_currency": "USDT",
        "fee_percentage": "0.1",
        "fee_group_id": "default",
        "fee_type": "TAKER",
        "running_trading_volume": "0.0"
      },
      "trade": {
        "trade_id": "b500566d-2860-4690-812c-2d8058d3b8cf",
        "order_id": "cab1ca1d-8102-4e97-b7a0-b53f66c811d0",
        "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
        "amount": "0.05514",
        "side": "SELL",
        "instrument_code": "BTC_USDT",
        "price": "10159.77",
        "time": "2019-08-23T09:33:52.432Z",
        "sequence": 3
      }
    },
    {
      "fee": {
        "fee_amount": "0.03689045",
        "fee_currency": "USDT",
        "fee_percentage": "0.1",
        "fee_group_id": "default",
        "fee_type": "TAKER",
        "running_trading_volume": "0.0"
      },
      "trade": {
        "trade_id": "d57d7cd3-fe1b-460c-9486-a4e2c0dce773",
        "order_id": "cab1ca1d-8102-4e97-b7a0-b53f66c811d0",
        "account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
        "amount": "0.00363",
        "side": "SELL",
        "instrument_code": "BTC_USDT",
        "price": "10162.66",
        "time": "2019-08-23T09:33:52.430Z",
        "sequence": 2
      }
    }
  ],
  "max_page_size": 100
}

Responses

Status Meaning Description Schema
200 OK none TradeHistory

All Trades

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/trades \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/trades', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/trades");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/trades',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/trades

Return a paginated report on past trades, sorted by timestamp (newest first). If no query parameters are defined, it returns the last 100 trades.

Parameters

Name In Type Required Description
from query MarketTime false Defines start of a query search
to query MarketTime false Defines end of a query search
instrument_code query Instrument false Filter order history by instrument_code
max_page_size query string false Set max desired page size. If no value is provided, by default a maximum of 100 results per page are returned. The maximum upper limit is 100 results per page.
cursor query string false Pointer specifying the position from which the next pages should be returned.

Example responses

200 Response

{
  "trade_history": [
    {
      "trade": {
        "trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
        "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
        "account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
        "amount": "1234.5678",
        "side": "BUY",
        "instrument_code": "BTC_EUR",
        "price": "1234.5678",
        "time": "2020-03-26T16:59:27Z",
        "sequence": 123456789
      },
      "fee": {
        "fee_amount": "1234.5678",
        "fee_percentage": "1234.5678",
        "fee_group_id": "default",
        "running_trading_volume": "1234.5678",
        "fee_currency": "BTC",
        "fee_type": "TAKER"
      }
    }
  ],
  "max_page_size": 0,
  "cursor": "string"
}

Responses

Status Meaning Description Schema
200 OK none TradeHistory

Get Trade

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/trades/{trade_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/trades/{trade_id}', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/trades/{trade_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/trades/{trade_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/trades/{trade_id}

Get information for a trade by trade uuid.

Parameters

Name In Type Required Description
trade_id path string(uuid) true Trade uuid which details should be returned.

Example responses

200 Response

{
  "trade": {
    "account_id": "23aa7d81-5fc4-42c6-ac97-7dd7ecd63d84",
    "amount": "0.005",
    "instrument_code": "BTC_EUR",
    "order_id": "ddc8f5a1-f69d-4ce6-ac22-a0ab016fa655",
    "price": "3624.2",
    "sequence": 1,
    "side": "BUY",
    "time": "2019-01-08T14:08:05.461Z",
    "trade_id": "8d20e3b3-c580-4a9b-8923-3b032cdf8ec4"
  },
  "fee": {
    "fee_amount": "0.00001250",
    "fee_currency": "BTC",
    "fee_group_id": "default",
    "fee_percentage": "0.25",
    "fee_type": "TAKER",
    "running_trading_volume": "10.0"
  }
}

Responses

Status Meaning Description Schema
200 OK Trade information TradeHistoryEntry

Trading Volume

Code samples

# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/trading-volume \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.exchange.bitpanda.com/public/v1/account/trading-volume', params={

}, headers = headers)

print r.json()

URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/trading-volume");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.exchange.bitpanda.com/public/v1/account/trading-volume',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /account/trading-volume

This endpoint is deprecated and will be removed soon. Please consider using /account/fees to fetch the running trading volume. Returns the running trading volume for this account. It is calculated over a 30 day running window and updated once every 24hrs.

Example responses

200 Response

{
  "volume": "4213.64"
}

Responses

Status Meaning Description Schema
200 OK none TradingVolume

Schemas

BigDecimal

"1234.5678"

A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.

Properties

Name Type Required Description
anonymous string false A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.

MarketTime

"2020-03-26T16:59:27Z"

Zoned date time value which adheres to RFC3339. All market times are in UTC.

Properties

Name Type Required Description
anonymous string(date-time) false Zoned date time value which adheres to RFC3339. All market times are in UTC.

AccountSequence

123456789

Global monotonically-increasing numerical sequence bound to account activity.

Properties

Name Type Required Description
anonymous number false Global monotonically-increasing numerical sequence bound to account activity.

Currency

{
  "code": "BTC",
  "precision": 8
}

Describes each currency with unique currency code and precision which is allowed.

Properties

Name Type Required Description
code CurrencyCode true Currency code
precision integer true Precision the currency is traded with

CurrencyCode

"BTC"

Currency code for any monetary currency.

Properties

Name Type Required Description
anonymous string false Currency code for any monetary currency.

Instrument

"BTC_EUR"

The instrument denotes unique market identifier. Both base and quote must be valid currency codes.

Properties

Name Type Required Description
anonymous string false The instrument denotes unique market identifier. Both base and quote must be valid currency codes.

TimeGranularity

{
  "unit": "MINUTES",
  "period": 1
}

A length of time defined by unit and period used to identify the granularity of candlestick. Supported resolutions are 1, 5, 15, 30 MINUTES & 1, 4 HOURS & 1 DAYS & 1 WEEKS & 1 MONTHS.

Properties

Name Type Required Description
unit string true none
period number true none

Enumerated Values

Property Value
unit MINUTES
unit HOURS
unit DAYS
unit WEEKS
unit MONTHS

MarketTick

{
  "instrument_code": "BTC_EUR",
  "sequence": 123456,
  "state": "ACTIVE",
  "is_frozen": 0,
  "quote_volume": "1234.5678",
  "base_volume": "1234.5678",
  "last_price": "1234.5678",
  "best_bid": "1234.5678",
  "best_ask": "1234.5678",
  "price_change": "1234.5678",
  "price_change_percentage": "1234.5678",
  "high": "1234.5678",
  "low": "1234.5678"
}

Statistics on market activity within the last 24 hours.

Properties

Name Type Required Description
instrument_code Instrument true Code of the described market.
sequence integer true Monotonically increasing sequence number of the market tick.
state string true Current status of the market.
is_frozen number true Indicates if the market is currently enabled (1) or disabled (0).
quote_volume BigDecimal true 24 hour volume in the quote currency.
base_volume BigDecimal true 24 hour volume in the base currency.
last_price BigDecimal true Price of the last trade.
best_bid BigDecimal true Price of the current best bid.
best_ask BigDecimal true Price of the current best ask.
price_change BigDecimal true Difference between the price 24 hours ago and now.
price_change_percentage BigDecimal true Relatieve price movement in the last 24 hours.
high BigDecimal true Highest matched price within the last 24 hours.
low BigDecimal true Lowest matched price within the last 24 hours.

Enumerated Values

Property Value
state ACTIVE
state SUSPENDED
state IN_MAINTENANCE
state CLOSED
state UNDEFINED

Account

{
  "account_id": "08d84399-f5e2-46ca-846b-960aa699b69c",
  "balances": [
    {
      "account_id": "08d84399-f5e2-46ca-846b-960aa699b69c",
      "currency_code": "BTC",
      "change": "1234.5678",
      "available": "1234.5678",
      "locked": "1234.5678",
      "sequence": 123456789,
      "time": "2020-03-26T16:59:27Z"
    }
  ]
}

Account details of a registered user's balance(s).

Properties

Name Type Required Description
account_id string(uuid) true Unique identifier for account.
balances [Balance] true [Account balance for one single currency]

Balance

{
  "account_id": "08d84399-f5e2-46ca-846b-960aa699b69c",
  "currency_code": "BTC",
  "change": "1234.5678",
  "available": "1234.5678",
  "locked": "1234.5678",
  "sequence": 123456789,
  "time": "2020-03-26T16:59:27Z"
}

Account balance for one single currency

Properties

Name Type Required Description
account_id string(uuid) true Unique identifier for account.
currency_code CurrencyCode true Currency in which the balance is.
change BigDecimal true This value denotes the last change that was made on the balance.
available BigDecimal true Denotes all available balance to the user.
locked BigDecimal true Denotes all currently locked balance in orders.
sequence AccountSequence true Global monotonically-increasing numerical sequence bound to account activity.
time MarketTime true Zoned date time value which adheres to RFC3339. All market times are in UTC.

Order

{
  "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
  "account_id": "1eb2ad5d-55f1-40b5-bc92-7dc05869e905",
  "instrument_code": "BTC_EUR",
  "amount": "1234.5678",
  "filled_amount": "1234.5678",
  "side": "BUY",
  "type": "LIMIT",
  "status": "OPEN",
  "sequence": 123456789,
  "price": "1234.5678",
  "reason": "INSUFFICIENT_FUNDS",
  "time": "2020-03-26T16:59:27Z",
  "time_in_force": "GOOD_TILL_CANCELLED",
  "time_last_updated": "2020-03-26T16:59:27Z",
  "time_triggered": "2020-03-26T16:59:27Z",
  "trigger_price": "1234.5678"
}

Properties

Name Type Required Description
order_id string(uuid) true Uniquely identifies order.
account_id string(uuid) true Uniquely identifies account.
instrument_code Instrument true The instrument denotes unique market identifier. Both base and quote must be valid currency codes.
amount BigDecimal true The amount of currency for this order
filled_amount BigDecimal true The already filled amount of currency for this order
side Side true Direction of the order
type string true The type of the order
status string false An order is tracked in the system with a specific status. If an order is successfully executed, then it is considered to be in the state OPEN and is submitted to the order book. If an order validation fails, the order status is updated to REJECTED, specifying the reason for the rejection. If the system fails to process an order due to unforeseen service disruptions, then the order status is updated to FAILED and the user should re-submit the order.
sequence AccountSequence false Global monotonically-increasing numerical sequence bound to account activity.
price BigDecimal true The price at which the order is set to execute. Applicable to LIMIT and STOP orders.
reason string false Reason specifying why an order was rejected. Only applicable to order status REJECTED and FILLED_REJECTED.
time MarketTime true The time at which the order was executed.
time_in_force string false Only applicable to LIMIT orders. If IMMEDIATE_OR_CANCELLED is specified then the order must be filled immediately, only at the limit price or better. If the order cannot be filled immediately or fully, the unfilled portion will be cancelled. Alternatively, FILL_OR_KILL instructs the the exchange to either fully-fill the limit order at the desired price of cancel it automatically. If none is specified then GOOD_TILL_CANCELLED is considered.
time_last_updated MarketTime false The time at which the order was last updated, i.e. the order status changed.
time_triggered MarketTime false The time at which the STOP order was triggered.
trigger_price BigDecimal false The price at which the STOP order is set to trigger conversion into a LIMIT order. Only applicable to STOP orders.

Enumerated Values

Property Value
type LIMIT
type MARKET
type STOP
status OPEN
status STOP_TRIGGERED
status FILLED
status FILLED_FULLY
status FILLED_CLOSED
status FILLED_REJECTED
status REJECTED
status CLOSED
status FAILED
reason INSUFFICIENT_FUNDS
reason INSUFFICIENT_LIQUIDITY
reason SELF_TRADE_PREVENTED
time_in_force GOOD_TILL_CANCELLED
time_in_force IMMEDIATE_OR_CANCELLED
time_in_force FILL_OR_KILL

OrderBook

{
  "instrument_code": "BTC_EUR",
  "time": "2020-03-26T16:59:27Z",
  "bids": [
    {
      "price": "1234.5678",
      "amount": "1234.5678",
      "number_of_orders": 3
    }
  ],
  "asks": [
    {
      "price": "1234.5678",
      "amount": "1234.5678",
      "number_of_orders": 3
    }
  ]
}

A snapshot of the compiled order book state

Properties

Name Type Required Description
instrument_code Instrument true The instrument denotes unique market identifier. Both base and quote must be valid currency codes.
time MarketTime true Zoned date time value which adheres to RFC3339. All market times are in UTC.
bids [oneOf] true none

oneOf

Name Type Required Description
» anonymous CompiledPriceLevel false Representing price levels of the orderbook

xor

Name Type Required Description
» anonymous OrderBookEntry false Representing price levels of the orderbook

continued

Name Type Required Description
asks [oneOf] true none

oneOf

Name Type Required Description
» anonymous CompiledPriceLevel false Representing price levels of the orderbook

xor

Name Type Required Description
» anonymous OrderBookEntry false Representing price levels of the orderbook

OrderBookLevelOne

{
  "instrument_code": "BTC_EUR",
  "time": "2020-03-26T16:59:27Z",
  "bids": {
    "value": {
      "price": "1234.5678",
      "amount": "1234.5678",
      "order_id": "string"
    }
  },
  "asks": {
    "value": {
      "price": "1234.5678",
      "amount": "1234.5678",
      "order_id": "string"
    }
  }
}

A snapshot of the order book state

Properties

Name Type Required Description
instrument_code Instrument true The instrument denotes unique market identifier. Both base and quote must be valid currency codes.
time MarketTime true Zoned date time value which adheres to RFC3339. All market times are in UTC.
bids OrderBookEntry true Representing price levels of the orderbook
asks OrderBookEntry true Representing price levels of the orderbook

OrderBookEntry

{
  "value": {
    "price": "1234.5678",
    "amount": "1234.5678",
    "order_id": "string"
  }
}

Representing price levels of the orderbook

Properties

Name Type Required Description
value object false none
» price BigDecimal false A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
» amount BigDecimal false A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
» order_id string(uuid) false Unique order id

CompiledPriceLevel

{
  "price": "1234.5678",
  "amount": "1234.5678",
  "number_of_orders": 3
}

Representing price levels of the orderbook

Properties

Name Type Required Description
price BigDecimal false A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
amount BigDecimal false A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
number_of_orders integer false If the pricelevel is compiled this field represents sum of orders included in this price level.

Candlestick

{
  "last_sequence": 12345,
  "instrument_code": "BTC_EUR",
  "granularity": {
    "unit": "MINUTES",
    "period": 1
  },
  "high": "1234.5678",
  "low": "1234.5678",
  "open": "1234.5678",
  "close": "1234.5678",
  "total_amount": "1234.5678",
  "volume": "1234.5678",
  "time": "2020-03-26T16:59:27Z"
}

Candlestick representing price action for a given period

Properties

Name Type Required Description
last_sequence number true The value of the sequence field of the last price tick considered for this candlestick (see Websocket channel Price Ticks)
instrument_code Instrument true The instrument/market the candlestick belongs to
granularity TimeGranularity true The time resolution of the candlestick
high BigDecimal true The highest price during the candlestick duration
low BigDecimal true The lowest price during the candlestick duration
open BigDecimal true The opening price of the candlestick period
close BigDecimal true The closing price of the candlestick period
total_amount BigDecimal true The total amount in base currency of trades on the market during the candlestick period
volume BigDecimal true The total volume in quote currency of trades on the market during the candlestick period. Volume is defined as amount multiplied by price.
time MarketTime true Start time of the candlestick period. See /time

CreateOrder

{
  "instrument_code": "BTC_EUR",
  "type": "MARKET",
  "side": "BUY",
  "amount": "1234.5678",
  "price": "1234.5678",
  "trigger_price": "1234.5678",
  "client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
  "time_in_force": "GOOD_TILL_CANCELLED"
}

Properties

Name Type Required Description
instrument_code Instrument true The instrument denotes unique market identifier. Both base and quote must be valid currency codes.
type string true The type of the order
side Side true Direction of the Order
amount BigDecimal true The number of units to open order for
price BigDecimal false Is mandatory for LIMIT and STOP orders. Setting price for MARKET order type is ignored as this order type is always executed against instrument pricing available at the execution time.
trigger_price BigDecimal false Is mandatory for STOP orders. A stop-limit order will be executed at a specified price (see price), or better, after the given trigger price has been reached.
client_id string(uuid) false The optional client order id prevents duplicated orders. Should be a unique and valid UUID of version 4 . An order, with a client order id that already has been processed, will be rejected.
time_in_force string false Only applicable to LIMIT orders. If IMMEDIATE_OR_CANCELLED is specified then the order must be filled immediately, only at the limit price or better. If the order cannot be filled immediately or fully, the unfilled portion will be cancelled. Alternatively, FILL_OR_KILL instructs the the exchange to either fully-fill the limit order at the desired price of cancel it automatically. If none is specified then GOOD_TILL_CANCELLED is considered.

Enumerated Values

Property Value
type MARKET
type LIMIT
type STOP
time_in_force GOOD_TILL_CANCELLED
time_in_force IMMEDIATE_OR_CANCELLED
time_in_force FILL_OR_KILL

FeeGroupId

"default"

Unique identifier of a FeeGroup.

Properties

Name Type Required Description
anonymous string false Unique identifier of a FeeGroup.

FeeTier

{
  "fee_group_id": "default",
  "volume": "1234.5678",
  "maker_fee": "1234.5678",
  "taker_fee": "1234.5678"
}

Properties

Name Type Required Description
fee_group_id FeeGroupId true Identifier of the fee group
volume BigDecimal true Volume beyond which this fee tier is activated
maker_fee BigDecimal true Fee rate that will be used for fee calculation when trade is settled as MAKER
taker_fee BigDecimal true Fee rate that will be used for fee calculation when trade is settled as TAKER

AccountFeeGroup

{
  "account_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
  "running_trading_volume": "1234.5678",
  "active_fee_tier": {
    "fee_group_id": "default",
    "volume": "1234.5678",
    "maker_fee": "1234.5678",
    "taker_fee": "1234.5678"
  },
  "collect_fees_in_best": true,
  "fee_discount_rate": "1234.5678",
  "minimum_price_value": "1234.5678",
  "fee_group_id": "default",
  "fee_tiers": [
    {
      "fee_group_id": "default",
      "volume": "1234.5678",
      "maker_fee": "1234.5678",
      "taker_fee": "1234.5678"
    }
  ]
}

Properties

Name Type Required Description
account_id string(uuid) true Unique identifier of account
running_trading_volume BigDecimal true The accumulated trading volume in BTC.
active_fee_tier FeeTier true Currently active fee tier for user
collect_fees_in_best boolean true Flag to collect fees in BEST
fee_discount_rate BigDecimal true A discount rate applied to your fees, if you opted in to pay your fees using BEST
minimum_price_value BigDecimal true The minimum guaranteed price of 1 BEST in EUR, if you opted in to pay your fees using BEST
fee_group_id FeeGroupId true Unique identifier of a FeeGroup.
fee_tiers [FeeTier] true Specific fee tiers for the fee group

FeeGroup

{
  "fee_group_id": "default",
  "display_text": "Default fee group",
  "fee_tiers": [
    {
      "fee_group_id": "default",
      "volume": "1234.5678",
      "maker_fee": "1234.5678",
      "taker_fee": "1234.5678"
    }
  ],
  "fee_discount_rate": "1234.5678",
  "minimum_price_value": "1234.5678"
}

Properties

Name Type Required Description
fee_group_id FeeGroupId true Unique identifier of a FeeGroup.
display_text string true Textual description of a Fee Group
fee_tiers [FeeTier] true Fee tiers that belong to a specific fee tier.
fee_discount_rate BigDecimal true A discount rate applied to your fees, if you opted in to pay your fees using BEST
minimum_price_value BigDecimal true The minimum guaranteed price of 1 BEST in EUR, if you opted in to pay your fees using BEST

Trade

{
  "trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
  "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
  "account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
  "amount": "1234.5678",
  "side": "BUY",
  "instrument_code": "BTC_EUR",
  "price": "1234.5678",
  "time": "2020-03-26T16:59:27Z",
  "sequence": 123456789
}

Properties

Name Type Required Description
trade_id string(uuid) true Unique identifier for trade
order_id string(uuid) true Unique identifier for order
account_id string(uuid) true Unique identifier for account id
amount BigDecimal true A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
side Side true Represents a side of Trade or Order. It can have values BUY and SELL.
instrument_code Instrument true The instrument denotes unique market identifier. Both base and quote must be valid currency codes.
price BigDecimal true A decimal unit. All decimal fields are of the type string to ensure that all floating-point arithmetic operations can be performed with precision. If they are not encoded as strings then the post requests will be rejected.
time MarketTime true Zoned date time value which adheres to RFC3339. All market times are in UTC.
sequence AccountSequence true Global monotonically-increasing numerical sequence bound to account activity.

TradingVolume

{
  "volume": "1234.5678"
}

Properties

Name Type Required Description
volume BigDecimal false The accumulated trading volume in BTC.

Side

"BUY"

Represents a side of Trade or Order. It can have values BUY and SELL.

Properties

Name Type Required Description
anonymous string false Represents a side of Trade or Order. It can have values BUY and SELL.

Enumerated Values

Property Value
anonymous BUY
anonymous SELL

PriceTick

{
  "instrument_code": "BTC_EUR",
  "price": "1234.5678",
  "amount": "1234.5678",
  "volume": "1234.5678",
  "sequence": 464646,
  "taker_side": "BUY",
  "time": "2020-03-26T16:59:27Z",
  "trade_timestamp": 1646366
}

Properties

Name Type Required Description
instrument_code Instrument true The instrument denotes unique market identifier. Both base and quote must be valid currency codes.
price BigDecimal true Price at which trade was matched
amount BigDecimal true Amount of the trade in base currency that was matched
volume BigDecimal true Volume of the trade in quote currency
sequence number true Monotonically increasing sequence unique to each price tick, can contain gaps
taker_side Side true Denotes which side had the the taker of the trade.
time MarketTime true Zoned date time value which adheres to RFC3339. All market times are in UTC.
trade_timestamp number true Time in epoch miliseconds.

TradeHistoryEntry

{
  "trade": {
    "trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
    "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
    "account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
    "amount": "1234.5678",
    "side": "BUY",
    "instrument_code": "BTC_EUR",
    "price": "1234.5678",
    "time": "2020-03-26T16:59:27Z",
    "sequence": 123456789
  },
  "fee": {
    "fee_amount": "1234.5678",
    "fee_percentage": "1234.5678",
    "fee_group_id": "default",
    "running_trading_volume": "1234.5678",
    "fee_currency": "BTC",
    "fee_type": "TAKER"
  }
}

Single trade recorded for an order.

Properties

Name Type Required Description
trade Trade true Trade object containing all information relevant to the trade.
fee object true Fee applied account balance as part of trade settlement.
» fee_amount BigDecimal true Fee amount that was payed with this specific trade.
» fee_percentage BigDecimal true Fee percentage that was used to calculate fee amount.
» fee_group_id FeeGroupId true Unique identifier of a FeeGroup.
» running_trading_volume BigDecimal true Represent a running trading volume at the time of trade settlement.
» fee_currency CurrencyCode true Currency code for any monetary currency.
» fee_type string true Fee type used to the fee calculation, corresponding to how the trade was matched.

Enumerated Values

Property Value
fee_type TAKER
fee_type MAKER

OrderHistoryEntry

{
  "order": {
    "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
    "account_id": "1eb2ad5d-55f1-40b5-bc92-7dc05869e905",
    "instrument_code": "BTC_EUR",
    "amount": "1234.5678",
    "filled_amount": "1234.5678",
    "side": "BUY",
    "type": "LIMIT",
    "status": "OPEN",
    "sequence": 123456789,
    "price": "1234.5678",
    "reason": "INSUFFICIENT_FUNDS",
    "time": "2020-03-26T16:59:27Z",
    "time_in_force": "GOOD_TILL_CANCELLED",
    "time_last_updated": "2020-03-26T16:59:27Z",
    "time_triggered": "2020-03-26T16:59:27Z",
    "trigger_price": "1234.5678"
  },
  "trades": [
    {
      "trade": {
        "trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
        "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
        "account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
        "amount": "1234.5678",
        "side": "BUY",
        "instrument_code": "BTC_EUR",
        "price": "1234.5678",
        "time": "2020-03-26T16:59:27Z",
        "sequence": 123456789
      },
      "fee": {
        "fee_amount": "1234.5678",
        "fee_percentage": "1234.5678",
        "fee_group_id": "default",
        "running_trading_volume": "1234.5678",
        "fee_currency": "BTC",
        "fee_type": "TAKER"
      }
    }
  ]
}

Active or Inactive order, for orders with the status FILLED, FILLED_FULLY, FILLED_CLOSED and FILLED_REJECTED, information about trades and fees is returned.

Properties

Name Type Required Description
order Order true none
trades [TradeHistoryEntry] false one or more trades if this order is FILLED

OrderHistory

{
  "order_history": [
    {
      "order": {
        "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
        "account_id": "1eb2ad5d-55f1-40b5-bc92-7dc05869e905",
        "instrument_code": "BTC_EUR",
        "amount": "1234.5678",
        "filled_amount": "1234.5678",
        "side": "BUY",
        "type": "LIMIT",
        "status": "OPEN",
        "sequence": 123456789,
        "price": "1234.5678",
        "reason": "INSUFFICIENT_FUNDS",
        "time": "2020-03-26T16:59:27Z",
        "time_in_force": "GOOD_TILL_CANCELLED",
        "time_last_updated": "2020-03-26T16:59:27Z",
        "time_triggered": "2020-03-26T16:59:27Z",
        "trigger_price": "1234.5678"
      },
      "trades": [
        {
          "trade": {
            "trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
            "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
            "account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
            "amount": "1234.5678",
            "side": "BUY",
            "instrument_code": "BTC_EUR",
            "price": "1234.5678",
            "time": "2020-03-26T16:59:27Z",
            "sequence": 123456789
          },
          "fee": {
            "fee_amount": "1234.5678",
            "fee_percentage": "1234.5678",
            "fee_group_id": "default",
            "running_trading_volume": "1234.5678",
            "fee_currency": "BTC",
            "fee_type": "TAKER"
          }
        }
      ]
    }
  ],
  "max_page_size": 100,
  "cursor": "string"
}

Paginated collection of account orders

Properties

Name Type Required Description
order_history [OrderHistoryEntry] true [Active or Inactive order, for orders with the status FILLED, FILLED_FULLY, FILLED_CLOSED and FILLED_REJECTED, information about trades and fees is returned.]
max_page_size integer true Maximum number of returned results
cursor string false Cursor indicating if there are more results available to be fetched. Please use this cursor in the next query.

TradeHistory

{
  "trade_history": [
    {
      "trade": {
        "trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
        "order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
        "account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
        "amount": "1234.5678",
        "side": "BUY",
        "instrument_code": "BTC_EUR",
        "price": "1234.5678",
        "time": "2020-03-26T16:59:27Z",
        "sequence": 123456789
      },
      "fee": {
        "fee_amount": "1234.5678",
        "fee_percentage": "1234.5678",
        "fee_group_id": "default",
        "running_trading_volume": "1234.5678",
        "fee_currency": "BTC",
        "fee_type": "TAKER"
      }
    }
  ],
  "max_page_size": 0,
  "cursor": "string"
}

Paginated collection of account trades

Properties

Name Type Required Description
trade_history [TradeHistoryEntry] true [Single trade recorded for an order.]
max_page_size integer true Maximum number of returned results.
cursor string true Cursor indicating if there are more results available to be fetched. Please use this cursor in the next query.

Error

{
  "error": "MESSAGE"
}

Default format for all errors returned by REST API.

Properties

Name Type Required Description
error string false Textual description of an error

WithdrawCryptoBody

{
  "currency": "BTC",
  "amount": "1234.5678",
  "recipient": {
    "address": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
    "destination_tag": ""
  }
}

Body of an POST request used for crypto withdrawal

Properties

Name Type Required Description
currency CurrencyCode true Currency code of crypto asset
amount BigDecimal true Amount to withdraw
recipient object true none
» address string true Crypo address to which should be the transfer executed.
» destination_tag string|null false Destination tag for the transaction, if the transaction requires it.

CryptoWithdraw

{
  "amount": "1234.5678",
  "fee": "1234.5678",
  "recipient": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
  "destination_tag": "",
  "transaction_id": "d0f8529f-f832-4e6a-9dc5-b8d5797badb2"
}

Respose for an crypto withdrawal request.

Properties

Name Type Required Description
amount BigDecimal false Amount of withdrawal
fee BigDecimal false Fee of the withdrawal
recipient string false Address of the recipient
destination_tag string false Destination tag used if required.
transaction_id string(uuid) false Transaction id of the executed withdrawal

WithdrawFiatBody

{
  "currency": "BTC",
  "amount": "1234.5678",
  "payout_account_id": "66756a10-3e86-48f4-9678-b634c4b135b2"
}

Body of an POST request used for fiat withdrawal

Properties

Name Type Required Description
currency CurrencyCode true Currency code of fiat asset
amount BigDecimal true Amount to withdraw
payout_account_id string(uuid) true Id of an payout account which is tied to specific IBAN.

OrderBookSnapshot

{
  "instrument_code": "BTC_EUR",
  "time": "2020-03-26T16:59:27Z",
  "bids": [
    {
      "price": "1234.5678",
      "amount": "1234.5678",
      "number_of_orders": 3
    }
  ],
  "asks": [
    {
      "price": "1234.5678",
      "amount": "1234.5678",
      "number_of_orders": 3
    }
  ]
}

A wrapper for two different layout of orderbook snapshot responses depending on which level is queried.

Properties

oneOf

Name Type Required Description
anonymous OrderBook false A snapshot of the compiled order book state

xor

Name Type Required Description
anonymous OrderBookLevelOne false A snapshot of the order book state

undefined

REST API Overview

Endpoints

Public The Bitpanda Pro REST API provides endpoints for account and order management. Additionally, public market data can be retrieved.

https://api.exchange.bitpanda.com/public/v1

Connectivity

The Bitpanda Pro REST API is rate limited. Sending too many requests in a short period will result in blocked requests with the HTTP status 429. The current limit is 120 requests per minute.

Private endpoints

To access account specific data, an API key must be sent in the HTTP header Authorization as a Bearer token.

Authorization: Bearer apiKey

An API key can be generated through the user interface.

API key

An API key can be generated through the user interface at https://exchange.bitpanda.com/account/api/keys. Be aware that this API key is unique and valid only for the Bitpanda Pro. This API key can have three distinct scopes, namely READ, TRADE and WITHDRAW. With the READ scope, you can read all private endpoints, the TRADE scope allows you to additionally create and cancel orders and the WITHDRAW scope allows you to deposit and withdraw funds from your account to the off-site wallets. You can also create an IP restriction on your API key so that it will be rejected if used by IP addresses that are not whitelisted. This is recommended additional security measure especially for an API key with scope WITHDRAW.

API key permissions required by specific endpoints are specified in the documentation.

Pagination

The Bitpanda Pro REST API uses paginated results for endpoints that return historical trades and orders.

To paginate an array of results, the API uses cursors that indicate the current position in the array. To request the consecutive page of entries, the API user should specify the next cursor returned with previous response. Please note that the next request has to be same with the additional cursor parameter. The cursors we provide are backward only, as the history results we serve are always sorted by latest first.

GET /public/v1/account/trades?from=2019-10-06T22:00:00.000Z&to=2020-01-07T23:59:59.999Z&max_page_size=20&cursor=eyJhY2NvdW50X2lkIjp7InMiOiI1NTAwNWYzMC01YTlmLTExZTktOWQ1MS1kMzAxNTk1OGYyZmYifSwiZ2xvYmFsX29yZGVyX2luZGV4X2hhc2hfa2V5Ijp7InMiOiI1NTAwNWYzMC01YTlmLTExZTktOWQ1MS1kMzAxNTk1OGYyZmY6OklOQUNUSVZFIn0sInNvcnRfa2V5Ijp7InMiOiJPUkRFUjo6NzkwNDJhZWItYmViMy00ZTgzLWJhZTQtMTQ5ZDIyZjNmNzE5In0sImdsb2JhbF9vcmRlcl9pbmRleF9yYW5nZV9rZXkiOnsicyI6IjE1Nzg0Nzg1Mzk5OTMifX0=

Errors

Valid requests will result in responses with HTTP 2xx status codes. Every other response in the HTTP 4xx range will return a well defined error in the HTTP body in the following format:

{
  "error":"MESSAGE"
}

Websocket API Overview

Bitpanda Pro WSS API provides real time feed of publicly available market data and user's trading activity. A subscriber may choose to compile an arbitrary list of subscriptions which is tailored to specific use case.

Endpoint

Public Bitpanda Pro Websocket API provides real-time market data feeds from:

wss://streams.exchange.bitpanda.com

Connectivity

The Bitpanda Pro Websocket API is rate limited. Opening too many connections in a short time will result in blocked requests with HTTP status 429. The current limit is 30 connections per minute.

A single web socket connection is only valid for 24 hours. After that the server will send out a message announcing a pending connection termination:

{
    "subscription": "SYSTEM",
    "time": "2019-01-01T01:01:01Z",
    "channel_name": "SYSTEM",
    "type": "CONNECTION_CLOSING"
}

There is a short grace period for the client to react by re-connecting and re-subscribing to the server. If no action is taken, then the server will close the connection with the status code 1000 and the reason PLEASE_RECONNECT.

Subscription Channels

Summary of publicly-available subscription channels:

Channel Name Description Availability
ORDER_BOOK price level feed delivering all bids and asks followed by incremental changes public
PRICE_TICKS trading feed delivering all matched prices as they happen public
CANDLESTICKS candlesticks feed delivering the desired time granularity for requested instruments public
MARKET_TICKER market stats feed public

A client may compose the above channels into a single websocket feed in any order or simply subscribe to all channels at once. However, only one subscription per channel is allowed.

Summary of authenticated subscription channels:

Channel Name Description Availability
ACCOUNT_HISTORY authenticated private feed delivering trading and funding activity authenticated

Protocol

Subscribe

All messages are expected and delivered in strict JSON format. When a client wishes to initiate a subscription to one or more channels, a subscribe message is composed and sent to the endpoint. The detailed subscribe payloads are documented in the corresponding sections.

As an example, the following subscribe message activates the Order Book Channel and the Price Tick Channel.

{
    "type": "SUBSCRIBE",
    "channels": [
      {
        "name": "ORDER_BOOK",
        "instrument_codes": [
          "BTC_EUR",
          "BTC_USDT"
        ]
      },
      {
        "name": "PRICE_TICKS",
        "instrument_codes": [
          "BTC_EUR",
          "BTC_USDT"
        ]
      }
    ]
}

Confirmation

If the subscriptions have been successful two responses are returned:

{
    "type": "SUBSCRIPTIONS",
    "channels": [
      {
        "name": "ORDER_BOOK",
        "instrument_codes": [
          "BTC_EUR",
          "BTC_USDT"
        ]
      }
    ]
}
{
    "type": "SUBSCRIPTIONS",
    "channels": [
      {
        "name": "PRICE_TICKS",
        "instrument_codes": [
          "BTC_EUR",
          "BTC_USDT"
        ]
      }
    ]
}

Error

If the subscription payload is incorrect the server will return an error in the following format:

{
    "error": "MISSING_INSTRUMENTS",
    "channel_name":"ORDER_BOOK",
    "type":"ERROR"
}

If the payload json is malformed the server will terminate the web socket connection and return an error in the following format:

{
    "error":"MALFORMED_JSON",
    "channel_name":"SYSTEM",
    "type":"ERROR"
}

Unsubscribe

A client can send an unsubscribe message when a particular channel should be deactivated.

{
    "type": "UNSUBSCRIBE",
    "channels": [
      "ORDER_BOOK",
      "PRICE_TICKS"
    ]
}

Confirmation

If the unsubscribe was successful two responses are returned:

{
    "type": "UNSUBSCRIBED",
    "channel_name": "ORDER_BOOK"
}
{
    "type": "UNSUBSCRIBED",
    "channel_name": "PRICE_TICKS"
}

Sequence numbers

Sequence numbers for market data are monotonically increasing numerical sequences assigned to data fragments. Those numbers are stricly monotonic but not gap-less.
Subscribers can use sequence numbers to establish total order of messages.

Encoding

Messages that WSS API sends or receives are encoded in JSON.

Idle Connections

When there is no new data sent for 10 seconds, you will receive a heartbeat message so you can be sure your connection is still open.

{
    "channel_name": "SYSTEM",
    "subscription": "SYSTEM",
    "time": "2019-04-16T08:38:13.293Z",
    "type": "HEARTBEAT"
}

When there are no subscriptions sent for 5 minutes after connecting, the connection will be terminated with the reason IDLE_CONNECTION

Market Updates

You will receive an update when a new market is added, activated, modified, closed, put in maintenance or suspended. The field state indicates the current state of the market.

{
    "subscription": "SYSTEM",
    "update": {
      "state": "IN_MAINTENANCE",
      "base": {
        "code": "BTC",
        "precision": 8
      },
      "quote": {
        "code": "EUR",
        "precision": 2
      },
      "amount_precision": 4,
      "market_precision": 2,
      "min_size": "10.0"
    },
    "channel_name": "SYSTEM",
    "type": "MARKET_UPDATES",
    "time": "2019-01-01T01:01:01Z"
}

Account history channel

Description

Authenticated API clients should have access to a stream of account history events corresponding to one account.

Subscribe

In the following example, a client is attempting to create an authenticated subscription. In order for this request to succeed, a valid API token must be provided.

{
  "type": "SUBSCRIBE",
  "channels": [
    {
      "name": "ACCOUNT_HISTORY",
      "api_token": "my-api-token"
    }
  ]
}

Additionally, subscribers can specify a just_orders flag, which, when set true will omit the trades from ACTIVE_ORDERS_SNAPSHOT and INACTIVE_ORDERS_SNAPSHOT messages. The default value for the flag is false.

{
  "type": "SUBSCRIBE",
  "channels": [
    {
      "name": "ACCOUNT_HISTORY",
      "api_token": "my-api-token",
      "just_orders": true
    }
  ]
}

Confirmation

If the authenticated subscription request succeeded, a confirmation is sent back to the client.

{
  "type": "SUBSCRIPTIONS",
  "channels": [
    {
      "name": "ACCOUNT_HISTORY",
      "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6"
    }
  ]
}

Error

If authentication fails within the initial subscribe message, due to an invalid API token or another reason, the web socket connection terminates with the status code 1008 and a reason in the following format:

{
  "error" : "INVALID_APIKEY"
}

Active Orders Snapshot

The active orders snapshot returns all active orders. Note that active orders might be partially-filled and thus include trades.

{
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACTIVE_ORDERS_SNAPSHOT",
  "time": "2019-03-21T16:38:17.093Z",
  "order": {
    "type": "MARKET",
    "status": "FILLED",
    "order_id": "07ba933f-29dc-4ec1-b00f-578cca8c5082",
    "account_id": "f6c74144-9e0d-49f7-8f6e-a8770f3ad77f",
    "instrument_code": "BTC_ETH",
    "time": "2019-03-21T16:38:17.093Z",
    "time_last_updated": "2019-03-21T16:38:18.093Z",
    "side": "BUY",
    "price": "200",
    "average_price": "197.32",
    "amount": "1.0",
    "filled_amount": "0.5",
    "sequence": 1
  },
  "trades": [
    {
      "fee": {
        "fee_amount": "0.0002",
        "fee_currency": "BTC",
        "fee_percentage": "0.1",
        "fee_group_id": "default",
        "fee_type": "TAKER",
        "running_trading_volume": "0.00277069"
      },
      "trade": {
        "trade_id": "6c252d23-2366-40fa-b7a7-ffc6b5cfa74c",
        "order_id": "07ba933f-29dc-4ec1-b00f-578cca8c5082",
        "account_id": "f6c74144-9e0d-49f7-8f6e-a8770f3ad77f",
        "amount": "0.5",
        "side": "BUY",
        "instrument_code": "BTC_ETH",
        "price": "197.32",
        "time": "2019-07-01T07:02:51.919Z",
        "sequence": 1000
      }
    }
  ]
}

The field trades is omitted if the subscription has the flag with_orders set to true.

{
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACTIVE_ORDERS_SNAPSHOT",
  "time": "2019-03-21T16:38:17.093Z",
  "order": {
    "type": "MARKET",
    "status": "FILLED",
    "order_id": "07ba933f-29dc-4ec1-b00f-578cca8c5082",
    "account_id": "f6c74144-9e0d-49f7-8f6e-a8770f3ad77f",
    "instrument_code": "BTC_ETH",
    "time": "2019-03-21T16:38:17.093Z",
    "time_last_updated": "2019-03-21T16:38:18.093Z",
    "side": "BUY",
    "price": "200",
    "average_price": "197.32",
    "amount": "1.0",
    "filled_amount": "0.5",
    "sequence": 1
  }
}

Inactive Orders Snapshot

The inactive orders snapshot returns the 50 most recent inactive orders within the last 24 hours. Inactive orders are those which satisfy one of these criteria:

  1. partially-filled and then cancelled by user.
  2. fully-filled.
  3. partially-filled and then rejected.

If no such order satisfied any of the above criteria then an empty snapshot is returned. Once the order is inactive it can no-longer participate in the market.

{
  "channel_name": "ACCOUNT_HISTORY",
  "type": "INACTIVE_ORDERS_SNAPSHOT",
  "time": "2019-07-22T07:06:23.073Z",
  "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
  "orders": [
    {
      "order": {
        "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
        "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
        "instrument_code": "BTC_EUR",
        "time": "2019-07-22T07:06:23.073Z",
        "side": "BUY",
        "price": "9441.89",
        "amount": "0.08709",
        "filled_amount": "0.08709",
        "average_price": "9441.89",
        "type": "LIMIT",
        "sequence": 11959,
        "status": "FILLED_FULLY",
        "time_last_updated": "2019-07-22T07:06:25.338Z"
      },
      "trades": [
        {
          "fee": {
            "fee_amount": "0.00008709",
            "fee_currency": "BTC",
            "fee_percentage": "0.1",
            "fee_group_id": "default",
            "fee_type": "TAKER",
            "running_trading_volume": "0.00277069"
          },
          "trade": {
            "trade_id": "5a974cdf-4eac-499c-8fa5-2f5b40b3eabd",
            "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
            "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
            "amount": "0.08709",
            "side": "BUY",
            "instrument_code": "BTC_EUR",
            "price": "9441.89",
            "time": "2019-07-22T07:06:24.054Z",
            "sequence": 11959
          }
        }
      ]
    }
  ]
}

The field trades is omitted if the subscription has the flag with_orders set to true.

{
  "channel_name": "ACCOUNT_HISTORY",
  "type": "INACTIVE_ORDERS_SNAPSHOT",
  "time": "2019-07-22T07:06:23.073Z",
  "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
  "orders": [
    {
      "order": {
        "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
        "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
        "instrument_code": "BTC_EUR",
        "time": "2019-07-22T07:06:23.073Z",
        "side": "BUY",
        "price": "9441.89",
        "amount": "0.08709",
        "filled_amount": "0.08709",
        "average_price": "9441.89",
        "type": "LIMIT",
        "sequence": 11959,
        "status": "FILLED_FULLY",
        "time_last_updated": "2019-07-22T07:06:25.338Z"
      }
    }
  ]
}

Balances Snapshot

Next, a snapshot of all last-known account balances is returned.

{
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "type": "BALANCES_SNAPSHOT",
  "channel_name": "ACCOUNT_HISTORY",
  "time": "2019-04-01T13:39:17.155Z",
  "balances": [
    {
      "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
      "currency_code": "BTC",
      "change": "0.50000000",
      "available": "10.0",
      "locked": "1.1234567",
      "sequence": 1,
      "time": "2019-04-01T13:39:17.155Z"
    },
    {
      "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
      "currency_code": "ETH",
      "change": "0.50000000",
      "available": "10.0",
      "locked": "1.1234567",
      "sequence": 2,
      "time": "2019-04-01T13:39:17.155Z"
    }
  ]
}

Account Updates

Once the funding overview and trading history have been delivered, all subsequent messages relating to the subscribed account are delivered.

Each account history update is delivered in the following format:

{
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "update": {
    //see message definitions below
   },
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACCOUNT_UPDATE"
}

Account Update: Order Created

Emitted after the system has successfully accepted a client's order.

{
  "id": "d3fe6025-5b27-4df6-a957-98b8d131cb9d",
  "type": "ORDER_CREATED",
  "activity": "TRADING",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-08-01T13:39:15.590Z",
  "sequence" : 0,
  "order": {
    "status": "OPEN",
    "order_id": "6f991342-da2c-45c6-8830-8bf519cfc8cc",
    "client_id": "0742f495-b030-4ae9-948f-d8daf4942c7b",
    "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
    "instrument_code": "BTC_EUR",
    "time": "2018-08-01T13:39:15.586Z",
    "side": "SELL",
    "price": "3",
    "amount": "1.5",
    "filled_amount": 0,
    "type": "LIMIT"
  },
  "locked": {
    "currency_code": "BTC",
    "amount": "1.50000000",
    "new_locked": "2.00000000"
  }
}

Account Update: Order Rejected

Emitted after the system establishes that an order could not be processed. The client can expect a reason field detailing the rejection.

{
  "id": "d3fe6025-5b27-4df6-a957-98b8d131cb9d",
  "type": "ORDER_REJECTED",
  "activity": "TRADING",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "sequence": 0,
  "timestamp": "2018-08-01T13:39:15.590Z",
  "reason": "INSUFFICIENT_FUNDS",
  "order_id": "6f991342-da2c-45c6-8830-8bf519cfc8cc",
  "unlocked": {
    "currency_code": "BTC",
    "amount": "1.50000000",
    "new_locked": "2.00000000"
  }
}

Account Update: Trade Settled

Emitted after an open order leads to a trade.

Trade Settled with BEST fee collection enabled

{
  "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
  "sequence": 361792,
  "update": {
    "type": "TRADE_SETTLED",
    "activity": "TRADING",
    "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
    "time": "2019-10-22T12:09:55.731Z",
    "order_id": "9fcdd91c-7f6e-45f4-9956-61cddba55de5",
    "order": {
      "amount": "0.5",
      "filled_amount": "0.5"
    },
    "trade": {
      "trade_id": "a828b63e-b2cb-48f0-8d99-8fc22cf98e08",
      "order_id": "9fcdd91c-7f6e-45f4-9956-61cddba55de5",
      "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
      "amount": "0.5",
      "side": "BUY",
      "instrument_code": "BTC_EUR",
      "price": "7451.6",
      "time": "2019-10-22T12:09:55.667Z"
    },
    "fee": {
      "fee_amount": "23.28625",
      "fee_currency": "BEST",
      "fee_percentage": "0.075",
      "fee_group_id": "default",
      "fee_type": "TAKER",
      "running_trading_volume": "0.10058",
      "collection_type": "BEST"
    },
    "spent": {
      "currency_code": "EUR",
      "amount": "3725.8",
      "new_available": "14517885.0675703028781",
      "new_locked": "2354.882"
    },
    "spent_on_fees": {
      "currency_code": "BEST",
      "amount": "23.28625",
      "new_available": "9157.31375",
      "new_locked": "0.0"
    },
    "credited": {
      "currency_code": "BTC",
      "amount": "0.5",
      "new_available": "5839.89633700481",
      "new_locked": "0.0"
    },
    "unlocked": {
      "currency_code": "EUR",
      "amount": "0.15",
      "new_available": "14517885.0675703028781",
      "new_locked": "2354.882"
    },
    "id": "70e00504-d892-456f-9aae-4da7acb36aac",
    "sequence": 361792
  },
  "time": "2019-10-22T12:09:55.731Z",
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACCOUNT_UPDATE"
}

Trade Settled with BEST fee collection enabled & Insufficient BEST Funds

{
  "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
  "sequence": 361782,
  "update": {
    "type": "TRADE_SETTLED",
    "activity": "TRADING",
    "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
    "time": "2019-10-22T12:08:30.714Z",
    "order_id": "bda1cce2-2672-4579-a58f-57210eb6c02e",
    "order": {
      "amount": "0.5",
      "filled_amount": "0.5"
    },
    "trade": {
      "trade_id": "b855d225-3a72-4b3f-8870-aea35db6a0ac",
      "order_id": "bda1cce2-2672-4579-a58f-57210eb6c02e",
      "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
      "amount": "0.5",
      "side": "BUY",
      "instrument_code": "BTC_EUR",
      "price": "7452.4",
      "time": "2019-10-22T12:08:30.648Z"
    },
    "fee": {
      "fee_amount": "0.0005",
      "fee_currency": "BTC",
      "fee_percentage": "0.1",
      "fee_group_id": "default",
      "fee_type": "TAKER",
      "running_trading_volume": "0.10058",
      "collection_type": "STANDARD",
      "fallback_reason": {
        "caused_by": "INSUFFICIENT_FUNDS",
        "best_balance": {
          "available": "0.0",
          "locked": "8781.0",
          "needed": "23.28875"
        }
      }
    },
    "spent": {
      "currency_code": "EUR",
      "amount": "3726.2",
      "new_available": "14462593.4675703028781",
      "new_locked": "61412.282"
    },
    "credited": {
      "currency_code": "BTC",
      "amount": "0.4995",
      "new_available": "5839.39633700481",
      "new_locked": "0.0"
    },
    "unlocked": {
      "currency_code": "EUR",
      "amount": "23.8",
      "new_available": "14462593.4675703028781",
      "new_locked": "61412.282"
    },
    "id": "e9b99f51-57ad-43e2-91bd-c28c4fbee457",
    "sequence": 361782
  },
  "time": "2019-10-22T12:09:55.731Z",
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACCOUNT_UPDATE"
}

Trade Settled with BEST fee collection disabled

{
  "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
  "sequence": 361801,
  "update": {
    "type": "TRADE_SETTLED",
    "activity": "TRADING",
    "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
    "time": "2019-10-22T12:12:12.745Z",
    "order_id": "f8c7e7cd-105b-48ab-a0bb-7b53e363a161",
    "order": {
      "amount": "0.5",
      "filled_amount": "0.5"
    },
    "trade": {
      "trade_id": "38875c5d-b466-4e38-beea-2f6c5d795d47",
      "order_id": "f8c7e7cd-105b-48ab-a0bb-7b53e363a161",
      "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
      "amount": "0.5",
      "side": "BUY",
      "instrument_code": "BTC_EUR",
      "price": "7451.9",
      "time": "2019-10-22T12:12:12.376Z"
    },
    "fee": {
      "fee_amount": "0.0005",
      "fee_currency": "BTC",
      "fee_percentage": "0.1",
      "fee_group_id": "default",
      "fee_type": "TAKER",
      "running_trading_volume": "0.10058",
      "collection_type": "STANDARD"
    },
    "spent": {
      "currency_code": "EUR",
      "amount": "3725.95",
      "new_available": "14508197.6920223028781",
      "new_locked": "2354.882"
    },
    "credited": {
      "currency_code": "BTC",
      "amount": "0.4995",
      "new_available": "5841.19503700481",
      "new_locked": "0.0"
    },
    "unlocked": {
      "currency_code": "EUR",
      "amount": "0.0",
      "new_available": "14508197.6920223028781",
      "new_locked": "2354.882"
    },
    "id": "fbd51897-5d7d-43b1-9551-7a76bcea1cd7",
    "sequence": 361801
  },
  "time": "2019-10-22T12:09:55.731Z",
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACCOUNT_UPDATE"
}

Account Update: Order Closed

Emitted after an open order is closed.

{
  "id": "c2373ec1-a2da-4e48-baa2-dfb774802342",
  "type": "ORDER_CLOSED",
  "activity": "TRADING",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-08-01T13:39:05.773Z",
  "order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
  "sequence": 0,
  "credited": {
    "currency_code": "EUR",
    "amount": "1.50",
    "new_balance": "5.00"
  },
  "unlocked": {
    "currency_code": "EUR",
    "amount": "1.50",
    "new_locked": "0.00"
  }
}

Account Update: Stop Order Triggered

Emitted after a stop order has been triggered.

{
  "id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
  "activity": "TRADING",
  "type": "STOP_ORDER_TRIGGERED",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-12-04T11:32:46.435Z",
  "order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
  "sequence": 0
}

Account Update: Market Order Filled

Emitted after a market order has been filled.

{
  "id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
  "activity": "TRADING",
  "type": "MARKET_ORDER_FILLED",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-12-04T11:32:46.435Z",
  "order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
  "sequence": 0,
  "filled_amount": "300.00",
  "unlocked": {
    "currency_code": "EUR",
    "amount": "1.50",
    "new_locked": "0.00"
  }
}

Account Update: Order Processing Failed

Emitted if an order fails after it was successfully executed. This situation might arise if the market was in maintenance mode and the submitted order was processed too late. The Bitpanda Pro guarantees 30 seconds as the worst case time-to-market execution.

{
  "id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
  "activity": "TRADING",
  "type": "ORDER_PROCESSING_FAILED",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-12-04T11:32:46.435Z",
  "order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
  "sequence": 0,
  "reason": "TIME_TO_MARKET_EXCEEDED",
  "unlocked": {
    "currency_code": "BTC",
    "amount": "1.00000000",
    "new_locked": "1.00000000"
  }
}

Account Update: Funds Deposited

Emitted after a user has successfully deposited funds.

{
  "id": "6d999374-760e-4ad3-95d5-bb47f86194dd",
  "activity": "FUNDING",
  "type": "FUNDS_DEPOSITED",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-08-01T13:38:46.435Z",
  "sequence": 0,
  "credited": {
    "currency_code": "BTC",
    "amount": "0.00000001",
    "new_balance": "1.00000001"
  },
  "transaction": {
    "transaction_id": "d4f11100-6116-11e9-afa4-2dfff0b4b9c8",
    "transaction_id_prefix": "C"
  }
}

Account Update: Funds Withdrawn

Emitted after a user has successfully triggered a withdrawal of funds.

{
  "id": "6d999374-760e-4ad3-95d5-bb47f86194dd",
  "activity": "FUNDING",
  "type": "FUNDS_WITHDRAWN",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-08-01T13:38:46.435Z",
  "sequence": 0,
  "deducted": {
    "currency_code": "BTC",
    "amount": "0.00000001",
    "new_balance": "1.00000001"
  },
  "transaction": {
    "transaction_id": "c9c51e30-6116-11e9-a04f-c1648a75fb19",
    "transaction_id_prefix": "F"
  }
}

Account Update: Funds Withdrawn Confirmed

Emitted after the withdrawal was confirmed by the blockchain with enough confirmations.

{
  "id": "54db98ad-4734-4706-b4d3-0ac680e6413f",
  "type": "FUNDS_WITHDRAWN_CONFIRMED",
  "activity": "FUNDING",
  "sequence": 1,
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "transaction": {
    "transaction_id": "cf7ac991-1c33-407a-b76c-cd9096451077",
    "transaction_id_prefix": "C",
    "blockchain_transaction_id": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16"
  }
}

Account Update: Funds Withdrawn Failed

Emitted after a user's withdrawal failed. The reason field should give more detailed information.

{
  "id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
  "activity": "FUNDING",
  "type": "FUNDS_WITHDRAWN_FAILED",
  "accountId": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "timestamp": "2018-12-04T11:32:46.435Z",
  "sequence": 0,
  "credited": {
    "currency": "BTC",
    "amount": "1.50000000",
    "new_available": "1.50000000",
    "new_locked": "0.00000000"
  },
  "transaction": {
    "transactionId": "9273228e-c29f-4c2f-a3c8-f92ec2d16886",
    "transactionIdPrefix": "C",
    "reason": "Reason of failed transaction"
  }
}

Account Update: Trading settings changed

Emitted when best fee collection setting is changed.

{
  "account_id": "ed524d00-820a-11e9-8f1e-69602df16d85",
  "sequence": 117885,
  "update": {
    "activity": "ACCOUNT",
    "type": "TRADING_SETTINGS_CHANGED",
    "account_id": "ed524d00-820a-11e9-8f1e-69602df16d85",
    "collect_fees_in_best": true,
    "time": "2019-10-15T10:16:03.182Z",
    "id": "03e28fb2-180a-4b83-99ee-cfe038be8817",
    "sequence": 117885
  },
  "time": "2019-10-15T10:16:03.182Z",
  "channel_name": "ACCOUNT_HISTORY",
  "type": "ACCOUNT_UPDATE"
}

Candlesticks channel

Description

Publicly available feed of market data: candlesticks.

Subscribe

Unauthenticated access to any number of instrument and time granularity pairs can be specified in the subscription request.

Valid values for time granularity are:

Unit Period
MINUTES 1
MINUTES 5
MINUTES 15
MINUTES 30
HOURS 1
HOURS 4
DAYS 1
WEEKS 1
MONTHS 1
{
  "type": "SUBSCRIBE",
  "channels": [
    {
      "name": "CANDLESTICKS",
      "properties": [
        {
          "instrument_code": "BTC_EUR",
          "time_granularity": {
            "unit": "MINUTES",
            "period": 1
          }
        },
        {
          "instrument_code": "ETH_EUR",
          "time_granularity": {
            "unit": "MINUTES",
            "period": 5
          }
        },
        {
          "instrument_code": "ETH_EUR",
          "time_granularity": {
            "unit": "MINUTES",
            "period": 15
          }
        },
        {
          "instrument_code": "BTC_EUR",
          "time_granularity": {
            "unit": "HOURS",
            "period": 1
          }
        }
      ]
    }
  ]
}

Confirmation

Confirmation message for the candlesticks subscription.

{
  "channels": [
    {
      "properties": [
        {
          "instrument_code": "BTC_USD",
          "time_granularity": {
            "unit": "MINUTES",
            "period": 1
          }
        },
        {
          "instrument_code": "BTC_EUR",
          "time_granularity": {
            "unit": "MINUTES",
            "period": 15
          }
        }
      ],
      "name": "CANDLESTICKS"
    }
  ],
  "type": "SUBSCRIPTIONS"
}

Candlesticks Snapshot

On subscribe, the latest intermediate candlesticks for all specified instrument and time granularity pairs are sent. If there is no intermediate candle then no snapshot is returned.

{
  "instrument_code": "BTC_USD",
  "granularity": {
    "unit": "MINUTES",
    "period": 1
  },
  "high": "4123.54",
  "low": "4000.12",
  "open": "4100.00",
  "close": "4000.12",
  "volume": "12.3456789",
  "time": "2018-12-03T16:25:11.875Z",
  "channel_name": "CANDLESTICKS",
  "type": "CANDLESTICK_SNAPSHOT"
}
{
  "instrument_code": "BTC_EUR",
  "granularity": {
    "unit": "MINUTES",
    "period": 5
  },
  "high": "3910.12",
  "low": "3900.12",
  "open": "3900.12",
  "close": "3900.12",
  "volume": "7.7777",
  "time": "2018-12-03T16:25:11.875Z",
  "channel_name": "CANDLESTICKS",
  "type": "CANDLESTICK_SNAPSHOT"
}

Candlesticks Update

Whenever a time period ends, the candlesticks for all specified instrument and time granularity pairs are then pushed as update.

{
  "instrument_code": "BTC_EUR",
  "granularity": {
    "unit": "MINUTES",
    "period": 1
  },
  "high": "3500.25",
  "low": "3400.25",
  "open": "3300.25",
  "close": "3200.25",
  "volume": "10",
  "time": "2018-12-03T16:26:00.003Z",
  "channel_name": "CANDLESTICKS",
  "type": "CANDLESTICK"
}

Market Ticker channel

Description

Publicly available feed of market data: market ticks. Market ticks provide a client with the following market insights:

Additionally, there is information detailing how the price evolved over the last 24hrs.

Subscribe

Unauthenticated access to any number of instruments can be specified in the subscription request. The optional price_points_mode parameter defines if hourly prices of the last 24 hours are delivered:

The price_points_mode defaults to SPLIT if not specified. OMIT or INLINE mode is recommended for best performance.

{
  "type": "SUBSCRIBE",
  "channels": [
    {
      "name": "MARKET_TICKER",
      "price_points_mode": "OMIT",
      "instrument_codes": [
        "BTC_EUR",
        "ETH_EUR"
      ]
    }
  ]
}

Confirmation

{
  "type": "SUBSCRIPTIONS",
  "channels": [
    {
      "name": "MARKET_TICKER",
      "price_points_mode": "OMIT",
      "instrument_codes": [
        "BTC_EUR",
        "ETH_EUR"
      ]
    }
  ]
}

Ticker Updates

Updates are pushed when there is new information available. If there are no changes, no updates will be pushed. The price_points attribute is only present if price_points_mode is set to INLINE when subscribing.

{
  "channel_name": "MARKET_TICKER",
  "type": "MARKET_TICKER_UPDATES",
  "time": "2019-01-01T01:01:01Z",
  "ticker_updates": [
    {
      "instrument": "BTC_EUR",
      "last_price": "2000",
      "high": "3000",
      "low": "1000",
      "price_change": "-10.0",
      "price_change_percentage": "-1.2",
      "volume": "100000",
      "price_points": [{"time": "2019-01-01T00:00:00Z", "price": "2200.0"}, {"time": "2019-01-01T01:00:00Z", "price": "2100.0"}]
    },
    {
      "instrument": "BTC_USD",
      "last_price": "2200",
      "high": "3200",
      "low": "1200",
      "price_change": "200.0",
      "price_change_percentage": "3.4",
      "volume": "100000.10",
      "price_points": [{"time": "2019-01-01T00:00:00Z", "price": "750.0"}, {"time": "2019-01-01T01:00:00Z", "price": "1500.0"}]
    }
  ]
}

Price Updates

⚠️ Price updates are deprecated and will be removed in a future api version - use the price_points_mode INLINE instead.

On every market tick update 24hr price updates are pushed:

Price update messages are sent if price_points_mode is set to SPLIT when subscribing. Otherwise this message type is not sent.

{
  "channel_name": "MARKET_TICKER",
  "type": "PRICE_POINT_UPDATES",
  "time": "2019-03-01T10:59:59.999Z",
  "price_updates": [
    {
      "instrument": "BTC_EUR",
      "prices": [
        {
          "time": "2019-03-01T08:59:59.999Z",
          "close_price": "3580.6"
        },
        {
          "time": "2019-03-01T09:59:59.999Z",
          "close_price": "3590.6"
        }
      ]
    },
    {
      "instrument": "BTC_USD",
      "prices": [
        {
          "time": "2019-03-01T08:59:59.999Z",
          "close_price": "3982.38"
        },
        {
          "time": "2019-03-01T09:59:59.999Z",
          "close_price": "3987.22"
        },
        {
          "time": "2019-03-01T10:59:59.999Z",
          "close_price": "3996.54"
        },
        {
          "time": "2019-03-01T11:59:59.999Z",
          "close_price": "3986.33"
        },
        {
          "time": "2019-03-01T12:59:59.999Z",
          "close_price": "3983.63"
        },
        {
          "time": "2019-03-01T13:59:59.999Z",
          "close_price": "3987.82"
        },
        {
          "time": "2019-03-01T14:59:59.999Z",
          "close_price": "3996.0"
        },
        {
          "time": "2019-03-01T15:59:59.999Z",
          "close_price": "3997.56"
        },
        {
          "time": "2019-03-01T16:59:59.999Z",
          "close_price": "4008.56"
        },
        {
          "time": "2019-03-01T17:59:59.999Z",
          "close_price": "4015.18"
        },
        {
          "time": "2019-03-01T18:59:59.999Z",
          "close_price": "4004.31"
        },
        {
          "time": "2019-03-01T19:59:59.999Z",
          "close_price": "4008.7"
        },
        {
          "time": "2019-03-01T20:59:59.999Z",
          "close_price": "4008.1"
        },
        {
          "time": "2019-03-01T21:59:59.999Z",
          "close_price": "4006.22"
        },
        {
          "time": "2019-03-01T22:59:59.999Z",
          "close_price": "4008.84"
        },
        {
          "time": "2019-03-01T23:59:59.999Z",
          "close_price": "4015.72"
        },
        {
          "time": "2019-03-02T00:59:59.999Z",
          "close_price": "3987.97"
        },
        {
          "time": "2019-03-02T01:59:59.999Z",
          "close_price": "3990.19"
        },
        {
          "time": "2019-03-02T02:59:59.999Z",
          "close_price": "3987.96"
        },
        {
          "time": "2019-03-02T03:59:59.999Z",
          "close_price": "3992.21"
        },
        {
          "time": "2019-03-02T04:59:59.999Z",
          "close_price": "3995.47"
        },
        {
          "time": "2019-03-02T05:59:59.999Z",
          "close_price": "4000.15"
        },
        {
          "time": "2019-03-02T06:59:59.999Z",
          "close_price": "3999.31"
        },
        {
          "time": "2019-03-02T07:54:17.915Z",
          "close_price": "4011.01"
        }
      ]
    }
  ]
}

Orderbook channel

Description

Publicly available feed of market data: order book. User has to specify depth of the order book that is to be served.

Subscribe

Unauthenticated access to any number of order books backed by instruments can be specified in the request. Depth of the displayed order book can be also defined, depth 0 means full depth.

{
  "type": "SUBSCRIBE",
  "channels": [
    {
      "name": "ORDER_BOOK",
      "depth": 200,
      "instrument_codes": [
        "BTC_EUR",
        "ETH_EUR"
      ]
    }
  ]
}

Confirmation

{
  "type": "SUBSCRIPTIONS",
  "channels": [
    {
      "name": "ORDER_BOOK",
      "depth": 200,
      "instrument_codes": [
        "BTC_EUR",
        "ETH_EUR"
      ]
    }
  ]
}

Order Book Snapshot

On subscribe, the most recent compiled order book snapshot is sent back.

An order book entry is defined as a tuple of price and amount.

[
  "123.456",
  "0.12345678"
]

Full message examples:

{
  "type": "ORDER_BOOK_SNAPSHOT",
  "channel_name": "ORDER_BOOK",
  "time": "2019-01-01T01:01:01Z",
  "instrument_code": "BTC_EUR",
  "bids": [
    [
      "6500.11",
      "0.45054140"
    ]
  ],
  "asks": [
    [
      "6500.15",
      "0.57753524"
    ]
  ]
}
{
  "type": "ORDER_BOOK_SNAPSHOT",
  "channel_name": "ORDER_BOOK",
  "time": "2019-01-01T01:01:01Z",
  "instrument_code": "ETH_EUR",
  "bids": [
    [
      "500.11",
      "0.45054140"
    ]
  ],
  "asks": [
    [
      "500.15",
      "0.57753524"
    ]
  ]
}

Order Book Updates

Whenever a subscribed order book gets modified, a list of changes is emitted.

{
  "type": "ORDER_BOOK_UPDATE",
  "channel_name": "ORDER_BOOK",
  "time": "2019-01-01T01:01:01Z",
  "instrument_code": "BTC_EUR",
  "changes": [
    [
      "BUY",
      "6500.09",
      "0.84702376"
    ],
    [
      "SELL",
      "6507.00",
      "1.88933140"
    ],
    [
      "SELL",
      "6505.54",
      "1.12386524"
    ],
    [
      "SELL",
      "6504.38",
      "0"
    ]
  ]
}

Note that the amount always specifies the actual amount and not the delta. If the amount is set to 0 it means that the price level has been removed.

Priceticks channel

Description

Publicly available feed of market data: price ticks.

Subscribe

Unauthenticated access to any number of instruments that can be specified in the request.

{
  "type": "SUBSCRIBE",
  "channels": [
    {
      "name": "PRICE_TICKS",
      "instrument_codes": [
        "BTC_EUR",
        "ETH_EUR"
      ]
    }
  ]
}

Confirmation

{
  "type": "SUBSCRIPTIONS",
  "channels": [
    {
      "name": "PRICE_TICKS",
      "instrument_codes": [
        "BTC_EUR",
        "ETH_EUR"
      ]
    }
  ]
}

Market History

A market history of the most recent price ticks is sent back.

{
    "type": "PRICE_TICK_HISTORY",
    "channel_name": "PRICE_TICKS",
    "time": "2019-01-01T01:01:01Z",
    "instrument_code": "BTC_EUR",
    "history": [...]
}

Price Ticks

Whenever an order match happens a new price tick is emitted.

{
  "type": "PRICE_TICK",
  "channel_name": "PRICE_TICKS",
  "time": "2019-01-01T01:01:01Z",
  "instrument_code": "BTC_EUR",
  "price": "6500.11",
  "amount": "1.01",
  "volume": "6565.1111",
  "best_bid": "6500.00",
  "best_ask": "6500.11",
  "taker_side": "SELL",
}
{
  "type": "PRICE_TICK",
  "channel_name": "PRICE_TICKS",
  "time": "2019-01-01T01:01:01Z",
  "instrument_code": "ETH_EUR",
  "price": "500.11",
  "amount": "1.01",
  "volume": "505.1111",
  "best_bid": "500.00",
  "best_ask": "500.11",
  "taker_side": "BUY",
}