Members
(static) currencies :Array.<String>
Contains supported currencies. To refresh, call getSupportedCurrencies method.
Type:
- Array.<String>
Methods
(static) getBalanceSummary(userSecret) → {BalanceResponse|Error}
Returns balance for the given user.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
- Type
- BalanceResponse | Error
(static) getCoinBalance(userSecret, coin) → {BalanceForCoinResponse|Error}
Returns balance of a single coin for the given user.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
coin |
string | Coin for which to get balance. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
Coin not supported | Coin requested isn't yet supported by us |
- Type
- BalanceForCoinResponse | Error
(static) getCoinTransactions(userSecret, pagination, coin) → {TransactionResponse|Error}
Returns paginated transactions of a user for the specified coin. Also included in the response is a {PaginationHeader}, used to get next chunk of transactions.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
pagination |
PaginationConfig | Pagination configuration (Which page to get and how many results per page). |
coin |
string | Coin for which to get transactions. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
Coin not supported | Coin requested isn't yet supported by us |
- Type
- TransactionResponse | Error
(static) getDeposit(userSecret, coin) → {Error}
Returns deposit address of a user's wallet for the specified coin.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
coin |
string | Coin for which to get deposit address. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
Coin not supported | Coin requested isn't yet supported by us |
KYC not passed | You have to pass KYC to perform this action |
- Type
- Error
(static) getInterestSummary(userSecret) → {InterestResponse|Error}
Returns interest earned so far for the given user.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
- Type
- InterestResponse | Error
(static) getKycStatus(userSecret) → {KYCStatus|Error}
Returns KYC status for the given user. If partner authenticates users via api-keys, status returned will always be Passed because users are required to pass KYC before creating api keys.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
- Type
- KYCStatus | Error
(static) getStatistics(timestamp, userSecret) → {StatisticsResponse}
This method returns statistics for the given userSecret. Timestamp can be optionally passed to configure start date for getting statistics.
Parameters:
Name | Type | Description |
---|---|---|
timestamp |
timestamp | Timestamp from which to calculate statistics |
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
Returns:
- Type
- StatisticsResponse
(static) getSupportedCurrencies() → {Array.<String>}
Returns currently supported currencies and refreshes currencies property of this CelsiusInstance.
Returns:
- Type
- Array.<String>
(static) getTransactionsStatus(userSecret, transaction) → {TransactionStatus|Error}
This method returns transaction status for specific transaction.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
transaction |
string | Id of transaction. |
Returns:
-
Transaction status
- Type
- TransactionStatus
-
- Type
- Error
(static) getTransactionSummary(userSecret, pagination) → {TransactionResponse|Error}
Returns paginated transactions of a user. Also included in the response is a {PaginationHeader}, used to get next chunk of transactions.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
pagination |
PaginationConfig | Pagination configuration (Which page to get and how many results per page). |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
- Type
- TransactionResponse | Error
(static) verifyKyc(userSecret, userData, documents) → {Error}
Returns current balance for the given user.
Parameters:
Name | Type | Description |
---|---|---|
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
userData |
UserData | Represents user's personal information. |
documents |
Documents | Images of user's documents. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
Kyc passed | KYC already passed |
Kyc started | You already sent KYC request |
Kyc data missing | Missing some of the data required for KYC |
Invalid country provided | Country provided wasn't found in our supported countries |
Invalid state provided | State provided wasn't found in our supported US states |
Badly formatted SSN provided | SSN provided was in a wrong format |
Invalid SSN error | SSN provided has failed verification |
- Type
- Error
(static) withdraw(coin, formFields, userSecret) → {Error}
Withdraws the specified amount to the provided address.
Parameters:
Name | Type | Description |
---|---|---|
coin |
string | For witch coin to perform the withdrawal. |
formFields |
WithdrawalFields | Contains amount to withdraw and and address that amount is to be withdrawn to. |
userSecret |
string | Represents a secret value used to uniquely identify users. Can be user-token or api-key. |
Returns:
Error name | Description |
---|---|
Unauthorized | Required user secret and partner key and permission |
Invalid response | Signature failed verification |
Invalid partner | Non existent partner |
Coin not supported | Coin requested isn't yet supported by us |
KYC not passed | You have to pass KYC to perform this action |
Bad address format | Bad address format |
Dusk check | You cannot withdraw less than 1$ |
Duplicate withdraw request | You have pending request with the same amount and outgoing address. Please make sure that the first transaction is confirmed before continuing |
Insufficient funds | Insufficient funds. |
Withdrawal limits hit | Withdrawal limits hit |
Daily withdrawal limits hit | Daily withdrawal limits hit |
- Type
- Error
(inner) Celsius(config) → {Promise.<CelsiusInstance>}
Creates and configures Core.
Parameters:
Name | Type | Description |
---|---|---|
config |
object | Config has partner key, auth method and user secret. |
Returns:
- Type
- Promise.<CelsiusInstance>