1. Spot Prices API
1.1 Query Spot Trading Pair List
1.1.1 Spot Trading Pair List
Address: /openApi/market/symbols
1.1.2 Receive Parameters
No
Submission method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/market/symbols
# Returned Parameters
Parameter name | Required? | Type | Example | Description |
errno | Yes | int | 0 | Status code |
errmsg | Yes | success | success | Status info |
result | Yes | list | See example | List |
# Result Parameter Details
Parameter name | Required? | Type | Example | Description |
id | Yes | int | 11 | Trading pair ID |
symbol | Yes | string | BTC-USDT | Trading pair name |
base_currency | Yes | string | BTC | Base currency |
quote_currency | Yes | string | USDT | Quote currency |
min_size | Yes | float | 0.0000001 | Minimum trading volume |
max_size | Yes | float | 10000 | Maximum trading volume |
min_price | Yes | float | 0.001 | Minimum filled price |
max_price | Yes | float | 1000 | Maximum filled price |
taker_fee | Yes | float | 0.002 | Taker order fee, value range is between 0-1, e.g. (0.01 is 1%) |
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": [
{
"id":1223,
"symbol": "BTC-USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"min_size": 0.0000001,
"max_size": 10000,
"min_price": 0.001,
"max_price":1000,
"maker_fee":0.002,
"taker_fee":0.002
},
{
"id":1223,
"symbol": "EOS-USDT",
"base_currency": "EOS",
"quote_currency": "USDT",
"min_size": 0.0000001,
"max_size": 10000,
"min_price": 0.001,
"max_price":1000,
"maker_fee":0.002,
"taker_fee":0.002
},
]
}
1.2 Query Spot Price Data in Last 24 Hours
1.2.1 Spot Price Data in Last 24 Hours
Address: /openApi/market/symbols
1.2.2 Receive Parameters
Submission Method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/market/24kline
# Submitted Parameters
Parameter name |
Required? |
Type |
Example |
Description |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
array |
See example |
Returned result |
# Result Details
{
"id": response id,
"amount":number of traded contracts in last 24 hours,
"count":number of transactions in last 24 hours,
"open":opening price in last 24 hours,
"close":closing price in last 24-hours,
"low":lowest price in last 24 hours,
"high":highest price in last 24 hours,
"vol":trade volume measured in settlement currency
}
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": [
{
"symbol": "BTC-USDT",
"data": {
"id": 1564383039,
"amount": "501.58104763207614180517",
"count": 21030,
"open": "9510.3854955",
"close": "9611.293874",
"low": "9183.037249591129",
"high": "9722.409967228807",
"vol": "4758286.23346497644732575715063331978898"
}
},
{
"symbol": "ETH-USDT",
"data": {
"id": 1564383052,
"amount": "16009.212149527699210913",
"count": 29174,
"open": "210.117172",
"close": "211.8394075",
"low": "199.2297417116734",
"high": "215.22023539561525",
"vol": "3340147.73970105212247360817121760004971"
}
},
{
"symbol": "EOS-USDT",
"data": {
"id": 1564383052,
"amount": "211869.51477404722383204",
"count": 44779,
"open": "4.309048775000001",
"close": "4.283380825",
"low": "3.8982515118182044",
"high": "4.381447583333333",
"vol": "896966.117596907928217908379228164244991"
}
}
]
}
{
"errno": 10010,
"errmsg": "fail"
}
1.3 Query Spot Market Trades
1.3.1 Spot Market Trades
Address: /openApi/market/trade
1.3.2 Receive Parameters
Submission Method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/market/trade
# Submitted Parameters
Parameter name |
Required? |
Type |
Example |
Description |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
size |
No |
int |
150 |
Get quantity, range: [1,200] |
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
array |
See example |
Returned result |
# Result Details
Parameter name |
Required? |
Type |
Example |
Description |
ts |
Yes |
int |
1499184000 |
Data acquisition time |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
data |
Yes |
array |
See example |
Trade data |
# Data Details
"data": [
{
"id":trade ID,
"price":filled price,
"amount":volume,
"direction":active trading direction,
"ts":transaction time
}
]
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": {
"symbol":"EOS-USDT",
"ts":"1499223904680",
"data": [
{
"id": 17592256642623,
"amount": 0.04,
"price": 1997,
"direction": "buy",
"ts": 1502448920106
},
{
"id": 17592256642622,
"amount": 0.04,
"price": 1997,
"direction": "sell",
"ts": 1502448920105
}
]
}
}
{
"errno": 10010,
"errmsg": "fail"
}
1.4 Query Spot Market Depth
1.4.1 Spot Market Depth
Address: /openApi/market/depth
1.4.2 Receive Parameters
Submission Method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/market/depth
# Submitted Parameters
Parameter name |
Required? |
Type |
Example |
Description |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
array |
See example |
Returned result |
# Result Details
Parameter name |
Required? |
Type |
Example |
Description |
ts |
Yes |
int |
1499184000 |
Data acquisition time |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
asks |
Yes |
array |
See example |
Sell, [price (filled price), amount (volume)], price low-high |
bids |
Yes |
array |
See example |
Buy, [price (filled price), amount (volume)], price high-low |
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": {
"symbol":"EOS-USDT",
"ts":1499223904680,
"bids": [
[7964, 0.0678], // [price, amount]
[7963, 0.9162],
[7961, 0.1],
[7960, 12.8898],
[7958, 1.2],
[7955, 2.1009],
[7954, 0.4708],
[7953, 0.0564],
[7951, 2.8031],
[7950, 13.7785],
[7949, 0.125],
[7948, 4],
[7942, 0.4337],
[7940, 6.1612],
[7936, 0.02],
[7935, 1.3575],
[7933, 2.002],
[7932, 1.3449],
[7930, 10.2974],
[7929, 3.2226]
],
"asks": [
[7979, 0.0736],
[7980, 1.0292],
[7981, 5.5652],
[7986, 0.2416],
[7990, 1.9970],
[7995, 0.88],
[7996, 0.0212],
[8000, 9.2609],
[8002, 0.02],
[8008, 1],
[8010, 0.8735],
[8011, 2.36],
[8012, 0.02],
[8014, 0.1067],
[8015, 12.9118],
[8016, 2.5206],
[8017, 0.0166],
[8018, 1.3218],
[8019, 0.01],
[8020, 13.6584]
]
}
}
{
"errno": 10010,
"errmsg": "fail"
}
2. Futures Prices API
2.1 Query Futures Info
2.1.1 Futures Trading Pair List
Address: /openApi/contract/symbols
2.1.2 Receive Parameters
No
Submission method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/contract/symbols
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
list |
See example |
List |
# Result Parameter Details
Parameter name |
Required? |
Type |
Example |
Description |
id |
Yes |
int |
11 |
Trading pair ID |
symbol |
Yes |
string |
BTC- USDT |
Trading pair name |
contract_size |
Yes |
float |
1 |
Contract face value, i.e. 1 contract corresponds to how many USD |
base_currency |
Yes |
string |
BTC |
Base currency |
quote_currency |
Yes |
string |
USDT |
Quote currency |
min_size |
Yes |
float |
0.0000001 |
Minimum trading volume |
max_size |
Yes |
float |
10000 |
Maximum trading volume |
min_price |
Yes |
float |
0.001 |
Minimum filled price |
max_price |
Yes |
float |
1000 |
Maximum filled price |
maker_fee |
Yes |
float |
0.002 |
Maker order fee, value range is between 0-1, e.g. (0.1 is 10%) |
taker_fee |
Yes |
float |
0.002 |
Taker order fee, value range is between 0-1, e.g. (0.01 is 1%) |
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": [
{
"id":1223,
"symbol": "BTC-USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"min_size": 0.0000001,
"max_size": 10000,
"min_price": 0.001,
"max_price":1000,
"maker_fee":0.002,
"taker_fee":0.002
},
{
"id":1223,
"symbol": "EOS-USDT",
"base_currency": "EOS",
"quote_currency": "USDT",
"min_size": 0.0000001,
"max_size": 10000,
"min_price": 0.001,
"max_price":1000,
"maker_fee":0.002,
"taker_fee":0.002
},
]
}
2.2 Query Futures Price Data in Last 24 Hours
2.2.1 Futures Price Data in Last 24 Hours
Address: /openApi/contract/24kline
2.2.2 Receive Parameters
Submission Method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/contract/24kline
# Submitted Parameters
Parameter name |
Required? |
Type |
Example |
Description |
symbol |
No |
string |
BTC- USDT |
Trading pair, "," can be used to search for prices of multiple trading pairs in the last 24 hours, e.g. BTC-USDT, ETH-USDT, EOS-USDT, get all trading pair details if no parameter given |
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
array |
See example |
Returned result |
# Result Details
{
"id":
response id,
"amount":number of traded contracts in last 24 hours,
"count":number of transactions in last 24 hours,
"open":opening price in last 24 hours,
"close":closing price in last 24-hours,
"low":lowest price in last 24 hours,
"high":highest price in last 24 hours,
"vol":trading volume in last 24 hours
}
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": [
{
"symbol": "BTC-USDT",
"data": {
"id": 1564383039,
"amount": "501.58104763207614180517",
"count": 21030,
"open": "9510.3854955",
"close": "9611.293874",
"low": "9183.037249591129",
"high": "9722.409967228807",
"vol": "4758286.23346497644732575715063331978898"
}
},
{
"symbol": "ETH-USDT",
"data": {
"id": 1564383052,
"amount": "16009.212149527699210913",
"count": 29174,
"open": "210.117172",
"close": "211.8394075",
"low": "199.2297417116734",
"high": "215.22023539561525",
"vol": "3340147.73970105212247360817121760004971"
}
},
{
"symbol": "EOS-USDT",
"data": {
"id": 1564383052,
"amount": "211869.51477404722383204",
"count": 44779,
"open": "4.309048775000001",
"close": "4.283380825",
"low": "3.8982515118182044",
"high": "4.381447583333333",
"vol": "896966.117596907928217908379228164244991"
}
}
]
}
{
"errno": 10010,
"errmsg": "fail"
}
2.3 Query Futures Market Trades
2.3.1 Futures Market Trades
Address: /openApi/contract/trade
2.3.2 Receive Parameters
Submission Method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/contract/trade
# Submitted Parameters
Parameter name |
Required? |
Type |
Example |
Description |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
size |
No |
int |
150 |
Get quantity, range: [1,2000] |
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
array |
See example |
Returned result |
# Result Details
Parameter name |
Required? |
Type |
Example |
Description |
ts |
Yes |
int |
1499184000 |
Data acquisition time |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
data |
Yes |
array |
See example |
Trade data |
# Data Details
"data": [
{
"id":trade ID,
"price":filled price,
"amount":volume,
"direction":active trading direction,
"ts":transaction time
}
]
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": {
"symbol":"EOS-USDT",
"ts":"1499223904680",
"data": [
{
"id": 17592256642623,
"amount": 0.04,
"price": 1997,
"direction": "buy",
"ts": 1502448920106
},
{
"id": 17592256642622,
"amount": 0.04,
"price": 1997,
"direction": "sell",
"ts": 1502448920105
}
]
}
}
{
"errno": 10010,
"errmsg": "fail"
}
2.4 Query Futures Market Depth
2.4.1 Futures Market Depth
Address: /openApi/contract/depth
2.4.2 Receive Parameters
Submission Method: GET
# Example
curl -d https://oapi.easycoins.com/openApi/contract/depth
# Submitted Parameters
Parameter name |
Required? |
Type |
Example |
Description |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
depth |
Yes |
float |
0.0001 |
Depth (0.0001, 0.00001, 0.000001) |
# Returned Parameters
Parameter name |
Required? |
Type |
Example |
Description |
errno |
Yes |
int |
0 |
Status code |
errmsg |
Yes |
success |
success |
Status info |
result |
Yes |
array |
See example |
Returned result |
# Result Details
Parameter name |
Required? |
Type |
Example |
Description |
ts |
Yes |
int |
1499184000 |
Data acquisition time |
symbol |
Yes |
string |
BTC-USDT |
Trading pair |
asks |
Yes |
array |
See example |
Sell, gear (tick), price (filled price), amount (volume), price low-high |
bids |
Yes |
array |
See example |
Buy, gear (tick), price (filled price), amount (volume), price high-low |
# Return Example
{
"errno": 0,
"errmsg": "success",
"result": {
"symbol":"EOS-USDT",
"ts":1499223904680,
"bids": [
[7964, 0.0678], // [price, amount]
[7963, 0.9162],
[7961, 0.1],
[7960, 12.8898],
[7958, 1.2],
[7955, 2.1009],
[7954, 0.4708],
[7953, 0.0564],
[7951, 2.8031],
[7950, 13.7785],
[7949, 0.125],
[7948, 4],
[7942, 0.4337],
[7940, 6.1612],
[7936, 0.02],
[7935, 1.3575],
[7933, 2.002],
[7932, 1.3449],
[7930, 10.2974],
[7929, 3.2226]
],
"asks": [
[7979, 0.0736],
[7980, 1.0292],
[7981, 5.5652],
[7986, 0.2416],
[7990, 1.9970],
[7995, 0.88],
[7996, 0.0212],
[8000, 9.2609],
[8002, 0.02],
[8008, 1],
[8010, 0.8735],
[8011, 2.36],
[8012, 0.02],
[8014, 0.1067],
[8015, 12.9118],
[8016, 2.5206],
[8017, 0.0166],
[8018, 1.3218],
[8019, 0.01],
[8020, 13.6584]
]
}
}
{
"errno": 10010,
"errmsg": "fail"
}
If you have any question about EasyCoins Public Open Api Documents, please feel free to contact EasyCoins Customer Service.