Interface WebSocketClientAuthOptions

Providing the auth property to the WebSocketClient constructor will allow you to make authenticated subscriptions using the subscribeAuthenticated method

Example

  import { WebSocketClient } from '@idexio/idex-sdk'

const client = new WebSocketClient({
// Edit the values before for your environment
auth: {
apiKey: '1f7c4f52-4af7-4e1b-aa94-94fac8d931aa',
apiSecret: 'axuh3ywgg854aq7m73oy6gnnpj5ar9a67szuw5lclbz77zqu0j',
wallet: '0x...',
}
// sandbox: true,
// logger: console.log
});


See

parent WebSocketClientOptions

interface WebSocketClientAuthOptions {
    apiKey: string;
    apiSecret: string;
    wallet: string;
}

Properties

apiKey: string

The user's API Key for the account they wish to make authenticated subscriptions with, this is used to retrieve a WebSocket Token that can be used to authenticate the connection.

apiSecret: string

Used to compute HMAC signature when refreshing the WebSocket Token

wallet: string

The wallet that should be used when subscribing to authenticated channels.