Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PublicClient

Hierarchy

Index

Constructors

Properties

#private: any
apiUri: string
symbol: string

Accessors

  • get fetchOptions(): RequestInit
  • set fetchOptions(options: RequestInit): void
  • Returns RequestInit

  • Parameters

    • options: RequestInit

    Returns void

Methods

  • delete(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • fetch(path?: string, options?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional options: RequestInit

    Returns Promise<unknown>

  • get<T>(path: string): Promise<T>
  • Type Parameters

    • T = unknown

    Parameters

    • path: string

    Returns Promise<T>

  • getSymbol(__namedParameters: { symbol: string }): Promise<ISymbol>
  • Get extra details about the symbol.

    Parameters

    • __namedParameters: { symbol: string }
      • symbol: string

    Returns Promise<ISymbol>

  • getSymbols(): Promise<string[]>
  • Get all available symbols for trading.

    Returns Promise<string[]>

  • getTicker(options: { symbol?: string; v: "v2" }): Promise<TickerV2>
  • getTicker(options?: { symbol?: string; v?: "v1" }): Promise<TickerV1>
  • Get information about recent trading activity for the symbol.

    Parameters

    • options: { symbol?: string; v: "v2" }
      • Optional symbol?: string
      • v: "v2"

    Returns Promise<TickerV2>

  • Parameters

    • Optional options: { symbol?: string; v?: "v1" }
      • Optional symbol?: string
      • Optional v?: "v1"

    Returns Promise<TickerV1>

  • head(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • options(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • patch(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • post(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • put(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • trace(path?: string, _fetchOptions?: RequestInit): Promise<unknown>
  • Parameters

    • Optional path: string
    • Optional _fetchOptions: RequestInit

    Returns Promise<unknown>

  • #addOptions(target: URL, data: Record<string, undefined | string | number | boolean>): void
  • Parameters

    • target: URL
    • data: Record<string, undefined | string | number | boolean>

    Returns void