Interface RestAuthenticatedClientOptions

Authenticated API client configuration options.

Example

import { RestAuthenticatedClient } from '@idexio/idex-sdk';

// Edit the values before for your environment
const authenticatedClient = new RestAuthenticatedClient({
sandbox: false,
apiKey: '1f7c4f52-4af7-4e1b-aa94-94fac8d931aa',
apiSecret: 'axuh3ywgg854aq7m73oy6gnnpj5ar9a67szuw5lclbz77zqu0j',
walletPrivateKey: '0x...'
});


See

interface RestAuthenticatedClientOptions {
    apiKey: string;
    apiSecret: string;
    walletPrivateKey?: string;
    sandbox?: boolean;
}

Properties

apiKey: string
  • Used to authenticate the requesting user making requests to the API.
apiSecret: string
  • Used to compute HMAC signature for authenticated requests
walletPrivateKey?: string

The private key for the wallet making requests to the API.

Note: This should always be provided except in advanced use case scenarios.

  • When provided, used to create ECDSA signatures for authenticated requests automatically.
  • When not provided, must provider your own idex.SignTypedData signer to sign requests that require an ECDSA signature.
sandbox?: boolean
  • If true, the client will point to IDEX Sandbox API
  • If not provided or false, will point to the IDEX Production API.

Default Value

false