Properties
Private apiKey
apiKey: string
Private apiSecret
apiSecret: string
Private axios
axios: AxiosInstance
Private orgID
orgID: string
Methods
Private createSignature
- createSignature(method: string, endpoint: string, date: number, nonce: string, query?: null | string | Record<any, any>, body?: null | string | object): string
Parameters
method: string
endpoint: string
date: number
nonce: string
query: null | string | Record<any, any> = null
body: null | string | object = null
Returns string
getMiningPayments
Parameters
size: number = 100
page: number = 0
getRigs
- getRigs(sort?: "NAME" | "PROFITABILITY" | "ACTIVE" | "INACTIVE", system?: string, status?: string, size?: number, page?: number): Promise<MiningRigs>
Parameters
sort: "NAME" | "PROFITABILITY" | "ACTIVE" | "INACTIVE" = "NAME"
system: string = ""
status: string = ""
size: number = 25
page: number = 0
getWithdrawalAddresses
Parameters
currency: null | Currency = null
size: number = 100
page: number = 0
makeWithdrawal
- makeWithdrawal(currency: Currency, address: string, amount: number): Promise<{ id: string }>
Parameters
address: string
amount: number
Returns Promise<{ id: string }>
Private request
- request(method: Method, endpoint: string, query?: null | string | Record<any, any>, body?: null | Record<any, any>): Promise<any>
Parameters
method: Method
endpoint: string
query: null | string | Record<any, any> = null
body: null | Record<any, any> = null
Returns Promise<any>
Creates an instance of NiceHash.
NiceHash