Market API
The Market api collection has public as well as private api's. The pubic api doesn't require authentication but the private api require Authentication. Please refer authentication section.The standard ratelimit applied for all the market API's.
Market List
Get all available markets
HTTP Request
GET /api/v1/market/list
Sample Request
GET /api/v1/market/list
Response Parameters
Parameters | Parameter Type | Description |
---|---|---|
name | String | Market pair name e.g. ETHBTC |
stock | String | Stock name e.g. ETH |
fee_prec | Integer | Decimal precision for fee |
money | String | Market name e.g. BTC |
min_amount | String | Mnimum amount for placing orders |
stock_prec | String | Value for stock precision |
money_prec | String | Value for money precision |
Example Response
{
"result": [
{
"name": "ETHBTC",
"stock": "ETH",
"fee_prec": 4,
"money": "BTC",
"min_amount": "0.001",
"stock_prec": 8,
"money_prec": 8
},
{
"name": "XMRBTC",
"stock": "XMR",
"fee_prec": 4,
"money": "BTC",
"min_amount": "0.5",
"stock_prec": 8,
"money_prec": 8
},
{
"name": "LTCBTC",
"stock": "LTC",
"fee_prec": 4,
"money": "BTC",
"min_amount": "0.5",
"stock_prec": 8,
"money_prec": 8
}
]
}
Market Summary
By default the endpoint returns the summary of all the market pairs. You can also provide a specific market pair name to get the summary.
HTTP Request
GET /api/v1/market/summary/<market-pair>
Sample Request
GET /api/v1/market/summary
- Return summary of all the markets pairs
GET /api/v1/market/summary/BTCUSDT
Response Parameters
Parameters | Parameter Type | Description |
---|---|---|
last | String | Last Price |
open | String | Open Price |
high | String | High Price |
low | String | Low Price |
base_volume | String | Base Volume |
quote_volume | String | Quote Volume |
price_change_percent_24h | String | Price changes in 24hour percentage |
Example Response
{
"result": {
"ETHUSDT": {
"last": "264.04",
"open": "243.16",
"high": "269.8",
"low": "242.77",
"base_volume": "125614.97171",
"quote_volume": "33167377.1303084",
"price_change_percent_24h": "8.5869"
},
"BDXBTC": {
"open": "0.000006",
"last": "0.000006",
"high": "0.000006",
"low": "0.000006",
"base_volume": "100",
"quote_volume": "0.0006000000000000001",
"price_change_percent_24h": "0.0000"
},
}
}
Total Volume
Returns the sum of total volumes from all the market pairs in BTC
HTTP Request
GET /api/v1/market/total-volume
Response Parameters
Parameters | Parameter Type | Description |
---|---|---|
total_volume | Integer | Total volume in BTC |
Example Reponse
{
"result": {
"total_volume": 140107.03623249722
}
}
24h Market Ticker
Returns 24 hours market status
HTTP Request
GET /api/v1/market/ticker/<market name>
Sample Request
GET /api/v1/market/ticker
- 24hr ticker for all markets will be returned
GET /api/v1/market/ticker/ETHUSDT
Response Parameters
Parameters | Parameter Type | Description |
---|---|---|
best_ask | String | Best sell in last 24hr |
best_bid | String | Best buy in last 24hr |
last | String | Last price |
open | String | Open price |
close | String | Close price |
high | String | Highest price during the given period |
low | String | Lowest price in the given period |
base_volume | String | Base volume for last 24hr |
quote_volume | String | Quote Volume for last 24hr |
Example Response
{
"result": {
"ETHUSDT": {
"best_ask": "264.45",
"best_bid": "264.44",
"last": "264.45",
"open": "243.37",
"high": "269.8",
"low": "242.77",
"base_volume": "476.62638755908495",
"quote_volume": "126043.84819"
},
"BDXBTC": {
"open": "0.00000511",
"last": "0.00000511",
"high": "0.00000511",
"low": "0.00000511",
"best_ask": "0.0000052",
"best_bid": "0.00000511",
"base_volume": "0",
"quote_volume": "0"
},
"BTCUSDT": {
"best_ask": "9483.7",
"best_bid": "9483.6",
"last": "9483.7",
"open": "9328.8",
"high": "9543.8",
"low": "9313.6",
"base_volume": "30.689593955945462",
"quote_volume": "291050.9022"
},
"ETHBTC": {
"best_ask": "0.02788",
"best_bid": "0.02787",
"last": "0.02788",
"open": "0.02609",
"high": "0.02838",
"low": "0.02607",
"base_volume": "65.92615566714491",
"quote_volume": "1.8380212200000001"
},
}
}
Market KLine
Returns array of KLine data for the given market, date range and interval
HTTP Request
POST /api/v1/market/kline
Example Request
POST /api/v1/market/kline
Request Payload:
{
"market": "BTCUSDT",
"start": 1576750273,
"end": 1577095873,
"interval": 60
}
Request Parameters
Parameters | Parameter Type | Description |
---|---|---|
market | String | market name e.g. BTCUSDT |
start | Integer | Start time in Unix timestamp |
end | Integer | End time in Unix timestamp |
interval | Integer | Time interval for kline in seconds e.g. 60 , 180 .. etc |
Example Response
{
"result": [
[
1492358400, // time
"7000.00", // open
"8000.0", // close
"8100.00", // highest
"6800.00", // lowest
"1000.00" // volume
"123456.78" // amount
"BTCUSDT" // market name
]
]
}
Market Last
Returns the last market price
HTTP Request
GET /api/v1/market/last/<market name>
Example Request
GET /api/v1/market/last/BTCUSDT
Response Parameters
Parameters | Parameter Type | Description |
---|---|---|
result | String | last market price |
Example Response
{
"result": "7124.38"
}
Market Deals
List of latest deals for a given market
HTTP Request
GET /api/v1/market/deals/<market-pair>?limit=5
Eample Request
GET /api/v1/market/deals/ETHUSDT?limit=5
Request Parameters
Parameters | Parameter Type | Description |
---|---|---|
market | String | market name e.g. BTCUSDT |
limit | Integer | number of records to show, not more than 1000 |
Example Response
{
"result": [
{
"trade_id": "39165947",
"price": "271.34",
"quote_volume": "0.000161686",
"type": "buy",
"base_volume": "5.958797081152798e-7",
"timestamp": "1595572349"
},
{
"trade_id": "39165946",
"price": "271.39",
"quote_volume": "0.000683522",
"type": "buy",
"base_volume": "0.000002518596853237039",
"timestamp": "1595572347"
},
{
"trade_id": "39165945",
"price": "271.38",
"quote_volume": "0.000008782",
"type": "sell",
"base_volume": "3.236052767337313e-8",
"timestamp": "1595572347"
},
{
"trade_id": "39165944",
"price": "271.4",
"quote_volume": "0.0008463",
"type": "sell",
"base_volume": "0.000003118275607958733",
"timestamp": "1595572347"
},
{
"trade_id": "39165943",
"price": "271.4",
"quote_volume": "0.0014",
"type": "sell",
"base_volume": "0.000005158437730287399",
"timestamp": "1595572347"
}
]
}