Market Data
Prices
- GET
https://api.poloniex.com/markets/price - GET
https://api.poloniex.com/markets/{symbol}/price
/markets/price: Get latest trade price for all symbols.
| Response Field | Data Type | Description |
|---|---|---|
| symbol | String | symbol name |
| price | String | current price |
| time | Long | time the record was created |
| dailyChange | String | daily change in decimal |
| ts | Long | time the record was pushed |
Example output:
[
{
"symbol": "TRX_USDC",
"price": "0.06023436",
"time": 1648823320095,
"dailyChange": "0.0113",
"ts": 1649022802046
},
{
"symbol": "ELON_USDC",
"price": "0.0000007",
"time": 1648509468464,
"dailyChange": "-0.002",
"ts": 1649022801990
}
...
]
/markets/{symbol}/price: Get latest trade price for a symbol.
| Request Parameter | Data Type | Required | Description |
|---|---|---|---|
| symbol | String | true | symbol name |
Response fields are the same as /markets/price.
Example output:
{
"symbol": "BTC_USDT",
"price": "38597.32",
"time": 1648866396349,
"dailyChange": "0.0102",
"ts": 1649052548178
}
Mark Price
- GET
https://api.poloniex.com/markets/markPrice - GET
https://api.poloniex.com/markets/{symbol}/markPrice
/markets/price: Get latest mark price for all cross margin symbols.
| Response Field | Data Type | Description |
|---|---|---|
| symbol | String | symbol name |
| markPrice | String | current mark price |
| time | Long | time the record was created |
Example output:
[
{
"symbol": "BTC_USDT",
"markPrice": "17580.34",
"time": 1648823320095
},
{
"symbol": "ETH_USDT",
"markPrice": "1205.64",
"time": 1648509468464
}
...
]
/markets/{symbol}/price: Get latest mark price for a single cross margin symbol.
| Request Parameter | Data Type | Required | Description |
|---|---|---|---|
| symbol | String | true | symbol name |
Response fields are the same as /markets/markPrice.
Example output:
{
"symbol": "BTC_USDT",
"markPrice": "17580.34",
"time": 1648823320095
}
Mark Price Components
- GET
https://api.poloniex.com/markets/{symbol}/markPriceComponents
Get components of the mark price for a given symbol
| Response Field | Data Type | Description |
|---|---|---|
| markPrice | String | mark price of the symbol |
| symbol | String | symbol name |
| ts | Long | timestamp |
| components | Array of Json | price and weight info for the symbol from various exchanges |
| Response Field | Data Type | Description |
|---|---|---|
| symbol | String | symbol name |
| symbolPrice | String | symbol price |
| weight | String | weight assigned to the exchange price |
| convertPrice | String | symbol price converted to index |
| exchange | String | name of exchange |
Example output:
{
"markPrice": "17735.41",
"symbol": "BTC_USDT",
"ts": 1630985335599,
"components": [
{
"symbol": "BTC_USDT",
"symbolPrice": "17733.25",
"weight": "0.250",
"convertPrice": "17733.25",
"exchange": "OKEx"
},
{
"symbol": "BTC_USDT",
"symbolPrice": "17739.87",
"weight": "0.750",
"convertPrice": "17739.87",
"exchange": "Binance"
}
]
}
Order Book
- GET
https://api.poloniex.com/markets/{symbol}/orderBook
Get the order book for a given symbol. Scale and limit values are optional.
For valid scale values, please refer to
the scale values defined for each symbol . If scale is not supplied, then no grouping/aggregation will be applied.
| Request Parameter | Data Type | Required | Description |
|---|---|---|---|
| symbol | String | true | symbol name |
| scale | String | false | controls aggregation by price |
| limit | Integer | false | maximum number of records returned. The default value of limit is 10. Valid limit values are: 5, 10, 20, 50, 100, 150. |
| Response Field | Data Type | Description |
|---|---|---|
| time | Long | time the record was created |
| scale | String | controls aggregation by price |
| asks | List<String> | list of asks |
| bids | List<String> | list of bids |
| ts | Long | time the record was pushed |
Example output:
{
"time": 1648708448871,
"scale": "1",
"asks": [
"1.91",
"47.17277487"
],
"bids": [
"1.9",
"110",
"1.889",
"10"
],
"ts": 1648708448873
}
Candles
- GET
https://api.poloniex.com/markets/{symbol}/candles
Returns OHLC for a symbol at given timeframe (interval).
| Request Parameter | Data Type | Required | Description |
|---|---|---|---|
| symbol | String | true | symbol name |
| interval | String | true | the unit of time to aggregate data by. Valid values: MINUTE_1, MINUTE_5, MINUTE_10, MINUTE_15, MINUTE_30, HOUR_1, HOUR_2, HOUR_4, HOUR_6, HOUR_12, DAY_1, DAY_3, WEEK_1 and MONTH_1 |
| limit | Integer | false | maximum number of records returned. The default value is 100 and the max value is 500. |
| startTime | Long | false | filters by time. The default value is 0. |
| endTime | Long | false | filters by time. The default value is current time |
The response is a list of candles data values displayed in an array in the following order:
| Data Field | Data Type | Description |
|---|---|---|
| low | String | lowest price over the interval |
| high | String | highest price over the interval |
| open | String | price at the start time |
| close | String | price at the end time |
| amount | String | quote units traded over the interval |
| quantity | String | base units traded over the interval |
| buyTakerAmount | String | quote units traded over the interval filled by market buy orders |
| buyTakerQuantity | String | base units traded over the interval filled by market buy orders |
| tradeCount | Integer | count of trades |
| ts | Long | time the record was pushed |
| weightedAverage | String | weighted average over the interval |
| interval | String | the selected interval |
| startTime | Long | start time of interval |
| closeTime | Long | close time of interval |
Example output:
[
[
"1.9",
"1.9",
"1.9",
"1.9",
"0",
"0",
"0",
"0",
0,
1648707601291,
"1.9",
"MINUTE_1",
1648707600000,
1648707659999
],
[
...
],
...
]
Trades
- GET
https://api.poloniex.com/markets/{symbol}/trades
Returns a list of recent trades, request param limit is optional, its default value is 500, and max value is 1000.
| Request Parameter | Data Type | Required | Description |
|---|---|---|---|
| symbol | String | true | symbol name |
| limit | Integer | false | maximum number of records returned |
| Response Field | Data Type | Description |
|---|---|---|
| id | String | trade id |
| price | String | trade price |
| quantity | String | base units traded |
| amount | String | quote units traded |
| takerSide | String | taker's trade side (BUY, SELL) |
| ts | Long | time the trade was pushed |
| createTime | Long | time the trade was created |
Example output:
[
{
"id": "194",
"price": "1.9",
"quantity": "110",
"amount": "209.00",
"takerSide": "SELL",
"ts": 1648690080545,
"createTime": 1648634905695
}
]
Ticker
- GET
https://api.poloniex.com/markets/ticker24h - GET
https://api.poloniex.com/markets/{symbol}/ticker24h
Retrieve ticker in last 24 hours for all symbols.
| Response Field | Data Type | Description |
|---|---|---|
| symbol | String | symbol name |
| open | String | price at the start time |
| low | String | lowest price over the last 24h |
| high | String | highest price over the last 24h |
| close | String | price at the end time |
| quantity | String | base units traded over the last 24h |
| amount | String | quote units traded over the last 24h |
| tradeCount | Integer | count of trades |
| startTime | Long | start time for the 24h interval |
| closeTime | Long | close time for the 24h interval |
| displayName | String | symbol display name |
| dailyChange | String | daily change in decimal |
| bid | String | Best bid price |
| bidQuantity | String | Best bid quantity |
| ask | String | Best ask price |
| askQuantity | String | Best ask quantity |
| ts | Long | time the record was pushed |
| markPrice | String | current mark price |
Example output:
[
{
"symbol": "BTC_USDT",
"open": "30338.34",
"low": "30308.14",
"high": "32338.91",
"close": "30938.56",
"quantity": "0.1",
"amount": "0",
"tradeCount": 1,
"startTime": 1648995780000,
"closeTime": 1649082121008,
"displayName": "BTC/USDT",
"dailyChange": "0.0198",
"bid": "30338.34",
"bidQuantity": "0.01",
"ask": "30338.35",
"askQuantity": "0.01",
"ts": 1649082180190,
"markPrice": "30938.57"
},
{
"symbol": "ETH_USDT",
"open": "1817.69",
"low": "1723.50",
"high": "1897.12",
"close": "1723.50",
"quantity": "2",
"amount": "0",
"tradeCount": 5,
"startTime": 1648995780000,
"closeTime": 1649082121009,
"displayName": "ETH/USDT",
"dailyChange": "-0.0052",
"bid": "1817.70",
"bidQuantity": "0.01",
"ask": "1817.71",
"askQuantity": "0.01",
"ts": 1649082180190,
"markPrice": "1723.51"
}
]
Retrieve ticker in last 24 hours for a given symbol.
| Request Parameter | Data Type | Required | Description |
|---|---|---|---|
| symbol | String | true | symbol name |
Response fields are the same as /markets/ticker24h
Example output:
{
"symbol": "BTC_USDT",
"open": "30338.34",
"low": "30308.14",
"high": "32338.91",
"close": "30938.56",
"quantity": "0.1",
"amount": "0",
"tradeCount": 1,
"startTime": 1648995360000,
"closeTime": 1649081701009,
"displayName": "BTC/USDT",
"dailyChange": "0.0198",
"bid": "30338.34",
"bidQuantity": "0.01",
"ask": "30338.35",
"askQuantity": "0.01",
"ts": 1649081760190,
"markPrice": "30938.57"
}