The RestPublicClient is used to make public requests to the IDEX API. It does not require any special options to access.
Options for configuring the RestPublicClient
import { RestPublicClient } from '@idexio/idex-sdk';
// works without any options
// const publicClient = new RestPublicClient();
const publicClient = new RestPublicClient({
sandbox: true,
// Optionally provide an API key to increase rate limits
apiKey: '1f7c4f52-4af7-4e1b-aa94-94fac8d931aa',
});
const tickers = await publicClient.getTickers('ETH-USD');
console.log('Tickers: ', tickers);
Returns basic information about the exchange.
Endpoint Parameters
An object matching IDEXExchange providing properties relating to the exchange.
Returns estimated gas fees by bridge and target chain
Endpoint Parameters
Returns information about the currently listed markets
market
request
parameter.Endpoint Parameters
Optional
params: RestRequestGetMarketsReturns market statistics for the trailing 24-hour period
Endpoint Parameters
Optional
params: RestRequestGetTickersReturns candle (OHLCV) data for a market
interval
property (see example)Endpoint Parameters
import { RestPublicClient, CandleInterval } from '@idexio/idex-sdk';
const client = new RestPublicClient();
const candles = await client.getCandles({
market: 'ETH-USD',
interval: CandleInterval.ONE_MINUTE
})
Returns trade data for a market. In this documentation, "trades" refers to public information about trades, whereas "fills" refers to detailed non-public information about trades resulting from orders placed by the API account.
Endpoint Parameters
Returns a level-1 order book of a market.
Endpoint Parameters
Get current order book price levels for a market
Endpoint Parameters
Get liquidations for a market
Endpoint Parameters
Get Funding Rates
Endpoint Parameters
Tests connectivity to the REST API
Endpoint Parameters
Returns the current server time
Endpoint Parameters
An object with the current server time in UTC
The RestPublicClient is used to make public requests to the IDEX API. It does not require any special options to access.
true
in order to point to the IDEX Sandbox API.Example
See