crypto-janitor
Version:
The Crypto Janitor provides a simple interface for fetching and cleaning crypto account data.
72 lines (71 loc) • 2.9 kB
TypeScript
import { BaseConnection, Transaction } from "../target.types";
/**
* A Celsius Implementation of BaseConnection
*/
export default class CelsiusConnection extends BaseConnection {
transactions: Array<any>;
transactionTypes: any;
/**
* Create Celsius instance
* @param {any} credentials - Celsius API credentials
*/
constructor(credentials: any);
/**
* HELPER: Format orders
*
* @param {any} entry - Unformatted coinbase transaction
* @param {string} type - Type of transaction
* @return {Transaction} Formatted transaction
*/
_formatTransaction(entry: any): Transaction;
/**
* Initialize coinbase and get active accounts
* @override BaseExchange.initialize
* @param {boolean} forceReload - (Optional) Additional paramaters
* @return {Promise<void>}
*/
initialize(forceReload?: boolean): Promise<void>;
/**
* Fetch Account Balances
* @override BaseExchange.getBalances
* @param {boolean} forceReload - (Optional) Additional paramaters
* @return {Promise<any>} Account balance object
*/
getBalances(): Promise<any>;
/**
* Fetch Account transactions by type, symbol, and/or since a certain time
* @param {string} type (Optional) Transaction type
* @param {string} symbol (Optional) Currency symbol
* @param {number} since (Optional) Timestamp to get transactions since
* @return {Promise<Array<any>>} Array of deposit objects
*/
filterTransactions(type?: string, symbol?: string, since?: number): Promise<Array<any>>;
/**
* Fetch Account Withdrawals
* @param {string} symbol Currency symbol
* @param {number} since (Optional) Timestamp to get transactions since
* @param {number} limit (Optional) Max number of entries per request
* @return {Promise<Array<any>>} Array of withdrawal objects
*/
getWithdrawals(symbol?: string, since?: number): Promise<Array<any>>;
/**
* Fetch Account Deposits
* @param {string} symbol (Optional) Currency symbol
* @param {number} since (Optional) Timestamp to get transactions since
* @return {Promise<Array<any>>} Array of deposit objects
*/
getDeposits(symbol?: string, since?: number): Promise<Array<any>>;
/**
* Fetch account transactions (withdrawals, deposits, and orders)
* @param {string} symbol Currency symbol
* @param {number} since (Optional) Timestamp to get transactions since
* @return {Array<any>} Array of withdrawal objects
*/
getTransactions(symbol?: string, since?: number): Promise<any>;
/**
* Fetch alll celsius transactions (withdrawals, deposits, and interest)
* @param {number} since (Optional) Timestamp to get transactions since
* @return {Array<any>} Array of transaction objects
*/
getAllTransactions(since?: number): Promise<any>;
}