Class OrderbookV1

Hierarchy

  • OrderbookV1

Constructors

Properties

apiKey: string

The API key to use for fetching data from the Premia API.

See

https://docs.premia.finance/api/authentication

chainId: number

This is the chain id of where orders will SETTLE (ie Arbitrum or Arbitrum Goerli)

uri: string

The base URI to use for fetching data from the Premia API.

See

https://docs.premia.finance/api

ws?: WebSocket
wsUri: string

The base websocket URI to use for streaming data from the Premia API.

See

https://docs.premia.finance/api

Methods

  • Waits for the websocket to connect

    Parameters

    • timeout: number = 10000

      timeout in milliseconds (default 10 seconds)

    Returns Promise<unknown>

    a promise that resolves to true if connected, false if not connected

Generated using TypeDoc