Skip to main content

Market Data API

Get real-time market data including prices, order books, and trading pair information.

Higher Rate Limit

Market data endpoints have a higher rate limit of 30 requests/second compared to other endpoints.

Endpoints

MethodEndpointDescription
GET /api/sdk/market-data/pricesGet prices for all or specific assets
GET /api/sdk/market-data/prices/:assetGet price for a single asset
GET /api/sdk/market-data/orderbook/:assetGet order book for an asset
GET /api/sdk/market-data/orderbooksGet order books for multiple assets
GET /api/sdk/market-data/trading-pairsGet available trading pairs
GET /api/sdk/market-data/stats/24hGet 24-hour statistics

The Price Object

{
"asset": "BTC",
"bid": 49950.00,
"ask": 50050.00,
"mid": 50000.00,
"last": 50010.00,
"change24h": 2.5,
"volume24h": 1250.5,
"high24h": 51000.00,
"low24h": 48500.00,
"updatedAt": "2024-01-15T10:30:00.000Z"
}

Attributes

AttributeTypeDescription
assetstringAsset symbol
bidnumberBest bid price
asknumberBest ask price
midnumberMid price ((bid + ask) / 2)
lastnumberLast trade price
change24hnumber24-hour price change percentage
volume24hnumber24-hour trading volume
high24hnumber24-hour high price
low24hnumber24-hour low price
updatedAtstringLast update timestamp

Get Prices

Get current prices for all assets or specific assets.

GET /api/sdk/market-data/prices

Required Scope: READ

Query Parameters

ParameterTypeRequiredDescription
assetsstringNoComma-separated list of asset symbols

Example Request

# Get all prices
curl -X GET https://api.zenotc.com/api/sdk/market-data/prices \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"

# Get specific assets
curl -X GET "https://api.zenotc.com/api/sdk/market-data/prices?assets=BTC,ETH,SOL" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
# Get all prices
prices = api_request("GET", "/api/sdk/market-data/prices")

# Get specific assets
prices = api_request("GET", "/api/sdk/market-data/prices?assets=BTC,ETH,SOL")

Response

{
"prices": [
{
"asset": "BTC",
"bid": 49950.00,
"ask": 50050.00,
"mid": 50000.00,
"last": 50010.00,
"change24h": 2.5,
"volume24h": 1250.5,
"updatedAt": "2024-01-15T10:30:00.000Z"
},
{
"asset": "ETH",
"bid": 2495.00,
"ask": 2505.00,
"mid": 2500.00,
"last": 2502.00,
"change24h": 1.8,
"volume24h": 15000.0,
"updatedAt": "2024-01-15T10:30:00.000Z"
}
]
}

Get Asset Price

Get the current price for a single asset.

GET /api/sdk/market-data/prices/:asset

Required Scope: READ

Path Parameters

ParameterTypeDescription
assetstringAsset symbol (e.g., BTC)

Example Request

curl -X GET https://api.zenotc.com/api/sdk/market-data/prices/BTC \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
price = api_request("GET", "/api/sdk/market-data/prices/BTC")

Response

Returns a single Price object.

Errors

CodeDescription
404Asset not found

Get Order Book

Get the order book for an asset.

GET /api/sdk/market-data/orderbook/:asset

Required Scope: READ

Path Parameters

ParameterTypeDescription
assetstringAsset symbol

Query Parameters

ParameterTypeDefaultDescription
depthinteger10Number of price levels (1-50)

Example Request

curl -X GET "https://api.zenotc.com/api/sdk/market-data/orderbook/BTC?depth=10" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
orderbook = api_request("GET", "/api/sdk/market-data/orderbook/BTC?depth=10")

Response

{
"asset": "BTC",
"bids": [
{"price": 49950.00, "quantity": 5.0},
{"price": 49900.00, "quantity": 10.0},
{"price": 49850.00, "quantity": 8.5},
{"price": 49800.00, "quantity": 12.0},
{"price": 49750.00, "quantity": 6.0}
],
"asks": [
{"price": 50050.00, "quantity": 5.0},
{"price": 50100.00, "quantity": 8.0},
{"price": 50150.00, "quantity": 7.5},
{"price": 50200.00, "quantity": 15.0},
{"price": 50250.00, "quantity": 4.0}
],
"timestamp": "2024-01-15T10:30:00.000Z"
}

