The RestPublicClient is used to make public requests to the IDEX API. It does not require any special options to access.

  • An apiKey can be provided to increase rate limits.
  • Optionally, a sandbox option can be set to true in order to point to the IDEX Sandbox API.

Example

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);


See

Constructor

  • The RestPublicClient is used to make public requests to the IDEX API. It does not require any special options to access.

    • An apiKey can be provided to increase rate limits.
    • Optionally, a sandbox option can be set to true in order to point to the IDEX Sandbox API.

    Parameters

    Returns RestPublicClient

    Example

    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);


    See

Exchange Data

Utility