Getting Markets

Methods for getting market data from the Radar Relay API.

RadarRelay.markets.getAsync(marketId)

Fetch a single market by its ID or a group of markets by passing a list of IDs.

Parameters:

Name

Type

Description

marketId

string|string[]

A market ID or list of market IDs in the format of {base}-{quote}.e.g. 'ZRX-WETH' or ['ZRX-WETH', 'DAI-WETH']

Returns: Promise<Market | Map<string, Market>> - The Map key is mapped to the market's ID.

RadarRelay.markets.getNextPageAsync()

Fetch the next 100 markets.

No parameters.

Returns: Promise<Map<string, Market>> - The Map key is mapped to the market's ID.

RadarRelay.markets.getPageAsync(page, perPage)

Fetch a specific page of markets.

Parameters:

Name

Type

Description

page

number

The page to fetch.

perPage

number

The number of results per page to query.

Returns: Promise<Map<string, Market>> - The Map key is mapped to the market's ID.