crypto-client
Version:
An unified client for all cryptocurrency exchanges.
33 lines (32 loc) • 1.35 kB
TypeScript
import { Market } from 'crypto-markets';
import { Currency, DepositAddress, WithdrawalFee } from '../pojo';
export declare function placeOrder(market: Market, price: number, quantity: number, sell: boolean, clientOrderId?: string): Promise<string | Error>;
export declare function cancelOrder(orderId: string): Promise<boolean>;
export declare function queryOrder(orderId: string): Promise<{
[key: string]: any;
} | undefined>;
export declare function queryAccounts(): Promise<{
id: number;
type: 'spot' | 'margin' | 'otc' | 'point' | 'super-margin';
subtype: string;
state: 'working' | 'lock';
}[]>;
export declare function queryAllBalances(all?: boolean): Promise<{
[key: string]: number;
} | Error>;
export declare function fetchCurrencyList(): Promise<string[] | Error>;
export declare function getDepositAddresses(): Promise<{
[key: string]: {
[key: string]: DepositAddress;
};
}>;
export declare function getWithdrawalFees(): Promise<{
[key: string]: {
[key: string]: WithdrawalFee;
};
}>;
export declare function fetchCurrencies(): Promise<{
[key: string]: Currency;
}>;
export declare function withdraw(symbol: string, address: string, // only supports existing addresses in your withdrawal address list
amount: number, platform: string, memo?: string): Promise<string | Error>;