Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • NiceHash

Index

Constructors

Properties

apiKey: string
apiSecret: string
axios: AxiosInstance
orgID: string

Methods

  • createSignature(method: string, endpoint: string, date: number, nonce: string, query?: null | string | Record<any, any>, body?: null | string | object): string
  • Create an hmac signature

    memberof

    NiceHash

    Parameters

    • method: string
    • endpoint: string
    • date: number
    • nonce: string
    • query: null | string | Record<any, any> = null
    • body: null | string | object = null

    Returns string

  • Get the details for an account

    memberof

    NiceHash

    Parameters

    • currency: Currency

      The coin you want to get an account for

    Returns Promise<Account>

  • Get the stats for algorithms being mined

    memberof

    NiceHash

    Parameters

    • Optional rigId: string

    Returns Promise<AlgorithmsStats>

  • getRigs(sort?: "NAME" | "PROFITABILITY" | "ACTIVE" | "INACTIVE", system?: string, status?: string, size?: number, page?: number): Promise<MiningRigs>
  • Get all rigs

    memberof

    NiceHash

    Parameters

    • sort: "NAME" | "PROFITABILITY" | "ACTIVE" | "INACTIVE" = "NAME"
    • system: string = ""
    • status: string = ""
    • size: number = 25
    • page: number = 0

    Returns Promise<MiningRigs>

  • makeWithdrawal(currency: Currency, address: string, amount: number): Promise<{ id: string }>
  • Withdraw to an address

    memberof

    NiceHash

    Parameters

    • currency: Currency
    • address: string
    • amount: number

    Returns Promise<{ id: string }>

    }

  • request(method: Method, endpoint: string, query?: null | string | Record<any, any>, body?: null | Record<any, any>): Promise<any>
  • Make a request to the api

    memberof

    NiceHash

    Parameters

    • method: Method
    • endpoint: string
    • query: null | string | Record<any, any> = null
    • body: null | Record<any, any> = null

    Returns Promise<any>

Generated using TypeDoc