Introduction
Welcome to the Exbito API! You can use our API to access Exbito API endpoints.
Authentication
Exbito uses API_KEY
and API_SECRET
keys to allow access to the API. You can register a new API key at the profile settings -> API keys.
Exbito expects for the both API_KEY
and API_SECRET
to be included in all API requests to the server in a header that looks like the following:
X-Api-Key: MY_API_KEY
X-Api-Secret: MY_API_SECRET
Public endpoints
Get All Markets
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/markets'
).json()
curl "https://api.exbito.com/apiv2/markets"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/markets')
The above command returns JSON structured like this:
[
{
"name": "BTC_USDT",
"minAmount": "0.00001000",
"baseCurrencySymbol": "BTC",
"quoteCurrencySymbol": "USDT",
"buyAmountMin": "0.00010000",
"buyAmountMax": "10.00000000",
"sellAmountMin": "0.00010000",
"sellAmountMax": "10.00000000",
"quoteMin": "10.000000",
"quoteMax": "10000000.000000",
"isVisible": true,
"isEnable": true,
"defaultDepthInterval": "10.000000",
"priceStep": "1.000000",
"amountStep": "0.00001000",
"depthIntervalList": [
"0",
"10.000000",
"100.000000",
"1000.000000"
]
},
{
"name": "ETH_USDT",
"minAmount": "0.000100000000000000",
"baseCurrencySymbol": "ETH",
"quoteCurrencySymbol": "USDT",
"buyAmountMin": "0.001000000000000000",
"buyAmountMax": "100.000000000000000000",
"sellAmountMin": "0.001000000000000000",
"sellAmountMax": "100.000000000000000000",
"quoteMin": "10.000000",
"quoteMax": "10000000.000000",
"isVisible": true,
"isEnable": true,
"defaultDepthInterval": "1.000000",
"priceStep": "1.000000",
"amountStep": "0.000100000000000000",
"depthIntervalList": [
"0",
"1.000000",
"10.000000",
"100.000000"
]
}
]
This endpoint retrieves all markets.
HTTP Request
GET https://api.exbito.com/apiv2/markets
Get a Specific Market
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/markets/BTC_USDT'
).json()
curl "https://api.exbito.com/apiv2/markets/BTC_USDT"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/markets/BTC_USDT')
The above command returns JSON structured like this:
[
{
"name": "BTC_USDT",
"minAmount": "0.00001000",
"baseCurrencySymbol": "BTC",
"quoteCurrencySymbol": "USDT",
"buyAmountMin": "0.00010000",
"buyAmountMax": "10.00000000",
"sellAmountMin": "0.00010000",
"sellAmountMax": "10.00000000",
"quoteMin": "10.000000",
"quoteMax": "10000000.000000",
"isVisible": true,
"isEnable": true,
"defaultDepthInterval": "10.000000",
"priceStep": "1.000000",
"amountStep": "0.00001000",
"depthIntervalList": [
"0",
"10.000000",
"100.000000",
"1000.000000"
]
}
]
This endpoint retrieves one single markets.
HTTP Request
GET https://api.exbito.com/apiv2/markets
Get All Currencies
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/currencies'
).json()
curl "https://api.exbito.com/apiv2/currencies"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/currencies')
The above command returns JSON structured like this:
[
{
"name": "BTC_USDT",
"minAmount": "0.00001000",
"baseCurrencySymbol": "BTC",
"quoteCurrencySymbol": "USDT",
"buyAmountMin": "0.00010000",
"buyAmountMax": "10.00000000",
"sellAmountMin": "0.00010000",
"sellAmountMax": "10.00000000",
"quoteMin": "10.000000",
"quoteMax": "10000000.000000",
"isVisible": true,
"isEnable": true,
"defaultDepthInterval": "10.000000",
"priceStep": "1.000000",
"amountStep": "0.00001000",
"depthIntervalList": [
"0",
"10.000000",
"100.000000",
"1000.000000"
]
},
{
"name": "ETH_USDT",
"minAmount": "0.000100000000000000",
"baseCurrencySymbol": "ETH",
"quoteCurrencySymbol": "USDT",
"buyAmountMin": "0.001000000000000000",
"buyAmountMax": "100.000000000000000000",
"sellAmountMin": "0.001000000000000000",
"sellAmountMax": "100.000000000000000000",
"quoteMin": "10.000000",
"quoteMax": "10000000.000000",
"isVisible": true,
"isEnable": true,
"defaultDepthInterval": "1.000000",
"priceStep": "1.000000",
"amountStep": "0.000100000000000000",
"depthIntervalList": [
"0",
"1.000000",
"10.000000",
"100.000000"
]
}
]
This endpoint retrieves all currencies.
HTTP Request
GET https://api.exbito.com/apiv2/markets
Get Market's Last Price
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/markets/BTC_USDT/last'
).json()
curl "https://api.exbito.com/apiv2/markets/BTC_USDT/last"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/markets/BTC_USDT/last')
The above command returns JSON structured like this:
{
"name": "BTC_USDT",
"price": "38265.840000"
}
This endpoints returns the latest price of a market.
HTTP Request
GET https://api.exbito.com/apiv2/markets/<MARKET_NAME>/last
URL Parameters
Parameter | Description |
---|---|
MARKET_NAME | The Symbol of the market (fully uppercase, underscore delimited) (Example: BTC_USDT) |
Get Market's Status
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/markets/BTC_USDT/status?period=86400'
).json()
curl "https://api.exbito.com/apiv2/markets/BTC_USDT/status?period=86400"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/markets/BTC_USDT/status?period=86400')
The above command returns JSON structured like this:
{
"open": "37041.010000",
"high": "38706.290000",
"low": "36863.990000",
"close": "38287.790000",
"volume": "1.34927867",
"deal": "51058.168482",
"last": "38287.790000",
"period": 86400
}
This endpoints returns the status of a market.
HTTP Request
GET https://api.exbito.com/apiv2/markets/<MARKET_NAME>/status
URL Parameters
Parameter | Description |
---|---|
MARKET_NAME | The Symbol of the market (fully uppercase, underscore delimited) (Example: BTC_USDT) |
Query Parameters
Parameter | Default | Description |
---|---|---|
period | - | The period, in seconds |
Get Market's KLine (e.g. Candlestick / OHLC)
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/markets/BTC_USDT/kline?start=1641820000&end=1642520000&interval=3600'
).json()
curl "https://api.exbito.com/apiv2/markets/BTC_USDT/kline?start=1641820000&end=1642520000&interval=3600"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/markets/BTC_USDT/kline?start=1641820000&end=1642520000&interval=3600')
The above command returns JSON structured like this:
[
{
"market": "BTC_USDT",
"time": 1641819600,
"o": "40923.360000",
"h": "41046.680000",
"l": "40757.970000",
"c": "40757.970000",
"volume": "0.06765753",
"amount": "0.27665754"
},
{
"market": "BTC_USDT",
"time": 1641823200,
"o": "40778.000000",
"h": "41185.080000",
"l": "39468.000000",
"c": "40768.530000",
"volume": "0.07010710",
"amount": "0.28329002"
}
]
This endpoints returns the kline of a market. (e.g. Candlestick / OHLC)
HTTP Request
GET https://api.exbito.com/apiv2/markets/<MARKET_NAME>/kline
URL Parameters
Parameter | Description |
---|---|
MARKET_NAME | The Symbol of the market (fully uppercase, underscore delimited) (Example: BTC_USDT) |
Query Parameters
Parameter | Default | Description |
---|---|---|
interval | - | The duration of each candle, in seconds (Sample: 3600) MUST BE a multiple of 60 |
start | - | The epoch time of the start of the period (Sample: 1641820000) |
end | - | The epoch time of the end of the period (Sample: 1642520000) |
Get Market's Order Book (Depth)
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/markets/BTC_USDT/depth?interval=0&limit=10'
).json()
curl "https://api.exbito.com/apiv2/markets/BTC_USDT/depth?interval=0&limit=10"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/markets/BTC_USDT/depth?interval=0&limit=10')
The above command returns JSON structured like this:
{
"asks": [
{
"price": "38529.000000",
"amount": "0.00105000"
},
{
"price": "38583.000000",
"amount": "0.00098130"
},
{
"price": "38723.000000",
"amount": "0.00160400"
},
{
"price": "38770.000000",
"amount": "0.00194380"
},
{
"price": "38979.000000",
"amount": "0.01766240"
},
{
"price": "38995.000000",
"amount": "0.02932440"
},
{
"price": "39076.000000",
"amount": "0.23761600"
},
{
"price": "39077.000000",
"amount": "0.00156360"
},
{
"price": "39110.000000",
"amount": "0.40320530"
},
{
"price": "39122.000000",
"amount": "0.08285070"
}
],
"bids": [
{
"price": "38148.000000",
"amount": "0.00131280"
},
{
"price": "38138.000000",
"amount": "0.00135230"
},
{
"price": "37745.000000",
"amount": "0.00155740"
},
{
"price": "37704.000000",
"amount": "0.00200920"
},
{
"price": "37658.000000",
"amount": "0.02932210"
},
{
"price": "37638.000000",
"amount": "0.01766010"
},
{
"price": "37604.000000",
"amount": "0.23756770"
},
{
"price": "37595.000000",
"amount": "0.04914760"
},
{
"price": "37592.000000",
"amount": "0.08286670"
},
{
"price": "37553.000000",
"amount": "0.00247630"
}
]
}
This endpoints returns the current Order Book of the market (e.g. Market Depth)
HTTP Request
GET https://api.exbito.com/apiv2/markets/<MARKET_NAME>/depth
URL Parameters
Parameter | Description |
---|---|
MARKET_NAME | The Symbol of the market (fully uppercase, underscore delimited) (Example: BTC_USDT) |
Query Parameters
Parameter | Default | Description |
---|---|---|
interval | default_depth_interval | Aggregate orders based on the price |
limit | 10 | The maximum number of records on each side (max: 100) |
Private endpoints
Create an Order
import requests
requests.request(
'CREATE',
f'https://api.exbito.com/apiv2/orders',
headers={'X-Api-Key': MY_API_KEY, 'X-Api-Secret': MY_API_SECRET},
params={
'marketName': 'BTC_USDT',
'type': 'limit',
'side': 'buy',
'amount': '0.01234000',
'price': '35001.000000'
}
).json()
curl -X CREATE "https://api.exbito.com/apiv2/orders" -H "X-Api-Key: $MY_API_KEY" -H "X-Api-Secret: $MY_API_KEY" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "marketName=BTC_USDT" \
-d "type=limit" \
-d "side=buy" \
-d "amount=0.01234000" \
-d "price=35001.000000"
const axios = require('axios');
axios({
method: 'create',
url: 'https://api.exbito.com/apiv2/orders',
headers: {'X-Api-Key': MY_API_KEY, 'X-Api-Secret': MY_API_SECRET},
data: {
marketName: 'BTC_USDT',
type: 'limit',
side: 'buy',
amount: '0.01234000',
price: '35001.000000'
}
});
The above command returns JSON structured like this:
{
"id": 193710506,
"createdAt": "2021-02-23T05:56:41.123456Z",
"modifiedAt": "2021-02-23T05:56:41.123456Z",
"finishedAt": null,
"market": "BTC_USDT",
"user": 12345,
"type": "limit",
"side": "buy",
"amount": "0.01234000",
"price": "35001",
"takerFeeRate": "0",
"makerFeeRate": "0",
"isAmountAsQuote": false,
"loadStatus": "empty"
}
This endpoint post a new markets.
HTTP Request
CREATE https://api.exbito.com/apiv2/orders
Form Parameters
Parameter | Default | Description |
---|---|---|
market | - | Name of the market |
type | - | Order type (possible values: limit , market ) |
amount | - | The amount |
price | - | Order side (possible values: buy , sell ) |
amountAsQuote | false | Only available for "BUY MARKET" orders. If it's true, the server will treat the amount as quoteCurrency. |
Cancel an Order
import requests
requests.request(
'CANCEL',
f'https://api.exbito.com/apiv2/orders/12345?marketName=BTC_USDT',
headers={'X-Api-Key': MY_API_KEY, 'X-Api-Secret': MY_API_SECRET},
).json()
curl -X CANCEL "https://api.exbito.com/apiv2/orders/12345?marketName=BTC_USDT" -H "X-Api-Key: $MY_API_KEY" -H "X-Api-Secret: $MY_API_KEY"
const axios = require('axios');
axios({
method: 'cancel',
url: 'https://api.exbito.com/apiv2/orders/12345?marketName=BTC_USDT',
headers: {'X-Api-Key': MY_API_KEY, 'X-Api-Secret': MY_API_SECRET},
});
The above command returns JSON structured like this:
{
"id": 193710506,
"createdAt": "2021-02-23T05:56:41.123456Z",
"modifiedAt": "2021-02-23T05:56:41.123456Z",
"finishedAt": null,
"market": "BTC_USDT",
"user": 12345,
"type": "limit",
"side": "buy",
"amount": "0.01234000",
"price": "35001",
"takerFeeRate": "0",
"makerFeeRate": "0",
"isAmountAsQuote": false,
"loadStatus": "partiallyCancelled"
}
This endpoint cancels a pending order.
HTTP Request
CANCEL https://api.exbito.com/apiv2/orders/<ORDER_ID>
URL Parameters
Parameter | Description |
---|---|
ORDER_ID | Order ID (on exbito side) |
Query Parameters
Parameter | Default | Description |
---|---|---|
market | - | Name of the market |
Get list of Orders
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/orders?status=pending'
).json()
curl "https://api.exbito.com/apiv2/orders?status=pending"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/orders?status=pending')
The above command returns JSON structured like this:
[
{
"id": 193710506,
"createdAt": "2021-02-23T05:56:41.123456Z",
"modifiedAt": "2021-02-23T05:56:41.123456Z",
"finishedAt": null,
"market": "BTC_USDT",
"user": 12345,
"type": "limit",
"side": "buy",
"amount": "0.01234000",
"price": "35001",
"takerFeeRate": "0",
"makerFeeRate": "0",
"isAmountAsQuote": false,
"loadStatus": "partiallyCancelled"
}
]
This endpoint retrieves a list of orders.
HTTP Request
GET https://api.exbito.com/apiv2/orders
Query Parameters
Parameter | Default | Description |
---|---|---|
status | - | (Mandatory) pending or finished |
marketName | - | Name of the market |
offset | - | Offset |
limit | - | Limit |
Get list of Balances
import requests
requests.request(
'GET',
f'https://api.exbito.com/apiv2/balances
).json()
curl "https://api.exbito.com/apiv2/balances"
const axios = require('axios');
axios.get('https://api.exbito.com/apiv2/balances')
The above command returns JSON structured like this:
[
{
"name": "ETH",
"available": "9138",
"freeze": "0"
},
{
"name": "BTC",
"available": "101",
"freeze": "10"
}
]
This endpoint retrieves a list of balances.
HTTP Request
GET https://api.exbito.com/apiv2/balances
Show cryptocurrency deposit info
import requests
url = "https://api.exbito.com/apiv2/deposits?cryptocurrencySymbol=BTC&chain=btc"
payload={}
files={}
headers = {}
response = requests.request("SHOW", url, headers=headers, data=payload, files=files)
print(response.text)
curl --location --request SHOW 'https://api.exbito.com/apiv2/deposits?cryptocurrencySymbol=BTC&chain=btc'
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
var config = {
method: 'show',
url: 'https://api.exbito.com/apiv2/deposits?cryptocurrencySymbol=BTC&chain=btc',
headers: {
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"id": 1,
"user": "1",
"extra": null,
"creation": "2019-03-19T12:11:10.337+03:00",
"expiration": null,
"address": "1D6CqUvHtQRXU4TZrrj5j1iofo8f4oXyLj",
"tag": null
}
This endpoint retrieves info of a currency.
HTTP Request
SHOW https://api.exbito.com/apiv2/deposits
Query Parameters
Parameter | Default | Description |
---|---|---|
cryptocurrencySymbol | - | (Mandatory) |
chain | - | (Mandatory) Chain of cryptocurrency |
Renew cryptocurrency deposit info
import requests
url = "https://api.exbito.com/apiv2/deposits?cryptocurrencySymbol=BTC&chain=btc"
payload={}
files={}
headers = {}
response = requests.request("RENEW", url, headers=headers, data=payload, files=files)
print(response.text)
curl --location --request RENEW 'https://api.exbito.com/apiv2/deposits?cryptocurrencySymbol=BTC&chain=btc'
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
var config = {
method: 'renew',
url: 'https://api.exbito.com/apiv2/deposits?cryptocurrencySymbol=BTC&chain=btc',
headers: {
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"id": 1,
"user": "1",
"extra": null,
"creation": "2019-03-19T12:11:10.337+03:00",
"expiration": null,
"address": "1D6CqUvHtQRXU4TZrrj5j1iofo8f4oXyLj",
"tag": null
}
This endpoint renew deposit info.
HTTP Request
RENEW https://api.exbito.com/apiv2/deposits
Query Parameters
Parameter | Default | Description |
---|---|---|
cryptocurrencySymbol | - | (Mandatory) |
chain | - | (Mandatory) Chain of cryptocurrency |
Websocket
In case you need the realtime data, we encourage you to use the websocket endpoint. Most of the realtime data is available as websocket channels.
You need to establish a websocket connection to our websocket endpoint:
wss://wsapi.exbito.com/wsapiv2
Errors
All non-successful responses have status code between 400-499. For the API with more than one error code, you can
read X-Reason
header on the response to find out more info about the error.
The Exbito API uses the following error codes:
Error Code | X-Reason | Meaning |
---|---|---|
400 | - | Bad Request -- Your request is invalid. |
401 | - | Unauthorized -- Your API key is wrong. |
403 | - | Forbidden -- The requested resource is accessible for you. |
404 | - | Not Found -- The specified resource could not be found. |
400 | amount-not-in-range | The provided amount is not acceptable. You can find the min and max of the amount values form the /markets endpoint. |
400 | quote-not-in-range | The provided quote is not acceptable. You can find the min and max of the quote values form the /markets endpoint. |
400 | bad-amount-step | The provided amount must be divisible by amountStep . You can find the step of the amount values form the /markets endpoint. |
429 | - | Too Many Requests -- You're requesting too many times! Slow down! |
500 | - | Internal Server Error -- We had a problem with our server. Try again later. |
503 | - | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Limits
The general rate-limit is 10 req/min. But there might be more strict limit on some endpoints. You can check the related section to understand the endpoint-specific ratelimits.