Order Book Entry

AttributeTypeDescription
pricenumberPrice level
quantitynumberTotal quantity at this price

Get Multiple Order Books

Get order books for multiple assets in a single request.

GET /api/sdk/market-data/orderbooks

Required Scope: READ

Query Parameters

ParameterTypeRequiredDescription
assetsstringYesComma-separated list of asset symbols
depthintegerNoNumber of price levels (default 10)

Example Request

curl -X GET "https://api.zenotc.com/api/sdk/market-data/orderbooks?assets=BTC,ETH&depth=5" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
orderbooks = api_request("GET", "/api/sdk/market-data/orderbooks?assets=BTC,ETH&depth=5")

Response

{
"orderbooks": {
"BTC": {
"asset": "BTC",
"bids": [
{"price": 49950.00, "quantity": 5.0}
],
"asks": [
{"price": 50050.00, "quantity": 5.0}
],
"timestamp": "2024-01-15T10:30:00.000Z"
},
"ETH": {
"asset": "ETH",
"bids": [
{"price": 2495.00, "quantity": 50.0}
],
"asks": [
{"price": 2505.00, "quantity": 50.0}
],
"timestamp": "2024-01-15T10:30:00.000Z"
}
}
}

Get Trading Pairs

Get all available trading pairs and their specifications.

GET /api/sdk/market-data/trading-pairs

Required Scope: READ

Example Request

curl -X GET https://api.zenotc.com/api/sdk/market-data/trading-pairs \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
pairs = api_request("GET", "/api/sdk/market-data/trading-pairs")

Response

{
"pairs": [
{
"base": "BTC",
"quote": "USD",
"symbol": "BTC-USD",
"minQuantity": 0.001,
"maxQuantity": 100.0,
"quantityStep": 0.001,
"minPrice": 0.01,
"priceStep": 0.01,
"minNotional": 10.0,
"status": "active"
},
{
"base": "ETH",
"quote": "USD",
"symbol": "ETH-USD",
"minQuantity": 0.01,
"maxQuantity": 1000.0,
"quantityStep": 0.01,
"minPrice": 0.01,
"priceStep": 0.01,
"minNotional": 10.0,
"status": "active"
}
]
}

Trading Pair Attributes

AttributeTypeDescription
basestringBase asset symbol
quotestringQuote asset symbol
symbolstringTrading pair symbol
minQuantitynumberMinimum order quantity
maxQuantitynumberMaximum order quantity
quantityStepnumberQuantity increment
minPricenumberMinimum price
priceStepnumberPrice increment
minNotionalnumberMinimum order value
statusstringactive or inactive

Get 24h Statistics

Get 24-hour trading statistics.

GET /api/sdk/market-data/stats/24h

Required Scope: READ

Query Parameters

ParameterTypeRequiredDescription
assetstringNoFilter by asset symbol

Example Request

# Get stats for all assets
curl -X GET https://api.zenotc.com/api/sdk/market-data/stats/24h \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"

# Get stats for specific asset
curl -X GET "https://api.zenotc.com/api/sdk/market-data/stats/24h?asset=BTC" \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"
stats = api_request("GET", "/api/sdk/market-data/stats/24h")
btc_stats = api_request("GET", "/api/sdk/market-data/stats/24h?asset=BTC")

Response

{
"stats": [
{
"asset": "BTC",
"open": 49000.00,
"high": 51000.00,
"low": 48500.00,
"close": 50000.00,
"volume": 1250.5,
"volumeUsd": 62525000.00,
"trades": 847,
"change": 1000.00,
"changePercent": 2.04,
"vwap": 49850.00
},
{
"asset": "ETH",
"open": 2450.00,
"high": 2550.00,
"low": 2400.00,
"close": 2500.00,
"volume": 15000.0,
"volumeUsd": 37500000.00,
"trades": 1523,
"change": 50.00,
"changePercent": 2.04,
"vwap": 2480.00
}
]
}

Statistics Attributes

AttributeTypeDescription
assetstringAsset symbol
opennumberOpening price (24h ago)
highnumberHighest price in 24h
lownumberLowest price in 24h
closenumberCurrent/closing price
volumenumberTrading volume in base asset
volumeUsdnumberTrading volume in USD
tradesnumberNumber of trades
changenumberPrice change
changePercentnumberPrice change percentage
vwapnumberVolume-weighted average price