Overview
The Markets endpoint provides detailed market information for all available trading pairs, including current prices, funding rates, interest rates, and market statistics.
Parameters
Optional Ethereum address. If not provided, defaults to zero address.
Response Fields
Indicates if the request was successful
Current Unix timestamp in milliseconds
Total number of available markets
Array of market objects containing: Show Market Object Properties
Trading pair name (e.g., “BTC/USD”)
Current market price with full precision
Current funding rate (as decimal, e.g., 0.0001234 = 0.01234%)
Borrow rate for long positions
Borrow rate for short positions
Distribution of positions:
longPercentage
: Percentage of positions that are long
shortPercentage
: Percentage of positions that are short
Remaining capacity for new positions:
long
: Available liquidity for long positions
short
: Available liquidity for short positions
Notes
All rates (funding, borrow, trading fees) are expressed as decimals (e.g., 0.0005 = 0.05%)
Prices maintain full precision from the Pyth Network price feeds
Market utilization shows the higher percentage between long and short utilization
Long/Short ratio defaults to 50/50 when no positions exist
All monetary values (open interest, liquidity) are in USD
Example Usage
curl "https://unidexv4-api-production.up.railway.app/api/markets"
Example Response
{
"success" : true ,
"timestamp" : 1699454789123 ,
"marketsCount" : 57 ,
"markets" : [
{
"assetId" : "1" ,
"pair" : "BTC/USD" ,
"price" : "75964.03651450" ,
"fundingRate" : 0.0001234 ,
"borrowRateForLong" : 0.0050 ,
"borrowRateForShort" : 0.0025 ,
"longOpenInterest" : 125.50 ,
"shortOpenInterest" : 100.20 ,
"maxLongOpenInterest" : 1000.00 ,
"maxShortOpenInterest" : 1000.00 ,
"longTradingFee" : 0.0005 ,
"shortTradingFee" : 0.0005 ,
"utilization" : 12.55 ,
"longShortRatio" : {
"longPercentage" : 55.61 ,
"shortPercentage" : 44.39
},
"availableLiquidity" : {
"long" : 874.50 ,
"short" : 899.80
}
}
]
}
Ethereum address (optional)
Indicates if the request was successful
Current Unix timestamp in milliseconds
Total number of available markets