Class AuthenticatedClient

Hierarchy

Constructors

Properties

#key: string
#private: any
#secret: string
#signTimestamp: (() => string)

Type declaration

    • (): string
    • Returns string

#symbol: string

Accessors

  • get base_url(): URL
  • Returns URL

  • get init(): RequestInit
  • Returns RequestInit

  • get reject(): boolean
  • Returns boolean

  • get symbol(): string
  • Returns string

  • get transform(): null | ITransformType
  • Returns null | ITransformType

Methods

  • Batch cancel one or many active orders.

    Parameters

    • orders: ({
          clientOrderId: string;
      } | {
          id: string;
      })[]

    Returns Promise<ICanceledOrder[]>

  • Get borrow status of currencies.

    Parameters

    • options: {
          currency?: string;
      } = {}
      • Optional currency?: string

    Returns Promise<IBorrow>

  • Get latest mark price for a single cross margin symbol.

    Parameters

    • __namedParameters: {
          symbol: undefined | string;
      } = {}
      • symbol: undefined | string

    Returns Promise<IMarkPrice>

  • Get maximum and available buy/sell amount for a given symbol.

    Parameters

    • __namedParameters: {
          symbol: undefined | string;
      } = {}
      • symbol: undefined | string

    Returns Promise<IMaxSize>

  • Get a list of (pending) smart orders.

    Parameters

    • options: {
          limit?: number;
      } = {}
      • Optional limit?: number

    Returns Promise<IOpenSmartOrder[]>

  • Get an order’s status.

    Parameters

    • options: {
          clientOrderId: string;
      } | {
          id: string;
      }

    Returns Promise<IOrder>

  • Get a list of all trades for an order specified by its orderId.

    Parameters

    • __namedParameters: {
          id: string;
      }
      • id: string

    Returns Promise<ITrade[]>

  • Get the latest trade price for a symbol.

    Parameters

    • __namedParameters: {
          symbol: undefined | string;
      } = {}
      • symbol: undefined | string

    Returns Promise<IPrice>

  • Get a smart order’s status.

    Parameters

    • options: {
          clientOrderId: string;
      } | {
          id: string;
      }

    Returns Promise<null | ISmartOrder>

  • Get ticker in last 24 hours for a given symbol.

    Parameters

    • __namedParameters: {
          symbol: undefined | string;
      } = {}
      • symbol: undefined | string

    Returns Promise<ITicker>

  • Get deposit addresses.

    Parameters

    • options: {
          currency?: string;
      } = {}
      • Optional currency?: string

    Returns Promise<Record<string, string>>

  • Parameters

    • Optional path: string
    • Optional init: IFetchOptions

    Returns Promise<Response>

  • Create a new address for a currency.

    Parameters

    • options: {
          currency: string;
      }
      • currency: string

    Returns Promise<{
        address: string;
    }>

  • Type Parameters

    • T = unknown

    Parameters

    • Optional path: string
    • Optional init: IFetchOptions

    Returns Promise<T>

  • Type Parameters

    • T = unknown

    Parameters

    • Optional path: string
    • Optional init: IFetchOptions

    Returns Promise<T>

  • Cancel an existing active order, new or partially filled, and place a new order on the same symbol with details from existing order unless amended by new parameters.

    Parameters

    • id: {
          clientOrderId: string;
      } | {
          id: string;
      }
    • Optional options: IReplaceOrderOptions

    Returns Promise<IOrderId>

  • Cancel an existing untriggered smart order and place a new smart order on the same symbol with details from existing smart order unless amended by new parameters.

    Parameters

    Returns Promise<IOrderId>

  • Transfer amount of currency from an account to another account

    Parameters

    Returns Promise<{
        transferId: string;
    }>

  • Immediately place a withdrawal for a given currency, with no email confirmation.

    Parameters

    Returns Promise<{
        withdrawalRequestsId: number;
    }>