Markets

Last updated 26 days ago

REST endpoints for retrieving market information.

get
List Markets

https://api.radarrelay.com
/v2/markets/
Get all available markets.
Request
Response
Query Parameters
ids
optional
string
Comma-separated list of market ids in the format of {base}-{quote}. e.g. ZRX-WETH, DAI-WETH
sort
optional
string
Whether to sort the markets by activity ('active') or alphabetically ('name').
type
optional
string
Filter results by market type. Currently, the only valid option is "SHORT', though additional market types may be added in the future.
include
optional
string
Comma-separated list specifying which parts of the RadarMarket schema to include in the response. Valid options include 'base', 'ticker', 'stats', and 'history'. e.g. base,ticker,stats,history
quoteTokenAddress
optional
string
Returns the results for the specified quote token address.
search
optional
string
A search term to filter results by market name or base token name.
page
optional
integer
Page of markets to retrieve. Defaults to 1.
perPage
optional
integer
Number of markets to retrieve per page. Defaults to 20.
200: OK
See: $RadarMarket
[
{
"id": string,
"ticker": RadarTicker,
"stats": RadarStats,
"history": RadarHistory
}
]
400: Bad Request
Unknown error occurred

get
Get Market

https://api.radarrelay.com
/v2/markets/{marketId}
Return data for a single market.
Request
Response
Path Parameters
marketId
optional
string
Market ID in the format of {base}-{quote} e.g. ZRX-WETH
Query Parameters
include
optional
string
Comma-separated list specifying which parts of the RadarMarket Schema to include in the response. Valid options include 'base', 'ticker', 'stats', and 'history'. e.g. base,ticker,stats,history
200: OK
{
"id": string,
"ticker": RadarTicker,
"stats": RadarStats,
"history": RadarHistory
}
400: Bad Request
Unknown error occurred
404: Not Found
Market not found

get
Get Market Ticker

https://api.radarrelay.com
/v2/markets/{marketId}/ticker
Return ticker data for a single market
Request
Response
Path Parameters
marketId
optional
string
Market id in the format of {base}-{quote}. e.g. ZRX-WETH
200: OK
{
"transactionHash": string,
"price": BigNumber,
"size": BigNumber,
"timestamp": BigNumber, // unix
"bestBid": BigNumber,
"bestAsk": BigNumber,
"spreadPercentage": BigNumber
}
400: Bad Request
Unknown error occured
404: Not Found
Market not found

get
Get Market Stats

https://api.radarrelay.com
/v2/markets/{marketId}/stats
Get the stats for the specified market.
Request
Response
Path Parameters
marketId
optional
string
Market id in the format of {base}-{quote}. e.g. ZRX-WETH
200: OK
{
"numBidsWithinRange": number,
"numAsksWithinRange": number,
"baseTokenAvailable": BigNumber,
"quoteTokenAvailable": BigNumber,
"volume24Hour": BigNumber,
"percentChange24Hour": BigNumber
}
400: Bad Request
Unknown error occured
404: Not Found
Market not found

get
Get Market History

https://api.radarrelay.com
/v2/markets/{marketId}/history
Get the history for the specified market.
Request
Response
Path Parameters
marketId
optional
string
Market id in the format of {base}-{quote}. e.g. ZRX-WETH
200: OK
{
"price24Hour": BigNumber[]
}
400: Bad Request
Unknown error occured
404: Not Found
Market not found

get
List Market Fills

https://api.radarrelay.com
/v2/markets/{marketId}/fills
Return a paginated list of market fills sorted by fill date.
Request
Response
Path Parameters
marketId
optional
string
Market id in the format of {base}-{quote}. e.g. ZRX-WETH
Query Parameters
page
optional
integer
Page of fills to retrieve. Defaults to 1.
perPage
optional
integer
Number of fills to retrieve per page. Defaults to 20.
200: OK
[
{
"transactionHash": string,
"type": UserOrderType,
"blockNumber": number,
"makerAddress": string,
"takerAddress": string,
"baseTokenAddress": string;
"quoteTokenAddress": string;
"feeRecipientAddress": string;
"makerFeePaid": BigNumber,
"takerFeePaid": BigNumber,
"filledBaseTokenAmount": BigNumber,
"filledQuoteTokenAmount": BigNumber,
"orderHash": string,
"timestamp": number,
"outlier": boolean
}
]
400: Bad Request
Unknown error occured
404: Not Found
Market not found

get
List Market Candles

https://api.radarrelay.com
/v2/markets/{marketId}/candles
Request
Response
Path Parameters
marketId
optional
string
Market id in the format of {base}-{quote}. e.g. ZRX-WETH
Query Parameters
to
optional
integer
Unix timestamp to narrow the end time for candle data.
from
optional
integer
Unix timestamp to narrow the start time for candle data.
200: OK
[
{
"open": BigNumber,
"high": BigNumber,
"low": BigNumber,
"close": BigNumber,
"startBlock": number,
"startBlockTimestamp": number,
"endBlock": number,
"endBlockTimestamp": number,
"baseTokenVolume": BigNumber,
"quoteTokenVolume": BigNumber
}
]
400: Bad Request
Unknown error occured
404: Not Found
Market not found

get
Get Market Book

https://api.radarrelay.com
/v2/markets/{marketId}/book
Return a book containing bids / asks for a market.
Request
Response
Path Parameters
marketId
optional
string
Market id in the format of {base}-{quote}. e.g. ZRX-WETH
200: OK
{
"baseTokenAddress": string,
"quoteTokenAddress": string,
"bids": RadarSignedOrder[],
"asks": RadarSignedOrder[]
}
400: Bad Request
Unknown error occured
404: Not Found
Market not fou