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.
Supported libraries
Bitpanda maintains a SDK for python applications that connects to the websocket api. Visit the project repository to get started.
🚀 CCXT is our authorized SDK provider and you may access the Bitpanda API through CCXT. For more information, please visit: https://ccxt.trade
Community libraries
⚠️ Bitpanda is not testing or verifying functionality of libraries maintained by the community.
cryptoxlib-aio is a compact Python library providing access to REST and WEBSOCKET API of selected crypto exchanges.
Generalbytes crypto ATMs support Bitpanda Pro. Check the documentation to get started.
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.\n
Read- grants access to all api endpoints, except for creating or cancelling orders and transfers.\nTrade- allows creation or cancellation of orders.\nWithdraw- allows withdrawals via the Bitpanda Pro API (these withdrawals bypass two factor authentication).\n
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.
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.
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', 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
}
]
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of available currencies | Currency |
| default | Default | General error response, explanations for all error code can be found here | Error |
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. The requested time period may include at most 1500 candlesticks, for example a request for minutely candles is limited to at most 25 hours. Note that less than the theoretical number of candles may be delivered for a given time period if there are gaps in trading activity.
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"
}
]
400 Response
{
"error": "CANDLESTICKS_TIME_RANGE_TOO_BIG"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of Candlesticks | Candlestick |
| 400 | Bad Request | The requested time range of candlesticks data exceeds max. supported size of 1500 items. | Error |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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"
}
]
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Available fee groups and their fee tiers | FeeGroup |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
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. - NEW => A new instrument is launched. No trading is possible. - ACTIVE => All trading operations are supported. - SUSPENDED => Creating orders is suspended. Cancellation is possible. - IN_MAINTENANCE => Instrument is in maintenance. No trading is possible. - POST_ONLY => Only LimitOrders with post_only=true are allowed to establish liquidity in the order book. - CLOSED => A decomissioned instrument. No trading is possible. - UNDEFINED => No trading is possible. |
Enumerated Values
| Property | Value |
|---|---|
| state | NEW |
| state | ACTIVE |
| state | SUSPENDED |
| state | IN_MAINTENANCE |
| state | POST_ONLY |
| 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}', 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 order book 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 order book 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 order book side is truncated to the given depth. The order of entries is preserved. The depth of a level 1 order book 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",
"sequence": 123456,
"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"
}
]
}
default Response
{
"error": "MESSAGE"
}
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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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
The market ticker provides information about the current state of a market and summary statistics on activity within the last 24 hours. Volume, low, high and price change are calculated based on a sliding window of trades starting 24 hours and using minutely granularity. Market ticks are every minute when the 24 hour sliding window is moved forward and additionally on each trade.
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"
}
]
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of latest market-ticks | MarketTick |
| default | Default | General error response, explanations for all error code can be found here | Error |
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}', 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"
}
]
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of Market-ticks | MarketTick |
| default | Default | General error response, explanations for all error code can be found here | Error |
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}', 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. Parameter from and to are mutually inclusive. You can either use both of them or none of them.
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
}
]
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Array of price-ticks | PriceTick |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » iso | MarketTime(date-time) | true | none | Zoned date time value compliant with ISO 8601 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', 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"
}
]
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Balance information | Account |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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: JSON.stringify(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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
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}', 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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
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/{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/fiat/{currency_code}', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/deposit/fiat/{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/fiat/{currency_code}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /account/deposit/fiat/{currency_code}
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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| currency_code | path | string | true | Defines FIAT currency for which we want to deposit. |
Enumerated Values
| Parameter | Value |
|---|---|
| currency_code | EUR |
| currency_code | CHF |
| currency_code | GBP |
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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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": "123.456",
"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: JSON.stringify(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": "123.456",
"recipient": {
"address": "3NacQ7rzZdhfyAtfJ5a11k8jFPdcMP2Bq7",
"destination_tag": ""
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | WithdrawCryptoBody | true | Withdrawal information |
Example responses
200 Response
{
"amount": "123.456",
"fee": "123.456",
"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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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": "123.456",
"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: JSON.stringify(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": "123.456",
"payout_account_id": "66756a10-3e86-48f4-9678-b634c4b135b2"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | WithdrawFiatBody | 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 |
| default | Default | General error response, explanations for all error code can be found here | Error |
Response Schema
Deposits
Code samples
# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/deposits \
-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/deposits', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/deposits");
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/deposits',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /account/deposits
Return a paginated report on past cleared deposits, sorted by timestamp (newest first). If no query parameters are defined, it returns the last 100 deposits.
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 |
| currency_code | query | CurrencyCode | false | Filter withdrawal history by currency 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
{
"deposit_history": [
{
"transaction_id": "e5342efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "100",
"type": "CRYPTO",
"funds_source": "INTERNAL",
"time": "2020-04-22T09:57:47Z",
"currency": "BTC",
"fee_amount": "0.0",
"fee_currency": "BTC"
},
{
"transaction_id": "79793d00-2899-4a4d-95b7-73ae6b31384f",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"time": "2020-05-05T11:22:07.925Z",
"currency": "EUR",
"funds_source": "EXTERNAL",
"type": "FIAT",
"amount": "50.0",
"fee_amount": "0.01",
"fee_currency": "EUR"
}
],
"max_page_size": 2,
"cursor": "eyJhY2NvdW50X2lkIjp7InMiOiJlMzY5YWM4MC00NTc3LTExZTktYWUwOC05YmVkYzQ3OTBiODQiLCJzcyI6W10sIm5zIjpbXSwiYnMiOltdLCJtIjp7fSwibCI6W119LCJpdGVtX2tleSI6eyJzIjoiV0lUSERSQVdBTDo6MmFlMjYwY2ItOTk3MC00YmNiLTgxNmEtZGY4MDVmY2VhZTY1Iiwic3MiOltdLCJucyI6W10sImJzIjpbXSwibSI6e30sImwiOltdfSwiZ2xvYmFsX3dpdGhkcmF3YWxfaW5kZXhfaGFzaF9rZXkiOnsicyI6ImUzNjlhYzgwLTQ1NzctMTFlOS1hZTA4LTliZWRjNDc5MGI4NCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX0sInRpbWVzdGFtcCI6eyJuIjoiMTU4ODA1ODc2Nzk0OCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX19"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | DepositHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
Deposits Transfers
Code samples
# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/deposits/bitpanda \
-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/deposits/bitpanda', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/deposits/bitpanda");
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/deposits/bitpanda',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /account/deposits/bitpanda
Return a paginated report on past cleared deposits which were transfers from Bitpanda. This endpoint returns only transfers from Bitpanda, if you wish to see all deposits use Deposits, sorted by timestamp (newest first). If no query parameters are defined, it returns the last 100 deposits.
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 |
| currency_code | query | CurrencyCode | false | Filter withdrawal history by currency 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
{
"deposit_history": [
{
"transaction_id": "e5342efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "100",
"type": "CRYPTO",
"funds_source": "INTERNAL",
"time": "2020-04-22T09:57:47Z",
"currency": "BTC",
"fee_amount": "0.0",
"fee_currency": "BTC"
}
],
"max_page_size": 100,
"cursor": "eyJhY2NvdW50X2lkIjp7InMiOiJlMzY5YWM4MC00NTc3LTExZTktYWUwOC05YmVkYzQ3OTBiODQiLCJzcyI6W10sIm5zIjpbXSwiYnMiOltdLCJtIjp7fSwibCI6W119LCJpdGVtX2tleSI6eyJzIjoiV0lUSERSQVdBTDo6MmFlMjYwY2ItOTk3MC00YmNiLTgxNmEtZGY4MDVmY2VhZTY1Iiwic3MiOltdLCJucyI6W10sImJzIjpbXSwibSI6e30sImwiOltdfSwiZ2xvYmFsX3dpdGhkcmF3YWxfaW5kZXhfaGFzaF9rZXkiOnsicyI6ImUzNjlhYzgwLTQ1NzctMTFlOS1hZTA4LTliZWRjNDc5MGI4NCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX0sInRpbWVzdGFtcCI6eyJuIjoiMTU4ODA1ODc2Nzk0OCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX19"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful response | DepositHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
Withdrawals
Code samples
# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/withdrawals \
-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/withdrawals', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/withdrawals");
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/withdrawals',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /account/withdrawals
Returns a paginated report on past cleared withdrawals, sorted by timestamp (newest first). If no query parameters are defined, it returns the last 100 withdrawals. All transactions delivered are credited to the account.
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 |
| currency_code | query | CurrencyCode | false | Filter deposit history by currency 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
{
"withdrawal_history": [
{
"account_id": "e369ac80-4577-11e9-ae08-9bedc4790b84",
"amount": "0.1",
"currency": "BTC",
"fee_amount": "0.00002",
"fee_currency": "BTC",
"funds_source": "EXTERNAL",
"related_transaction_id": "e298341a-3855-405e-bce3-92db368a3157",
"time": "2020-05-05T11:11:32.110Z",
"transaction_id": "6693ff40-bb10-4dcf-ada7-3b287727c882",
"type": "CRYPTO"
},
{
"account_id": "e369ac80-4577-11e9-ae08-9bedc4790b84",
"amount": "0.1",
"currency": "BTC",
"fee_amount": "0.0",
"fee_currency": "BTC",
"funds_source": "INTERNAL",
"time": "2020-05-05T10:29:53.464Z",
"transaction_id": "ec9703b1-954b-4f76-adea-faac66eabc0b",
"type": "CRYPTO"
}
],
"cursor": "eyJhY2NvdW50X2lkIjp7InMiOiJlMzY5YWM4MC00NTc3LTExZTktYWUwOC05YmVkYzQ3OTBiODQiLCJzcyI6W10sIm5zIjpbXSwiYnMiOltdLCJtIjp7fSwibCI6W119LCJpdGVtX2tleSI6eyJzIjoiV0lUSERSQVdBTDo6ZWM5NzAzYjEtOTU0Yi00Zjc2LWFkZWEtZmFhYzY2ZWFiYzBiIiwic3MiOltdLCJucyI6W10sImJzIjpbXSwibSI6e30sImwiOltdfSwiZ2xvYmFsX3dpdGhkcmF3YWxfaW5kZXhfaGFzaF9rZXkiOnsicyI6ImUzNjlhYzgwLTQ1NzctMTFlOS1hZTA4LTliZWRjNDc5MGI4NCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX0sInRpbWVzdGFtcCI6eyJuIjoiMTU4ODY3NDU5MzQ2NCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX19",
"max_page_size": 2
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | WithdrawalHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
Withdrawals Transfers
Code samples
# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/withdrawals/bitpanda \
-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/withdrawals/bitpanda', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/withdrawals/bitpanda");
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/withdrawals/bitpanda',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /account/withdrawals/bitpanda
Return a paginated report on past deposits which were transfers from Bitpanda. This endpoint returns only transfers from Bitpanda, if you wish to see all deposits use Withdrawals, sorted by timestamp (newest first). If no query parameters are defined, it returns the last 100 withdrawals.
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 |
| currency_code | query | CurrencyCode | false | Filter deposit history by currency 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
{
"withdrawal_history": [
{
"transaction_id": "4b34ff14-5f0f-443b-8cd8-0fd7cf0d7d9a",
"account_id": "e369ac80-4577-11e9-ae08-9bedc4790b84",
"time": "2020-05-05T09:04:47.999Z",
"currency": "EUR",
"funds_source": "INTERNAL",
"type": "FIAT",
"amount": "5.0",
"fee_amount": "0.0",
"fee_currency": "EUR"
},
{
"transaction_id": "606bbbe2-b089-4d8d-8034-25142f74d0ef",
"account_id": "e369ac80-4577-11e9-ae08-9bedc4790b84",
"time": "2020-05-05T09:03:49.867Z",
"currency": "BTC",
"funds_source": "INTERNAL",
"type": "CRYPTO",
"amount": "0.001",
"fee_amount": "0.0",
"fee_currency": "BTC"
}
],
"max_page_size": 2,
"cursor": "eyJhY2NvdW50X2lkIjp7InMiOiJlMzY5YWM4MC00NTc3LTExZTktYWUwOC05YmVkYzQ3OTBiODQiLCJzcyI6W10sIm5zIjpbXSwiYnMiOltdLCJtIjp7fSwibCI6W119LCJpdGVtX2tleSI6eyJzIjoiV0lUSERSQVdBTDo6NjA2YmJiZTItYjA4OS00ZDhkLTgwMzQtMjUxNDJmNzRkMGVmIiwic3MiOltdLCJucyI6W10sImJzIjpbXSwibSI6e30sImwiOltdfSwiZ2xvYmFsX3dpdGhkcmF3YWxfaW5kZXhfaGFzaF9rZXkiOnsicyI6ImUzNjlhYzgwLTQ1NzctMTFlOS1hZTA4LTliZWRjNDc5MGI4NCIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX0sInRpbWVzdGFtcCI6eyJuIjoiMTU4ODY2OTQyOTg2NyIsInNzIjpbXSwibnMiOltdLCJicyI6W10sIm0iOnt9LCJsIjpbXX19"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | WithdrawalHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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"
}
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Fee information for account | AccountFeeGroup |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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: JSON.stringify(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"
}
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | AccountFeeGroup |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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 corresponding to the orders. It may be significantly 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,
"order_book_sequence": 123456,
"update_modification_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
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Order history for account | OrderHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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",
"side": "BUY",
"type": "MARKET",
"amount": "1.23"
};
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: JSON.stringify(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.
Additionally, LIMIT Orders support GOOD_TILL_CANCELLED, GOOD_TILL_TIME,
IMMEDIATE_OR_CANCELLED and FILL_OR_KILL which can be specified as time_in_force option.
If none is specified GOOD_TILL_CANCELLED is assumed. If GOOD_TILL_TIME is set as time_in_force,
client is also expected to provide time after which the limit order expires.
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 track orders without waiting for the assigned order id.
While an order with a set client_id is active other orders with the same client_id will be rejected as
duplicates.
As soon as the order is fully filled or cancelled by user or automatically by system, another order can be
created using the same client_id.
Therefore specifying a client_id is not a suitable protection against re-execution of an order.
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",
"side": "BUY",
"type": "MARKET",
"amount": "1.23"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateOrder | true | none |
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"
}
422 Response
{
"error": "INSUFFICIENT_FUNDS"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The order is valid and was successfuly accepted. | OrderSubmitted |
| 400 | Bad Request | An invalid body was provided and therefore the request was rejected. Check the error code for details. | Error |
| 422 | Unprocessable Entity | The request is unprocessable. Check the error code for details. | Error |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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 multiple 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 |
| default | Default | General error response, explanations for all error code can be found here | 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}', 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 updated or 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,
"order_book_sequence": 123456,
"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
}
}
]
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | OrderHistoryEntry |
| default | Default | General error response, explanations for all error code can be found here | Error |
Update Order by Order Id
Code samples
# You can also use wget
curl -X PUT https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id} \
-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.put('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}', 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("PUT");
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 = {
"amount": "12.34"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /account/orders/{order_id}
Update an Order identified by Order Id
Submits a request to update an open order by providing a valid order_id. Only updating amount is supported. Bitpanda Pro guarantees in-place order updates when amount gets decreased and a price-time-priority when client requests an increase of traded amount. A successful response will indicate the requested order update will be submitted to order book and a final confirmation is sent to the ACCOUNT_HISTORY and TRADING web socket channels. In some cases, an order can not be updated successfully as it has already been closed or filled. An error response will point to the reason in a such scenario.
Body parameter
{
"amount": "12.34"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | A new positive non-null amount which will replace the previous value |
| » amount | body | string | true | A new positive non-null amount which will replace the previous value |
| order_id | path | string(uuid) | true | Order Id of order which should be updated or closed. |
Example responses
202 Response
{
"order_id": "36bb2437-7402-4794-bf26-4bdf03526439",
"updates": {
"previous_amount": "10.0",
"amount_delta": "2.34",
"new_amount": "12.34",
"time": "2020-10-09T15:05:32.564Z"
}
}
Order update failed due to client error
{
"error": "INVALID_AMOUNT"
}
{
"error": "BAD_AMOUNT_PRECISION"
}
{
"error": "MISSING_AMOUNT"
}
{
"error": "MIN_SIZE_NOT_SATISFIED"
}
Requested amount is lower than the remaining amount of the order
{
"error": "UPDATE_AMOUNT_ALREADY_FILLED"
}
Requested amount is same as the amount of the order
{
"error": "AMOUNT_ALREADY_PRESENT"
}
Requested order amount is not backed by sufficient funding
{
"error": "INSUFFICIENT_FUNDS"
}
404 Response
{
"error": "ORDER_NOT_FOUND"
}
409 Response
{
"error": "PENDING_ORDER_UPDATE_CONFLICT"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 202 | Accepted | Order update successfully submitted | OrderUpdated |
| 400 | Bad Request | Order update failed due to client error | Error |
| 404 | Not Found | Order to update not found, it might have already been fully-filled or closed | Error |
| 409 | Conflict | Conflicting pending order update found | Error |
| default | Default | General error response, explanations for all error code can be found here | Error |
Close Order by Order Id
Code samples
# You can also use wget
curl -X DELETE 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.delete('https://api.exchange.bitpanda.com/public/v1/account/orders/{order_id}', 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 = {
'Accept':'application/json',
'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 by Order Id
Submits a request to close an open order by providing a valid order_id.
Closing by client_id is possible here.
A successful response indicates that the order cancellation has been accepted, a final confirmation of closing is sent to
the ACCOUNT_HISTORY and TRADING web socket channels. Additionally
the account history via REST API will contain the event. 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.
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 |
|---|---|---|---|---|
| order_id | path | string(uuid) | true | Order Id of order which should be updated or closed. |
Example responses
404 Response
{
"error": "INVALID_ORDER_ID"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Order cancellation has been submitted | None |
| 404 | Not Found | Order not found, it might be already closed | Error |
| default | Default | General error response, explanations for all error code can be found here | Error |
Close Order by Client Id
Code samples
# You can also use wget
curl -X DELETE https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_id} \
-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/client/{client_id}', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_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 = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /account/orders/client/{client_id}
Close an Order by Client Id
Submits a request to close an open order by providing a valid client_id. Closing by order_id is possible here.
A successful response indicates that the order cancellation has been accepted, a final confirmation of closing is sent to the ACCOUNT_HISTORY and TRADING web socket channels. Additionally the account history via REST API will contain the event. 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.
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 |
|---|---|---|---|---|
| client_id | path | string(uuid) | true | Client id of order which should be closed, updated or fetched. |
Example responses
404 Response
{
"error": "INVALID_CLIENT_UUID"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Order cancellation has been submitted | None |
| 404 | Not Found | Order not found, it might be already closed | Error |
| 422 | Unprocessable Entity | Request could not be processed | None |
| default | Default | General error response, explanations for all error code can be found here | Error |
Get Order by Client Id
Code samples
# You can also use wget
curl -X GET https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_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/client/{client_id}', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_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/client/{client_id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /account/orders/client/{client_id}
Get Order by Client Id
Returns single order identified by specified client_id. This client_id can be defined when creating orders.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| client_id | path | string(uuid) | true | Client id of order which should be closed, updated or fetched. |
Example responses
200 Response
{
"order": {
"order_id": "c01b8077-ed48-47a9-83b0-2f2dc9f3cb28",
"account_id": "55005f30-5a9f-11e9-9d51-d3015958f2ff",
"time_last_updated": "2020-12-30T12:54:33.679Z",
"sequence": 463411068,
"order_book_sequence": 463411110,
"price": "22695.45",
"filled_amount": "1.0",
"amount": "1.0",
"status": "FILLED_FULLY",
"average_price": "22697.5600975",
"instrument_code": "BTC_EUR",
"side": "BUY",
"type": "MARKET",
"is_post_only": false,
"client_id": "2677aeb3-8b36-48b4-a74d-342a772724d7",
"time": "2020-12-30T12:54:32.967Z"
}
}
400 Response
{
"error": "INVALID_CLIENT_ID"
}
404 Response
{
"error": "NOT_FOUND"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Order has been found | OrderHistoryEntry |
| 400 | Bad Request | Invalid client id | Error |
| 404 | Not Found | Order not found | Error |
| default | Default | General error response, explanations for all error code can be found here | Error |
Update Order by Client Id
Code samples
# You can also use wget
curl -X PUT https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_id}', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
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 = {
"amount": "12.34"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/client/{client_id}',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /account/orders/client/{client_id}
Update an Order identified by Client Id
Submits a request to update an open order by providing a valid client_id.
Only updating amount is supported. Bitpanda Pro guarantees in-place order updates
when amount gets decreased and a price-time-priority when client requests
an increase of traded amount. A successful response will indicate the requested order update
will be submitted to order book and a final confirmation is sent to
the ACCOUNT_HISTORY and TRADING web socket channels. In some cases,
an order can not be updated successfully as it has already been closed
or filled. An error response will point to
the reason in a such scenario.
Body parameter
{
"amount": "12.34"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | A new positive non-null amount which will replace the previous value |
| » amount | body | string | true | A new positive non-null amount which will replace the previous value |
| client_id | path | string(uuid) | true | Client id of order which should be closed, updated or fetched. |
Example responses
202 Response
{
"order_id": "36bb2437-7402-4794-bf26-4bdf03526439",
"client_id": "c01b8077-ed48-47a9-83b0-2f2dc9f3cb28",
"updates": {
"previous_amount": "10.0",
"amount_delta": "2.34",
"new_amount": "12.34",
"time": "2020-10-09T15:05:32.564Z"
}
}
Order update failed due to client error
{
"error": "INVALID_AMOUNT"
}
{
"error": "BAD_AMOUNT_PRECISION"
}
{
"error": "MISSING_AMOUNT"
}
{
"error": "MIN_SIZE_NOT_SATISFIED"
}
Requested amount is lower than the remaining amount of the order
{
"error": "UPDATE_AMOUNT_ALREADY_FILLED"
}
Requested amount is same as the amount of the order
{
"error": "AMOUNT_ALREADY_PRESENT"
}
Requested order amount is not backed by sufficient funding
{
"error": "INSUFFICIENT_FUNDS"
}
404 Response
{
"error": "ORDER_NOT_FOUND"
}
409 Response
{
"error": "PENDING_ORDER_UPDATE_CONFLICT"
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 202 | Accepted | Order update successfully submitted | OrderUpdated |
| 400 | Bad Request | Order update failed due to client error | Error |
| 404 | Not Found | Order to update not found, it might have already been fully-filled or closed | Error |
| 409 | Conflict | Conflicting pending order update found | Error |
| default | Default | General error response, explanations for all error code can be found here | Error |
Activate Close All Orders Automatically
Code samples
# You can also use wget
curl -X POST https://api.exchange.bitpanda.com/public/v1/account/orders/cancel-all-after \
-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/cancel-all-after', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/cancel-all-after");
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 = {
"timeout": 60000
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://api.exchange.bitpanda.com/public/v1/account/orders/cancel-all-after',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /account/orders/cancel-all-after
Bitpanda Pro allows clients to help prevent unexpected losses from network or infrastructure failures by invoking "Dead Man's Switch" functionality. This means all active orders will be automatically cancelled in case client fails to renew cancellation lease.
Only advanced users of Bitpanda Pro should use this functionality. To activate auto-cancellation timer, client is expected to instruct a valid timeout value in the range of '1000' and '3600000' milliseconds (1 second and 1 hour respectively).
To de-activate auto-cancellation timer, client invokes DELETE method on this endpoint.
We suggest clients allow sufficient headroom for timer increases to avoid unintended order cancellations. As such a setup of initial timeout of '60000' (one minute) and subsequent periodic cancellation lease renewal in 15 second intervals should keep your orders open in case of a network glitch, while still offering significant protection in case of a prolonged infrastructure outage.
As for other trading resources, a valid api key with the scope TRADE is expected for this private resource,
otherwise request will fail to get authorized. Invocation of this endpoint counts toward your
account rate limit quota.
Body parameter
{
"timeout": 60000
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » timeout | body | number | false | Time in milliseconds after which orders will be automatically cancelled (relative to server time). |
Example responses
201 Response
{
"timeout": "60000,",
"time": "2020-07-07T08:00:44.379Z",
"time_cancel_all_after": "2020-07-07T08:01:45Z"
}
400 Response
{
"error": "INVALID_AUTO_CANCELLATION_TIMER"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The auto-cancellation timer was successfuly created. | None |
| 400 | Bad Request | An invalid body was provided and therefore the request was rejected. | Inline |
Response Schema
Deactivate Close All Orders Automatically
Code samples
# You can also use wget
curl -X DELETE https://api.exchange.bitpanda.com/public/v1/account/orders/cancel-all-after \
-H 'Authorization: Bearer {access-token}'
import requests
headers = {
'Authorization': 'Bearer {access-token}'
}
r = requests.delete('https://api.exchange.bitpanda.com/public/v1/account/orders/cancel-all-after', headers = headers)
print(r.json())
URL obj = new URL("https://api.exchange.bitpanda.com/public/v1/account/orders/cancel-all-after");
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/cancel-all-after',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /account/orders/cancel-all-after
Deactivates an existing auto-cancellation timer. This operation is idempotent but counts toward your account rate limit quota.
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | The auto-cancellation timer was successfuly cancelled. | 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', 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 |
| 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 | Cursor specifying the position from which the next pages should be returned. |
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
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | TradeHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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 you want to query specific time frame parameters, from and to are mandatory, otherwise it will start from the latest trades. 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 |
| 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": "123.456",
"side": "BUY",
"instrument_code": "BTC_EUR",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"price_tick_sequence": 0,
"sequence": 123456789
},
"fee": {
"fee_amount": "123.456",
"fee_percentage": "123.456",
"fee_group_id": "default",
"running_trading_volume": "123.456",
"fee_currency": "BTC",
"fee_type": "TAKER"
}
}
],
"max_page_size": 0,
"cursor": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | TradeHistory |
| default | Default | General error response, explanations for all error code can be found here | Error |
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}', 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"
}
}
default Response
{
"error": "MESSAGE"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Trade information | TradeHistoryEntry |
| default | Default | General error response, explanations for all error code can be found here | Error |
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', 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
"123.456"
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
"2019-08-24T14:15:22Z"
Zoned date time value compliant with ISO 8601 which adheres to RFC3339. All market times are in UTC.
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | string(date-time) | false | Zoned date time value compliant with ISO 8601 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 for any monetary currency. |
| 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,
"time": "2019-08-24T14:15:22Z",
"state": "ACTIVE",
"is_frozen": 0,
"quote_volume": "123.456",
"base_volume": "123.456",
"last_price": "123.456",
"best_bid": "123.456",
"best_ask": "123.456",
"price_change": "123.456",
"price_change_percentage": "123.456",
"high": "123.456",
"low": "123.456"
}
*Statistics on market activity within the last 24 hours. Market ticks are updated on every trade of a market and use a sliding window with minutely granularity to calculate statistics on activity with 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. |
| time | MarketTime | false | The time at which the market tick was calculated. |
| 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 | Volume within the last 24 hours in the quote currency. |
| base_volume | BigDecimal | true | Volume within the last 24 hours 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 | Relative 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": "123.456",
"available": "123.456",
"locked": "123.456",
"sequence": 123456789,
"time": "2019-08-24T14:15:22Z"
}
]
}
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": "123.456",
"available": "123.456",
"locked": "123.456",
"sequence": 123456789,
"time": "2019-08-24T14:15:22Z"
}
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 compliant with ISO 8601 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",
"client_id": "2677aeb3-8b36-48b4-a44d-342a772724d7",
"instrument_code": "BTC_EUR",
"amount": "123.456",
"filled_amount": "123.456",
"side": "BUY",
"type": "LIMIT",
"status": "OPEN",
"sequence": 123456789,
"order_book_sequence": 0,
"update_modification_sequence": 0,
"price": "123.456",
"average_price": "123.456",
"reason": "INSUFFICIENT_FUNDS",
"time": "2019-08-24T14:15:22Z",
"time_in_force": "GOOD_TILL_CANCELLED",
"time_last_updated": "2019-08-24T14:15:22Z",
"expire_after": "2019-08-24T14:15:22Z",
"is_post_only": false,
"time_triggered": "2019-08-24T14:15:22Z",
"trigger_price": "123.456"
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| order_id | string(uuid) | true | Uniquely identifies order. |
| account_id | string(uuid) | true | Uniquely identifies account. |
| client_id | string(uuid) | false | Unique idenfier defined by client for this order |
| 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 | true | 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 | true | Global monotonically-increasing numerical sequence bound to account activity. |
| order_book_sequence | OrderBookSequence | true | Highest orderbook sequence recorded for the order. |
| update_modification_sequence | number | false | Last orderbook sequence which was emmited by update order modification (changing Amount of placed order), this field contains an orderbook sequence of such modification which has been already applied to the order. |
| price | BigDecimal | true | The price at which the order is set to execute. Applicable to LIMIT and STOP orders. |
| average_price | BigDecimal | true | Weighed average price of all trades belonging to this order. Missing if there are no trades for this order. |
| 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. Lastly, if GOOD_TILL_TIME is specified, client is also required to provide a valid expiration date time. |
| time_last_updated | MarketTime | true | The time at which the order was last updated, i.e. the order status changed. |
| expire_after | MarketTime | false | Valid MarketTime adjusted to minutely granularity |
| is_post_only | boolean | false | Only applicable to GOOD_TILL_CANCELLED and GOOD_TILL_TIME as time-in-force. When set to true (defaults to false), the order will be executed with a booking guarantee unless it results in a price match in which case it gets automatically cancelled. |
| 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 | GOOD_TILL_TIME |
| time_in_force | IMMEDIATE_OR_CANCELLED |
| time_in_force | FILL_OR_KILL |
OrderSubmitted
{
"order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
"account_id": "1eb2ad5d-55f1-40b5-bc92-7dc05869e905",
"instrument_code": "BTC_EUR",
"amount": "123.456",
"filled_amount": "123.456",
"side": "BUY",
"type": "LIMIT",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"time_in_force": "GOOD_TILL_CANCELLED",
"is_post_only": false,
"trigger_price": "123.456",
"client_id": "5b3fa7ba-57d3-4017-a65b-d57dcd2db643"
}
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 |
| price | BigDecimal | true | The price at which the order is set to execute. Applicable to LIMIT and STOP orders. |
| 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. Lastly, if GOOD_TILL_TIME is specified, client is also required to provide a valid expiration date time. |
| is_post_only | boolean | false | Only applicable to GOOD_TILL_CANCELLED and GOOD_TILL_TIME as time-in-force. When set to true (defaults to false), the order will be executed with a booking guarantee unless it results in a price match in which case it gets automatically cancelled. |
| 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. |
| client_id | string(uuid) | false | User specified client_id for this order. It is used if you need assign custom UUIDs to the orders to help keeping track of them. |
Enumerated Values
| Property | Value |
|---|---|
| type | LIMIT |
| type | MARKET |
| type | STOP |
| time_in_force | GOOD_TILL_CANCELLED |
| time_in_force | GOOD_TILL_TIME |
| time_in_force | IMMEDIATE_OR_CANCELLED |
| time_in_force | FILL_OR_KILL |
OrderBookSequence
0
monotonically increasing sequence number of single increments which progresses whenever order book changes due to market activity. Market data carrying this sequence is always totally ordered.
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | number | false | monotonically increasing sequence number of single increments which progresses whenever order book changes due to market activity. Market data carrying this sequence is always totally ordered. |
PriceTickSequence
0
monotonically increasing sequence number of single increments which progresses whenever a new price is emmitted due to trading activity. Market data carrying this sequence is always totally ordered.
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | number | false | monotonically increasing sequence number of single increments which progresses whenever a new price is emmitted due to trading activity. Market data carrying this sequence is always totally ordered. |
OrderBookEntry
{
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
Represent bid and ask entries in a (compiled) orderbook
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| price | BigDecimal | true | Price of the price level. |
| amount | BigDecimal | true | Size of the price level. |
| number_of_orders | integer | false | If the entry is a compiled pricelevel this field represents sum of orders included in this price level. |
| order_id | string(uuid) | false | If the entry represents an individual order, its unique id |
OrderBook
{
"instrument_code": "BTC_EUR",
"time": "2019-08-24T14:15:22Z",
"sequence": 12345,
"bids": [
{
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
],
"asks": [
{
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
]
}
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 compliant with ISO 8601 which adheres to RFC3339. All market times are in UTC. |
| sequence | number | false | The value of the current order book sequence. See orderbook sequencing for more details. |
| bids | [OrderBookEntry] | true | [Represent bid and ask entries in a (compiled) orderbook] |
| asks | [OrderBookEntry] | true | [Represent bid and ask entries in a (compiled) orderbook] |
OrderBookLevelOne
{
"instrument_code": "BTC_EUR",
"time": "2019-08-24T14:15:22Z",
"sequence": 0,
"bids": {
"value": {
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
},
"asks": {
"value": {
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
}
}
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 compliant with ISO 8601 which adheres to RFC3339. All market times are in UTC. |
| sequence | OrderBookSequence | false | monotonically increasing sequence number of single increments which progresses whenever order book changes due to market activity. Market data carrying this sequence is always totally ordered. |
| bids | object | true | none |
| » value | OrderBookEntry | false | Represent bid and ask entries in a (compiled) orderbook |
| asks | object | true | none |
| » value | OrderBookEntry | false | Represent bid and ask entries in a (compiled) orderbook |
Candlestick
{
"last_sequence": 12345,
"instrument_code": "BTC_EUR",
"granularity": {
"unit": "MINUTES",
"period": 1
},
"high": "123.456",
"low": "123.456",
"open": "123.456",
"close": "123.456",
"total_amount": "123.456",
"volume": "123.456",
"time": "2019-08-24T14:15:22Z"
}
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 (see PriceTickSequence) 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 | Cutoff time for the candlestick. It is the time at the right end of the candlestick interval window. |
CreateOrder
{
"instrument_code": "BTC_EUR",
"type": "LIMIT",
"side": "BUY",
"amount": "123.456",
"price": "123.456",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"time_in_force": "GOOD_TILL_CANCELLED",
"expire_after": "2019-08-24T14:15:22Z",
"is_post_only": false
}
A wrapper for accepted order types which can be submitted for execution.
Properties
oneOf
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | CreateLimitOrder | false | none |
xor
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | CreateMarketOrder | false | none |
xor
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | CreateStopOrder | false | none |
CreateLimitOrder
{
"instrument_code": "BTC_EUR",
"type": "LIMIT",
"side": "BUY",
"amount": "123.456",
"price": "123.456",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"time_in_force": "GOOD_TILL_CANCELLED",
"expire_after": "2019-08-24T14:15:22Z",
"is_post_only": false
}
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. |
| 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. |
| expire_after | MarketTime | false | Only applicable to GOOD_TILL_TIME as time-in-force. The expiration time must be a valid MarketTime in the future relative to observed server time adjusted to minutely granularity. |
| is_post_only | boolean | false | Only applicable to GOOD_TILL_CANCELLED and GOOD_TILL_TIME as time-in-force. When set to true (defaults to false), the order will be executed with a booking guarantee unless it results in a price match in which case it gets automatically cancelled. |
Enumerated Values
| Property | Value |
|---|---|
| type | LIMIT |
| time_in_force | GOOD_TILL_CANCELLED |
| time_in_force | GOOD_TILL_TIME |
| time_in_force | IMMEDIATE_OR_CANCELLED |
| time_in_force | FILL_OR_KILL |
CreateStopOrder
{
"instrument_code": "BTC_EUR",
"type": "STOP",
"side": "BUY",
"amount": "123.456",
"price": "123.456",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"trigger_price": "123.456"
}
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 | true | 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. |
| 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. |
| trigger_price | BigDecimal | true | 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. |
Enumerated Values
| Property | Value |
|---|---|
| type | STOP |
CreateMarketOrder
{
"instrument_code": "BTC_EUR",
"type": "MARKET",
"side": "BUY",
"amount": "123.456",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206"
}
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 |
| 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. |
Enumerated Values
| Property | Value |
|---|---|
| type | MARKET |
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": "123.456",
"maker_fee": "123.456",
"taker_fee": "123.456"
}
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 |
OrderUpdated
{
"order_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"client_id": "c01b8077-ed48-47a9-83b0-2f2dc9f3cb28",
"updates": {
"previous_amount": "123.456",
"amount_delta": "123.456",
"new_amount": "123.456",
"time": "2019-08-24T14:15:22Z"
}
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| order_id | string(uuid) | true | none |
| client_id | string(uuid) | false | none |
| updates | object | true | none |
| » previous_amount | BigDecimal | true | The number of units order was previously opened for |
| » amount_delta | BigDecimal | true | The number of units order changed with respect to previous amount. This value can be negative. |
| » new_amount | BigDecimal | true | The number of units order is currently opened for |
| » time | MarketTime | true | Time of the issued request to update order. |
AccountFeeGroup
{
"account_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"running_trading_volume": "123.456",
"active_fee_tier": {
"fee_group_id": "default",
"volume": "123.456",
"maker_fee": "123.456",
"taker_fee": "123.456"
},
"collect_fees_in_best": true,
"fee_discount_rate": "123.456",
"minimum_price_value": "123.456",
"fee_group_id": "default",
"fee_tiers": [
{
"fee_group_id": "default",
"volume": "123.456",
"maker_fee": "123.456",
"taker_fee": "123.456"
}
]
}
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": "123.456",
"maker_fee": "123.456",
"taker_fee": "123.456"
}
],
"fee_discount_rate": "123.456",
"minimum_price_value": "123.456"
}
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": "123.456",
"side": "BUY",
"instrument_code": "BTC_EUR",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"price_tick_sequence": 0,
"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 compliant with ISO 8601 which adheres to RFC3339. All market times are in UTC. |
| price_tick_sequence | PriceTickSequence | false | monotonically increasing sequence number of single increments which progresses whenever a new price is emmitted due to trading activity. Market data carrying this sequence is always totally ordered. |
| sequence | AccountSequence | true | Global monotonically-increasing numerical sequence bound to account activity. |
TradingVolume
{
"volume": "123.456"
}
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": "123.456",
"amount": "123.456",
"volume": "123.456",
"sequence": 0,
"taker_side": "BUY",
"time": "2019-08-24T14:15:22Z",
"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 | PriceTickSequence | true | monotonically increasing sequence number of single increments which progresses whenever a new price is emmitted due to trading activity. Market data carrying this sequence is always totally ordered. |
| taker_side | Side | true | Denotes which side had the the taker of the trade. |
| time | MarketTime | true | Zoned date time value compliant with ISO 8601 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": "123.456",
"side": "BUY",
"instrument_code": "BTC_EUR",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"price_tick_sequence": 0,
"sequence": 123456789
},
"fee": {
"fee_amount": "123.456",
"fee_percentage": "123.456",
"fee_group_id": "default",
"running_trading_volume": "123.456",
"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",
"client_id": "2677aeb3-8b36-48b4-a44d-342a772724d7",
"instrument_code": "BTC_EUR",
"amount": "123.456",
"filled_amount": "123.456",
"side": "BUY",
"type": "LIMIT",
"status": "OPEN",
"sequence": 123456789,
"order_book_sequence": 0,
"update_modification_sequence": 0,
"price": "123.456",
"average_price": "123.456",
"reason": "INSUFFICIENT_FUNDS",
"time": "2019-08-24T14:15:22Z",
"time_in_force": "GOOD_TILL_CANCELLED",
"time_last_updated": "2019-08-24T14:15:22Z",
"expire_after": "2019-08-24T14:15:22Z",
"is_post_only": false,
"time_triggered": "2019-08-24T14:15:22Z",
"trigger_price": "123.456"
},
"trades": [
{
"trade": {
"trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "123.456",
"side": "BUY",
"instrument_code": "BTC_EUR",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"price_tick_sequence": 0,
"sequence": 123456789
},
"fee": {
"fee_amount": "123.456",
"fee_percentage": "123.456",
"fee_group_id": "default",
"running_trading_volume": "123.456",
"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",
"client_id": "2677aeb3-8b36-48b4-a44d-342a772724d7",
"instrument_code": "BTC_EUR",
"amount": "123.456",
"filled_amount": "123.456",
"side": "BUY",
"type": "LIMIT",
"status": "OPEN",
"sequence": 123456789,
"order_book_sequence": 0,
"update_modification_sequence": 0,
"price": "123.456",
"average_price": "123.456",
"reason": "INSUFFICIENT_FUNDS",
"time": "2019-08-24T14:15:22Z",
"time_in_force": "GOOD_TILL_CANCELLED",
"time_last_updated": "2019-08-24T14:15:22Z",
"expire_after": "2019-08-24T14:15:22Z",
"is_post_only": false,
"time_triggered": "2019-08-24T14:15:22Z",
"trigger_price": "123.456"
},
"trades": [
{
"trade": {
"trade_id": "2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"order_id": "66756a10-3e86-48f4-9678-b634c4b135b2",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "123.456",
"side": "BUY",
"instrument_code": "BTC_EUR",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"price_tick_sequence": 0,
"sequence": 123456789
},
"fee": {
"fee_amount": "123.456",
"fee_percentage": "123.456",
"fee_group_id": "default",
"running_trading_volume": "123.456",
"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": "123.456",
"side": "BUY",
"instrument_code": "BTC_EUR",
"price": "123.456",
"time": "2019-08-24T14:15:22Z",
"price_tick_sequence": 0,
"sequence": 123456789
},
"fee": {
"fee_amount": "123.456",
"fee_percentage": "123.456",
"fee_group_id": "default",
"running_trading_volume": "123.456",
"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. |
DepositHistory
{
"deposit_history": [
{
"transaction_id": "C2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "123.456",
"type": "FIAT",
"funds_source": "INTERNAL",
"time": "2019-08-24T14:15:22Z",
"currency": "BTC",
"fee_amount": "123.456",
"fee_currency": "BTC",
"related_transaction_id": "e298341a-3855-405e-bce3-92db368a3157"
}
],
"max_page_size": 100,
"cursor": "string"
}
Paginated collection of deposits
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| deposit_history | [Deposit] | true | none |
| 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. |
WithdrawalHistory
{
"withdrawal_history": [
{
"transaction_id": "C2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"type": "FIAT",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "123.456",
"time": "2019-08-24T14:15:22Z",
"funds_source": "INTERNAL",
"currency": "BTC",
"fee_amount": "123.456",
"fee_currency": "BTC",
"blockchain_transaction_id": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16",
"related_transaction_id": "e298341a-3855-405e-bce3-92db368a3157"
}
],
"max_page_size": 100,
"cursor": "string"
}
Paginated collection of withdrawals
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| withdrawal_history | [Withdrawal] | true | none |
| 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. |
Deposit
{
"transaction_id": "C2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "123.456",
"type": "FIAT",
"funds_source": "INTERNAL",
"time": "2019-08-24T14:15:22Z",
"currency": "BTC",
"fee_amount": "123.456",
"fee_currency": "BTC",
"related_transaction_id": "e298341a-3855-405e-bce3-92db368a3157"
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| transaction_id | string | true | Unique identifier for transaction |
| 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. |
| type | TransactionType | true | Represents a type of transaction |
| funds_source | FundsSource | true | Has value internal if it is transfer from Bitpanda Pro to Bitpanda or vice versa |
| time | MarketTime | true | Zoned date time value compliant with ISO 8601 which adheres to RFC3339. All market times are in UTC. |
| currency | CurrencyCode | true | Currency code for any monetary currency. |
| fee_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. |
| fee_currency | CurrencyCode | true | Currency code for any monetary currency. |
| related_transaction_id | string(uuid) | false | A transaction id of the related transaction, used in failed transactions only. |
Withdrawal
{
"transaction_id": "C2b42efcd-d5b7-4a56-8e12-b69ffd68c5ef",
"type": "FIAT",
"account_id": "c2d0076a-c20d-41f8-9e9a-1a1d028b2b58",
"amount": "123.456",
"time": "2019-08-24T14:15:22Z",
"funds_source": "INTERNAL",
"currency": "BTC",
"fee_amount": "123.456",
"fee_currency": "BTC",
"blockchain_transaction_id": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16",
"related_transaction_id": "e298341a-3855-405e-bce3-92db368a3157"
}
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| transaction_id | string | true | Unique identifier for transaction |
| type | TransactionType | true | Represents a type of transaction |
| 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. |
| time | MarketTime | true | Zoned date time value compliant with ISO 8601 which adheres to RFC3339. All market times are in UTC. |
| funds_source | FundsSource | true | Has value internal if it is transfer from Bitpanda Pro to Bitpanda or vice versa |
| currency | CurrencyCode | true | Currency code for any monetary currency. |
| fee_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. |
| fee_currency | CurrencyCode | true | Currency code for any monetary currency. |
| blockchain_transaction_id | string | false | Blockchain transaction id of the withdrawal transaction |
| related_transaction_id | string(uuid) | false | A transaction id of the related transaction, used in failed transactions only. |
TransactionType
"FIAT"
Represents a type of transaction
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | string | false | Represents a type of transaction |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | FIAT |
| anonymous | CRYPTO |
FundsSource
"INTERNAL"
Has value internal if it is transfer from Bitpanda Pro to Bitpanda or vice versa
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| anonymous | string | false | Has value internal if it is transfer from Bitpanda Pro to Bitpanda or vice versa |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | INTERNAL |
| anonymous | EXTERNAL |
Error
{
"error": "MESSAGE"
}
Default format for all errors returned by REST API. Explanation of error codes can be found here
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| error | string | false | Textual description of an error |
WithdrawCryptoBody
{
"currency": "BTC",
"amount": "123.456",
"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": "123.456",
"fee": "123.456",
"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": "123.456",
"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": "2019-08-24T14:15:22Z",
"sequence": 12345,
"bids": [
{
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
],
"asks": [
{
"price": "123.456",
"amount": "123.456",
"number_of_orders": 3,
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"
}
]
}
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
{
"error":"ERROR_CODE"
}
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 response body.
Websocket API Overview
Bitpanda Pro WSS API can be used to subscribe for a feed of real time data, such as price evolution or market state data.
In addition to the subscribe model, the API can allow clients to create and cancel orders by reusing the same established web socket connection.
Endpoint
Public Bitpanda Pro Websocket API:
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.
Websocket clients must not send the Origin header when connecting. Otherwise, the handshake may fail and display a 403 Forbidden response.
Some calls require that the client sends the API token. Creating and cancelling orders, for instance, require a valid API token to be sent.
If the no API token is sent of if it is invalid, then the server will return an message like "{"error":"MISSING_PERMISSION"} and close the connection.
Subscription Channels
A subscriber may choose to subscribe to an arbitrary list of channels that suits his needs. Once successfully subscribed, the client will receive messages in real time as events occur.
Summary of publicly-available subscription channels:
| Channel Name | Description | Availability | Supports Subscription Updates |
|---|---|---|---|
| ORDER_BOOK | price level feed delivering all bids and asks followed by incremental changes | public | yes |
| PRICE_TICKS | trading feed delivering all matched prices as they happen | public | yes |
| CANDLESTICKS | candlesticks feed delivering the desired time granularity for requested instruments | public | yes |
| MARKET_TICKER | market stats feed | public | yes |
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 | Supports Subscription Updates |
|---|---|---|---|
| ACCOUNT_HISTORY | authenticated private channel delivering trading and funding activity | authenticated | no |
| ORDERS | authenticated channel that can be used to create and cancel orders | authenticated | no |
| TRADING | authenticated private channel delivering trading activity | authenticated | no |
Protocol
Authenticate
All private channels require that the client authenticates first and then subscribes to the private channels.
Clients should first send an AUTHENTICATE message, which contains the API token, and they can then subscribe to any private channel.
If the supplied API token is valid, then it will be used to authorize subscriptions and requests for all private channels in this websocket connection.
{
"type": "AUTHENTICATE",
"api_token": "eyJ..."
}
If authentication succeeds, a confirmation is sent:
{
"type": "AUTHENTICATED"
}
Once authenticated, the next step would be to subscribe to any of the private channels.
{
"type": "SUBSCRIBE",
"channels": [
{
"name": "ORDERS"
},
{
"name": "ACCOUNT_HISTORY"
},
{
"name": "TRADING"
}
]
}
If the apikey is not valid or is missing required permissions the websocket connection is closed immediately with an error.
{
"error" : "INVALID_APIKEY"
}
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"
]
}
]
}
Update Subscription
Publicly-available data channels which support subscription updates can deliver a seamless stream of additional or fewer markets based on specifcied instrument configuration. As an example, let's assume the client is currently subscribed to BTC_EUR market.
{
"type": "SUBSCRIBE",
"channels": [
{
"name": "ORDER_BOOK",
"depth": 200,
"instrument_codes": ["BTC_EUR"]
},
{
"name": "PRICE_TICKS",
"instrument_codes": ["BTC_EUR"]
}
]
}
Next, the client wants to additionally listen to all updates for ETH_EUR market. To do so and avoid data-loss which would be incurred if the client unsubscribed and subscribed explicitly, the following message can be sent to the server instead:
{
"type": "UPDATE_SUBSCRIPTION",
"channels": [
{
"name": "ORDER_BOOK",
"depth": 200,
"instrument_codes": [
"BTC_EUR",
"ETH_EUR"
]
},
{
"name": "PRICE_TICKS",
"instrument_codes": [
"BTC_EUR",
"ETH_EUR"
]
}
]
}
This creates a new subscription which replaces the existing one. The server completes the protocol message exchange with:
{
"channel_name":"ORDER_BOOK",
"type":"SUBSCRIPTION_UPDATED",
"time":"2020-08-18T15:17:51.242Z"
},
{
"channel_name":"PRICE_TICKS",
"type":"SUBSCRIPTION_UPDATED",
"time":"2020-08-18T15:17:51.243Z"
}
and confirmation of the new active subscription.
{
"channels": [
{
"instrument_codes": [
"BTC_EUR", "ETH_EUR"
],
"name": "PRICE_TICKS"
}
],
"type": "SUBSCRIPTIONS",
"time": "2020-08-18T15:17:51.243Z"
},
{
"channels": [
{
"instrument_codes": [
"BTC_EUR", "ETH_EUR"
],
"depth": 200,
"name": "ORDER_BOOK"
}
],
"type": "SUBSCRIPTIONS",
"time": "2020-08-18T15:17:51.242Z"
}
Rate Limits
Subscription requests count against a client's rate limit quota as http requests do.
When a subscription is established, receiving updates is free and does not decrease the available quota.
If a subscription decreased the available quota, the confirmation will include bp_remaining_quota:
{
"type":"SUBSCRIPTIONS",
"bp_remaining_quota": 200,
"channels": [
{
"name": "ACCOUNT_HISTORY"
}
]
}
If a subscription fails due to throttling an error is sent:
{
"error": "RATELIMIT",
"channel_name":"ACCOUNT_HISTORY",
"type":"ERROR"
}
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"
}
Websocket Order API
Description
This authenticated API allows clients to create and cancel orders. The client needs to subscribe to the channel ORDERS and then it can send create or cancel JSON payloads.
The client can subscribe to other channels in addition to the ORDERS channel.
Important note: Since web socket connections are full duplex in nature, clients should correlate the submitted requests with the received responses. For this purpose, the responses will include information that can be used to point back to the original requests.
Channel Subscription
To subscribe, the client needs to send request message which includes the API token.
{
"type": "SUBSCRIBE",
"channels": [
{
"name": "ORDERS"
}
]
}
The servers confirms the subscription by responding with a success message.
{
"type": "SUBSCRIPTIONS",
"channels": [
{
"name": "ORDERS"
}
]
}
Create order requests
Once subscribed, the client must send a JSON payload representing the order to be created. The following request examples highlight the 3 types of orders that can be placed: MARKET, LIMIT or STOP. For an explanation of what each field of the order field represents, please consult https://developers.bitpanda.com/exchange/#tocscreateorder.
Important: We highly recommend that requests populate the client_id field when creating orders.
The client_id field will be present in the response so that clients can correlate responses to the original requests.
Optionally the client_id can be used to cancel open orders.
Market order request
{
"type": "CREATE_ORDER",
"order": {
"instrument_code": "BTC_EUR",
"type": "MARKET",
"side": "BUY",
"amount": "1.23",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206"
}
}
Limit order request
{
"type": "CREATE_ORDER",
"order": {
"instrument_code": "BTC_EUR",
"type": "LIMIT",
"side": "BUY",
"amount": "1.23",
"price": "9876.99",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206"
}
}
Stop order request
{
"type": "CREATE_ORDER",
"order": {
"instrument_code": "BTC_EUR",
"type": "STOP",
"side": "BUY",
"amount": "1.23",
"trigger_price" : "9999.99",
"price": "9876.99",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206"
}
}
The WSS API will respond back with the outcome of the operation, success or failure.
Successfully created order response
{
"channel_name": "ORDERS",
"type": "ORDER_CREATED",
"order": {
"type": "LIMIT",
"time_in_force": "GOOD_TILL_CANCELLED",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"account_id": "ef3a5f4c-cfcd-415e-ba89-5a9abf47b28a",
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"instrument_code": "BTC_EUR",
"time": "2020-01-11T01:01:01.999Z",
"side": "BUY",
"price": "9876.99",
"amount": "1.23",
"filled_amount": "0.0"
},
"time": "2020-01-11T01:01:01.999Z"
}
The fields in the response will contain information that will match what was asked for in the request.
Failed order creation response
The following examples are of requests which failed. Check the error code for details.
Note that the response includes the original request.
{
"channel_name": "ORDERS",
"type": "ORDER_CREATION_FAILED",
"code": "MAX_OPEN_ORDERS_EXCEEDED",
"request": {
"client_id": "d75fb03b-b599-49e9-b926-3f0b6d103206",
"instrument_code": "BTC_EUR",
"side": "BUY",
"type": "LIMIT",
"amount": "1.23",
"price": "9876.99"
},
"time": "2020-01-11T01:01:01.999Z"
}
Cancel order
Clients can call the API to cancel existing orders. Note that success indicates submission for cancellation.
Important: Each cancel request contains the order_id field which is returned in the response so that clients can correlate the responses back to requests.
Cancel order by order id
The following JSON represents how to cancel an order with known order_id.
{
"type": "CANCEL_ORDER",
"order_id": "d44cf37a-335d-4936-9336-4c7944cd00eb"
}
Successfully cancelled order response
The cancelled order response includes the order_id for which the cancellation has been requested.
{
"channel_name": "ORDERS",
"type": "ORDER_SUBMITTED_FOR_CANCELLATION",
"order_id": "d44cf37a-335d-4936-9336-4c7944cd00eb",
"time": "2020-01-11T01:01:01.999Z"
}
Failed to cancel order response
An instance where the order_id has not been found and couldn't be cancelled.
Check the error code for details.
{
"channel_name": "ORDERS",
"type": "ORDER_CANCELLATION_FAILED",
"code": "NOT_FOUND",
"order_id": "d44cf37a-335d-4936-9336-4c7944cd00eb",
"time": "2020-01-11T01:01:01.999Z"
}
Cancel order by client id
The following JSON represents how to cancel an order with known client_id.
Note that it is not allowed to provide order_id and client_id together. The request will result in an error.
{
"type": "CANCEL_ORDER",
"client_id": "123cf37a-335d-4936-9336-4c7944cd00eb"
}
Auto-cancellation (Dead Man Switch)
For a detailed description of Dead Man Switch see Activate Close All Orders via REST API.
Activate Auto-Cancellation Timer
The following examples outlines valid request and expected response payloads. Note the same timeout range as for the REST API counterpart is expected and the invocation is subject to the same account quota.
Request
{
"channel_name": "ORDERS",
"type": "CANCEL_ALL_AFTER",
"timeout": 60000
}
Response
{
"channel_name": "ORDERS",
"type": "AUTO_CANCELLATION_TIMER_SET",
"timeout": 60000,
"time_cancel_all_after": "2020-07-07T08:01:45Z",
"time": "2020-07-07T08:00:44.379Z"
}
Deactivate Auto-cancellation timer
This operation is idempotent and it is sufficient to just identify message type. This command is equivalent to Deactivate Close All Orders via REST API.
Request
{
"channel_name": "ORDERS",
"type": "DEACTIVATE_CANCEL_ALL_AFTER"
}
Response
{
"channel_name": "ORDERS",
"type": "AUTO_CANCELLATION_TIMER_DEACTIVATED"
}
Trading channel
Description
A private feed of order updates based on your trading activity in your account. Updates are limited to the account's orders and reflect the orderbook state.
This channel requires authentication, otherwise subscription requests fail with an error.
Monitoring Trading Activity
The TRADING channel delivers minimal, low-latency updates on order changes from order books.
Clients are expected to track order state on their own and apply changes as they observe them.
Within a single websocket connection order updates of a single market are received in the correct order (as they happened in the orderbook) and no event is skipped.
To avoid missing updates it is recommended to set up the subscription before creating/cancelling orders:
- Subscribe to the
TRADINGchannel and await subscription confirmation - Submit new orders and cancellations through websockets or the http api
- Update the remaining amount and state of the order based on received events from the
TRADINGchannel
Consider subscribing to the ACCOUNT_HISTORY channel instead of TRADING if you require additional information on trade settlements, transfers and non-trading activity.
Subscribe
{
"type": "SUBSCRIBE",
"channels": [
{
"name": "TRADING"
}
]
}
Confirmation
{
"type": "SUBSCRIPTIONS",
"channels": [
{
"name": "TRADING"
}
]
}
Error
If the subscribe request cannot be authenticated the web socket connection terminates with the status code 1008 and a reason in the following format:
{
"error" : "INVALID_APIKEY"
}
Events
All order updates share a set of properties describing the current order state:
typedescribes the type of order update (see below)channel_nameis alwaysTRADINGinstrument_codeis the market where the order was placedorder_idthe unique identifier of the orderclient_idis the identifier that was supplied by the client when creating the ordertimewhen the event happened in the order bookremainingthe unfilled amount of the order
{
"type": "TYPE",
"channel_name": "TRADING",
"instrument_code": "BASE_QUOTE",
"order_id": "00000000-0000-0000-0000-000000000000",
"client_id": "11111111-1111-1111-1111-111111111111",
"time": "2020-01-01T00:00:00.000Z",
"remaining": "0.0"
}
Order Book Sequencing
Some trading events are emitted as result of order book modification. When this occurs, clients find the following monotonically increasing sequences present in the payload:
order_book_sequencestrongly consistent with data emitted in OrderBookSnapshot as per definition of OrderBookSequence.
For more details on these sequences see their respective definitions in REST API sections of this documentation.
Fill
The order was matched and (partially) filled. This event includes additional information about the trade:
trade_idunique identifier of the tradesideof the matched order (eitherBUYorSELL)amounttotal size of the order (remaining plus already filled amount)matched_aswhether the order was matched asTAKERorMAKERmatched_amounthow much of the order was filled by the tradematched_priceat which the order was filled
{
"type": "FILL",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.11156",
"order_book_sequence": 42,
"side": "SELL",
"amount": "1.23456",
"trade_id": "a828b63e-b2cb-48f0-8d99-8fc22cf98e08",
"matched_as": "TAKER",
"matched_amount": "0.123",
"matched_price": "12345.67"
}
Booked
The order was not fully filled immediately and is now open in the order book. Only limit orders can be booked.
{
"type": "BOOKED",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.23456",
"order_book_sequence": 42
}
Update
The order was updated successfully. Only booked limit and stop orders can be updated. This event includes additional information on the status of the update:
statusof the order updateAPPLIEDif the order was updated successfully, including information on the updated orderNOT_FOUNDthe order was not booked anymore when the update reached the order bookAMOUNT_ALREADY_FILLEDfailed to decrease the order amount, because the remaining amount is smaller than the deltaTIME_TO_MARKET_EXCEEDEDthe order update was stale when it reached the order book
If the status is APPLIED, information on the new order state is included:
amounttotal size of the order (remaining plus already filled amount) after applying amount deltaamount_deltaapplied change to the order amount (either positive or negative)
{
"type":"UPDATE",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.23456",
"order_book_sequence": 42,
"status": "APPLIED",
"amount": "1.35756",
"amount_delta": "0.123"
}
{
"type":"UPDATE",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.23456",
"status": "TIME_TO_MARKET_EXCEEDED",
"amount": "1.23456"
}
Done
The order is not in the order book anymore.
If an order is filled fully, all FILL events are sent and a final DONE event with remaining == 0.
This event includes additional information about the order status:
CANCELLEDby a client requestSELF_TRADEmatching the order would have caused a self tradeFILLED_FULLYthere is no remaining amount on the orderINSUFFICIENT_FUNDSnot enough funds were locked to fully fill this market orderINSUFFICIENT_LIQUIDITYthere is not enough liquidity in the order book to fully fill this market orderTIME_TO_MARKET_EXCEEDEDthe order was stale when it reached the order bookLAST_PRICE_UNKNOWNthere is no pricing information in the order book to place this stop order
{
"type": "DONE",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.23456",
"status": "CANCELLED",
"order_book_sequence": 42
}
Tracked
This stop order is now being tracked by the order book and will trigger when its price is reached. This event includes information about the stop order:
trigger_pricelevel when the stop order will be triggeredcurrent_priceprice at the time the order was accepted by the order book
{
"type": "STOP_TRACKED",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.23456",
"order_book_sequence": 42,
"trigger_price": "12345.67",
"current_price": "11111.11"
}
Triggered
This stop order is triggered and is converted into a limit order. This event includes information about the stop order:
pricelimit price of the triggered stop order
{
"type": "STOP_TRIGGERED",
"channel_name": "TRADING",
"instrument_code": "BTC_EUR",
"order_id": "1e842f13-762a-4745-9f3b-07f1b43e7058",
"time": "2020-01-11T01:01:01.999Z",
"remaining": "1.23456",
"order_book_sequence": 42,
"price": "13333.33"
}
Account history channel
Description
Authenticated API clients should have access to a stream of account history events corresponding to one account.
Monitoring Account Activity
The ACCOUNT_HISTORY channel delivers updates on any account activity.
To avoid missing updates it is recommended to set up the subscription before creating/cancelling orders:
- Subscribe to the
ACCOUNT_HISTORYchannel and await initial snapshots - Submit new orders and cancellations through websockets or the http api
- Update local state on open orders and balances based on received events
Consider subscribing to the TRADING channel instead if you require low-latency updates on order updates only.
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 via the Authenticate call.
Subscribing to ACCOUNT_HISTORY channel is subject to rate limiting.
{
"type": "SUBSCRIBE",
"bp_remaining_quota": 200,
"channels": [
{
"name": "ACCOUNT_HISTORY"
}
]
}
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",
"bp_remaining_quota": 200,
"channels": [
{
"name": "ACCOUNT_HISTORY",
"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,
"order_book_sequence": 123456,
"update_modification_sequence": 12333
},
"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,
"order_book_sequence": 123456,
"update_modification_sequence": 12333
}
}
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:
- partially-filled and then cancelled by user.
- fully-filled.
- 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,
"order_book_sequence": 123456,
"update_modification_sequence": 12333,
"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,
"order_book_sequence": 123456,
"update_modification_sequence": 12333,
"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.5",
"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.5",
"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",
"time_in_force": "GOOD_TILL_TIME",
"expire_after": "2020-03-25T19:27Z",
"is_post_only": true
},
"locked": {
"currency_code": "BTC",
"amount": "1.5",
"new_locked": "2.0",
"new_available": "1.5"
}
}
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.5",
"new_locked": "2.0",
"new_available": "1.5"
}
}
Account Update: Trade Settled
Emitted after an open order leads to a trade.
Trade Settled with BEST fee collection enabled
{
"id": "70e00504-d892-456f-9aae-4da7acb36aac",
"sequence": 361792,
"order_book_sequence": 123456,
"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"
}
}
Trade Settled with BEST fee collection enabled & Insufficient BEST Funds
{
"id": "e9b99f51-57ad-43e2-91bd-c28c4fbee457",
"type": "TRADE_SETTLED",
"activity": "TRADING",
"account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
"time": "2019-10-22T12:08:30.714Z",
"sequence": 361782,
"order_book_sequence": 123456,
"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"
}
}
Trade Settled with BEST fee collection disabled
{
"id": "fbd51897-5d7d-43b1-9551-7a76bcea1cd7",
"sequence": 361801,
"order_book_sequence": 123456,
"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"
}
}
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,
"order_book_sequence": 123456,
"unlocked": {
"currency_code": "EUR",
"amount": "1.5",
"new_locked": "0.0",
"new_available": "1.5"
}
}
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",
"order_book_sequence": 123456,
"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,
"order_book_sequence": 123456,
"filled_amount": "300.00",
"unlocked": {
"currency_code": "EUR",
"amount": "1.5",
"new_locked": "0.0",
"new_available": "1.5"
}
}
Account Update: Order Update Submitted
Emitted when and order update has been requested. It will be confirmed by a separate message with type ORDER_UPDATED.
{
"id":"8c68eba4-877a-4b84-bb2a-4f76715dca0e",
"sequence": 123456,
"type":"ORDER_UPDATE_SUBMITTED",
"activity":"TRADING",
"account_id":"b355abb8-aaae-4fae-903c-c60ff74723c6",
"order_id":"025293a1-53d8-4a08-996b-2132a18721dc",
"time":"2020-11-25T11:32:46.435Z",
"update": {
"id":"bda8e36d-6bef-440c-84a5-fa45c7be25a4",
"new_amount":"100.123",
"amount_delta":"30.123"
},
"locked": {
"currency_code":"EUR",
"amount":"10",
"new_available":"20",
"new_locked":"10"
}
}
Account Update: Order Updated
Submitted order update has been accepted and is applied. Modified order resulting from applying this update is returned.
{
"id": "ce2c7275-1408-44b6-9194-0a838402f853",
"sequence": 123456,
"type": "ORDER_UPDATED",
"activity": "TRADING",
"account_id": "bd970a7f-4c1d-4fe1-9b11-5fc35bd29370",
"order_id": "9e22269d-b30f-4209-88a9-c675256df847",
"time": "2020-11-25T11:12:57.921Z",
"order_book_sequence": 42,
"order": {
"time_in_force": "GOOD_TILL_CANCELLED",
"is_post_only": false,
"order_id": "9e22269d-b30f-4209-88a9-c675256df847",
"account_id": "bd970a7f-4c1d-4fe1-9b11-5fc35bd29370",
"instrument_code": "BTC_ETH",
"time": "2020-11-25T11:12:57.920Z",
"side": "BUY",
"price": "10.0",
"amount": "123.456",
"filled_amount": "0.0"
},
"unlocked": {
"currency_code": "ETH",
"amount": "10.0",
"new_available": "10.0",
"new_locked": "0.0"
}
}
Account Update Order Update Rejected
Submitted order update has been rejected and has not been applied on the order.
Reason for rejections can be: NOT_FOUND, AMOUNT_ALREADY_FILLED or TIME_TO_MARKET_EXCEEDED. More information can be found in error descriptions.
{
"id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
"activity": "TRADING",
"type": "ORDER_UPDATE_REJECTED",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2020-11-25T11:32:46.435Z",
"order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
"sequence": 123456,
"reason": "AMOUNT_ALREADY_FILLED",
"unlocked": {
"currency_code": "EUR",
"amount": "1.5",
"new_locked": "0.0",
"new_available": "1.5"
}
}
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.0",
"new_locked": "1.0",
"new_available": "2.0"
}
}
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": "1.00000001",
"new_available": "1.00000001",
"new_locked": "0.0"
},
"transaction": {
"transaction_id": "d4f11100-6116-11e9-afa4-2dfff0b4b9c8",
"transaction_id_prefix": "C",
"blockchain_transaction_id": "9ba638d7-eb88-4053-b23b-91d747592a53",
"is_internal": false,
"fee_amount": "0.00000001",
"fee_currency": "BTC"
}
}
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": "1.00000001",
"new_available": "0.0",
"new_locked": "1.003"
},
"transaction": {
"transaction_id": "c9c51e30-6116-11e9-a04f-c1648a75fb19",
"transaction_id_prefix": "C",
"is_internal": false,
"fee_amount": "0.00000001",
"fee_currency": "BTC"
}
}
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.
{
"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_code": "BTC",
"amount": "1.5",
"new_available": "1.5",
"new_locked": "0.0"
},
"transaction": {
"transaction_id": "c9c51e30-6116-11e9-a04f-c1648a75fb19",
"transaction_id_prefix": "C",
"is_internal": true,
"fee_amount": "0.00000001",
"fee_currency": "BTC"
},
"failed_transaction": {
"transaction_id": "cf7ac991-1c33-407a-b76c-cd9096451077",
"transaction_id_prefix": "C"
}
}
Account Update: Funds Deposit Failed
Emitted after a user's deposit failed.
{
"id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
"activity": "FUNDING",
"type": "FUNDS_DEPOSITED_FAILED",
"accountId": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-12-04T11:32:46.435Z",
"sequence": 0,
"deducted": {
"currency_code": "BTC",
"amount": "1.5",
"new_available": "1.5",
"new_locked": "0.0"
},
"transaction": {
"transaction_id": "c9c51e30-6116-11e9-a04f-c1648a75fb19",
"transaction_id_prefix": "C",
"is_internal": true,
"fee_amount": "0.00000001",
"fee_currency": "BTC"
},
"failed_transaction": {
"transaction_id": "cf7ac991-1c33-407a-b76c-cd9096451077",
"transaction_id_prefix": "C"
}
}
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:
- last price
- 24hr volume
- 24hr high
- 24hr low
- 24hr absolute price change
- 24hr price change percentage
Volume, low, high and price change are calculated based on a sliding window of trades starting 24 hours and using minutely granularity. Market ticks are every minute when the 24 hour sliding window is moved forward and additionally on each trade.
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:
SPLIT(price points are delivered as separate messagePRICE_POINT_UPDATES)INLINE(price points are part of each market tick message)OMIT(no price points are sent)
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_modeINLINEinstead.
On every market tick update 24hr price updates are pushed:
- the oldest price within the last 24 hours
- closing prices of the hourly candles within the last 24 hours
- the latest price
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.
Depth parameter
User can specify what depth of the orderbook he wishes to maintain, this depth is then applied to the both side of orderbook (bids,asks). It means that user will receive at most depth price levels on each side of orderbook. Should the price level within this depth region be removed from orderbook, the system will handle it and will always try to send to user such updates that would result in maintaining specified depth.
For example, user has specified depth of 10. Two orders get matched around spread which results in removal of two price levels, this will emit update event with those price levels being removed (volume = 0), and since the depth is not fulfilled as it would result only in 8 price levels the update event will also include additional price level which the system previously omitted.
Similarly, it works when additional price level with better price are added, update event will include those new ones and signal removal of the ones which are already beyond the specified depth.
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"
]
}
]
}
Confirmation
{
"type": "SUBSCRIPTIONS",
"channels": [
{
"name": "ORDER_BOOK",
"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.
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.
{
"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"
]
]
}
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",
}
Error Codes
Both the REST and WSS API use the same error codes. If you found error which is not documented, or think that system is behaving not as expected please reach out to us via the Ticketing System.
Create Order
- ALREADY_IN_PROGRESS The system is processing the action, a new call does not trigger a new execution.
- BAD_AMOUNT_PRECISION Maximum allowed precision can be seen in the currencies endpoint, if it expects the precision of 0, the decimal point has to be left out.
- BAD_PRICE_PRECISION Maximum allowed precision can be seen in the instruments endpoint, if it expects the precision of 0, the decimal point has to be left out.
- BAD_TRIGGER_PRICE_PRECISION Maximum allowed precision can be seen in the instruments endpoint
- CLOSED_MARKET The instrument was decommissioned and cannot be used anymore, please call instruments to find out active markets.
- DUPLICATE_ORDER_EXECUTION Client order id was provided multiple times, please try using different client order id.
- IN_MAINTENANCE The instrument is currently in maintenance, please visit our status page to find out more.
- INSUFFICIENT_FUNDS The account does not have enough funds to execute this order.
- INSUFFICIENT_LIQUIDITY Market has insufficient liquidity to execute this order.
- INVALID_ACCOUNT_SETTINGS Account settings json is malformed.
- INVALID_AFFILIATE_TAG Affiliate tag of your order is invalid.
- INVALID_AMOUNT Amount must be greater than 0, and a decimal if precision allows.
- INVALID_CLIENT_UUID Client order id is optional, but if it is provided it must be a valid UUID.
- INVALID_CURRENCY The specified currency is not a valid one, please see currencies for valid syntax.
- INVALID_EXPIRY_TIME If
GOOD_TILL_TIMEastime_in_forceis specified andexpire_afteris not in the future. - INVALID_INSTRUMENT_CODE The instrument is invalid, please use valid instrument codes from instruments endpoint e.g.
BTC_EUR. - INVALID_ORDER_REQUEST Invalid json payload was sent.
- INVALID_ORDER_TYPE Valid order types are only
MARKET,LIMITandSTOP. - INVALID_PRICE Price must be greater than 0, and a decimal if precision allows.
- INVALID_SIDE Valid sides are
BUYandSELL. - INVALID_TIME_IN_FORCE Only
GOOD_TILL_CANCELLED,GOOD_TILL_TIME,IMMEDIATE_OR_CANCELLEDandFILL_OR_KILLare allowed. - INVALID_ORDER_CACELLATION_TIMER The auto-cancellation timer you specified is invalid and cannot be executed. Check the supported time range.
- MAX_OPEN_ORDERS_EXCEEDED The maximum of allowed open orders was reached, cancel some to submit new orders.
- MIN_SIZE_NOT_SATISFIED The order amount multiplied by the price must be greater than the minimum size of the instrument.
- MISSING_AMOUNT Amount field is mandatory.
- MISSING_EXPIRY_TIME If
GOOD_TILL_TIMEastime_in_forceis specified andexpire_afteris not specified. - MISSING_INSTRUMENT_CODE Valid instrument code must be provided e.g.
BTC_EUR. - MISSING_ORDER_TYPE No order type was provided.
- MISSING_PRICE Price is mandatory on all order types but
MARKET. - MISSING_SIDE No side was provided.
- MISSING_TRIGGER_PRICE Trigger price is mandatory order type
STOP. - NEGATIVE_PRICE Price must be greater than 0.
- NEW_MARKET This market is new and inactive.
- NO_TRADING Trading is currently suspended.
- ONLY_LIMIT_ORDERS_ALLOWED For this market, only orders of type LIMIT are currently supported.
- OVERLOAD The order cannot be placed due to high load in the system - back off and try again later.
- POST_ONLY_MARKET Market is in
POST_ONLYmode and onlyLIMITorders withPOST_ONLYmode are allowed.
Cancel Order
- ALREADY_IN_PROGRESS Cancellation of the order was already requested recently - back of cancellation requests.
- CLOSED_MARKET The instrument was decommissioned and cannot be used anymore.
- IN_MAINTENANCE The instrument is currently in maintenance mode.
- INVALID_CLOSE_ORDERS_REQUEST The received json in invalid.
- INVALID_ORDER_ID The order id is malformed, or the requested order is open anymore.
- MAX_NUMBER_OF_ORDERS_TO_CLOSE_EXCEEDED The number of order ids to close at the same time exceeds the upper limit.
- ORDER_NOT_FOUND Order has not been found, meaning it has already been cancelled or fully filled and as such it is not present in the order book.
Update Order
- UPDATE_AMOUNT_ALREADY_FILLED Requested amount is lower than the remaining amount of the order
- PENDING_ORDER_UPDATE_CONFLICT Conflicting pending order update found
- AMOUNT_ALREADY_PRESENT Requested amount is same as the amount of order, it will not be updated.
General errors
- ACCOUNT_HISTORY_TIME_RANGE_TOO_BIG
fromandtotime range is too big to be fetched at once, please choose smaller time frame. - AMOUNT_NOT_NUMERIC Amount should be numeric, in form of string e.g.
"1234.456" - AMOUNT_REQUIRED Amount field is required.
- CANDLESTICKS_TIME_RANGE_TOO_BIG Would return more candlesticks than a maximum limit of 1500, please choose smaller time frame.
- CANNOT_SEND_TO_OWN_ADDRESS Sending to own address is prohibited.
- CSV_EXPORT_EXPIRED Export link already expired, please generate new one again.
- CURRENCY_NOT_FOUND Currency could not be found.
- CURRENCY_NOT_SUPPORTED Currency is not supported at the moment.
- DEPOSIT_ADDRESS_NOT_USED Deposit address is not used.
- EMPTY_JSON JSON payload should not be empty.
- EMPTY_PAYLOAD Payload of WSS message should not be empty.
- FAILED_TO_SERVICE_QUERY Candlestick channel subscription has failed.
- INSUFFICIENT_FUNDS Your funds are insufficient to execute the action.
- INVALID_ACCOUNT_HISTORY_FROM_TIME Invalid format of
fromparameter, it should beISO8601e.g.2019-07-01T12:30:55.731Z. - INVALID_ACCOUNT_HISTORY_MAX_PAGE_SIZE Invalid max page size for paginated responses.
- INVALID_ACCOUNT_HISTORY_TIME_PERIOD Time period of a query is too large, please use smaller time range.
- INVALID_ACCOUNT_HISTORY_TO_TIME Invalid format of
toparameter, it should beISO8601e.g.2019-07-01T12:30:55.731Z. - INVALID_ADDRESS Address is invalid, please re-check it.
- INVALID_AMOUNT Amount is invalid or malformed, it has to be decimal in string format e.g.
"1234.456" - INVALID_CANDLESTICKS_GRANULARITY Candlestick granularity is not valid, is has to be one of
MINUTES,HOURS,DAYS,WEEKSandMONTHS. - INVALID_CANDLESTICKS_UNIT Candlestick unit is not valid, supported combinations explained in candlesticks description.
- INVALID_CURRENCY Currency is not valid, please check
- INVALID_ORDER_BOOK_DEPTH Orderbook depth is not valid number.
- INVALID_ORDER_BOOK_LEVEL Invalid orderbook level, supported levels are
1,2and3. You can find out more in order-book description. - INVALID_PAGE_CURSOR Page cursor is not correct, please make sure you copied it completely.
- INVALID_PAYLOAD Payload had not correct format.
- INVALID_PRECISION Precision is not valid.
- INVALID_TIME_RANGE Time range is too big, please check corresponding limitations of endpoint you called.
- INVALID_TRADE_ID
trade_idprovided is not valid uuid. - INVALID_UI_ACCOUNT_SETTINGS UI settings are not in correct JSON format.
- INVALID_AUTO_CLOSE_TIMER Client specified an order auto-close timer which is not invalid. A timeout in a valid range specified in milliseconds is expected.
- MALFORMED_JSON JSON payload could not be parsed, please check if it has a valid format.
- MIN_AMOUNT_SIZE_NOT_SATISFIED Minimal amount for transfer is not met.
- MINIMUM_TRANSACTION_AMOUNT_NOT_SATISFIED Minimal amount for transaction is not met.
- MISSING_ACCOUNT_ID
account_idis missing in request. - MISSING_ACCOUNT_VERIFICATION Account is not verified, please verify first.
- MISSING_CANDLESTICK_GRANULATRITY Missing candlestick granularity.
- MISSING_CANDLESTICKS_PERIOD_PARAM Required
periodparameter is missing. - MISSING_CANDLESTICKS_UNIT_PARAM Required
unitparameter is missing. - MISSING_FROM_PARAM Requited or mutually inclusive parameter
fromis missing. - MISSING_INSTRUMENT_CODE Instrument code is missing
- MISSING_INSTRUMENTS Instruments field in a payload is missing.
- MISSING_ORDER_ID
order_idis missing. - MISSING_PROPERTIES Missing instrument code filter for candlestick channel.
- MISSING_TO_PARAM Required or mutually inclusive
toparameter is missing. - MISSING_TRADE_ID
trade_idis missing in the request. - ONLY_ONE_ERC20_ADDRESS_ALLOWED Only one
ERC_20address is allowed. - PAYOUT_ACCOUNT_MISMATCH Payout account does not match the currency assigned to it.
- PAYOUT_ACCOUNT_NOT_FOUND Payout account has not been found.
- SERVICE_UNAVAILABLE Underlying service was not able to answer in time, please try again.
- SUBSCRIPTION_ALREADY_EXISTS Subscription already exists, please unsubscribe first.
- SUSPENDED_TRADING_FOR_ACCOUNT Trading has been suspended for this account. Please contact support.
- SUSPENDED_WITHDRAW_FOR_ACCOUNT Withdrawals have been suspended for this account. Please contact support.
- TRANSACTION_RATE_LIMIT_REACHED Too many transactions attempts.
- UNABLE_TO_CREATE_DEPOSIT_ADDRESS Could not create a deposit address.
- UNDEFINED_ERROR Undefined error occurred.
- WALLET_MAINTENANCE Wallets are in maintenance, please try again later or visit our status page.
- WITHDRAWAL_AMOUNT_TOO_LOW Withdrawal amount is too low for withdrawal to be executed.
- WITHDRAWAL_LIMIT_EXCEEDED Withdrawal size is too large.
Authorization errors
- APIKEY_EXPIRED The apikey is not valid anymore and has to be replaced.
- APIKEY_REVOKED The apikey has been revoked. It cannot be activated again, but has to be replaced.
- CLIENT_IP_BLOCKED The client ip of the request does not match any of the allowed IPs associated with this apikey.
- MISSING_CREDENTIALS No apikey was included in the request. Send the apikey via the
Authorizationheader. - INVALID_CREDENTIALS The provided apikey was malformed. Verify that the
Authorizationheader contains a complete apikey and theBearerprefix. - INTERNAL_ERROR Authenticating the request failed, it can be retried.
- INVALID_APIKEY An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_AUDIENCE An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_AUTHORIZED_PARTY An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_DEVICE_ID An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_IP_RESTRICTION An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_ISSUER An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_ORIGIN The request included an
Originheader that was not accepted. Do not send theOriginheader. - INVALID_SCOPES An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- INVALID_SUBJECT An apikey was found but is invalid. Ensure that the full apikey is included in the request. If the problem persists, please contact support.
- MISSING_CREDENTIALS An apikey has not been sent
- MISSING_PERMISSION The apikey does not grant the required permissions for this endpoint. Create a new apikey and ensure to select an appropriate scope.
Changelog
02/2021
⚠️ Updated the create order endpoint to correctly describe the behaviour of client_id.
01/2021
New Feature: Order Update (increasing/decreasing order amount of open orders)
-
REST additions:
- new
PUT/account/orderendpoint for updating order amount with order id - new
PUT/account/order/client/endpoint for updating order amount with client id - new
GET/account/order/client/endpoint for retrieving order with client id
- new
-
WSS additions:
- Account History channel has been extended by three new update events. Order Update Submitted,Order Updated and Order Update Rejected
- Trading channel has been extended by Update event
-
Order book sequence: Trading and Account History channel events have been extended by
order_book_sequencefield. Which indicates strong ordering of the events as they happened in orderbook.
12/2020
Orderbook sequence:
TRADING and ACCOUNT_HISTORY channel events and updates have been extended by order_book_sequence
field. Which indicates strong ordering of the events as they happened in orderbook.
Events which are not part of this strong ordering don't carry it.
GET /orders and /orders/ now also include order_book_sequence if present.
09/2020
🕒 Support for auto-cancellation timer is now generally available in our REST API.
08/2020
🐍 A python based websocket sdk is now available!
07/2020
🤖 CCXT library integration has been published and is available now!
06/2020
📒 Endpoints for current and past deposits and withdrawals are now generally available!
04/2020
🚀 Websocket Order API and Websocket Trading Channel are now generally available!