crypto-client
Version:
An unified client for all cryptocurrency exchanges.
37 lines (36 loc) • 1.46 kB
TypeScript
import { Market } from 'crypto-markets';
import { ActionExtended, DepositAddress, WithdrawalFee } from '../pojo';
export declare function createOrder(market: Market, price: number, quantity: number, sell: boolean): ActionExtended;
export declare function placeOrder(market: Market, price: number, quantity: number, sell: boolean): Promise<string | Error>;
export declare function cancelOrder(transactionId: string): Promise<boolean | string>;
export interface NewdexOrderOnChain {
order_id: number;
pair_id: number;
type: number;
owner: string;
placed_time: string;
remain_quantity: string;
remain_convert: string;
price: string;
contract: string;
count: number;
}
export declare function queryOrder(transactionId: string): Promise<{
[key: string]: any;
} | undefined>;
export declare function queryAllBalances(): Promise<{
[key: string]: number;
} | Error>;
export declare function queryBalance(symbol: string): Promise<number>;
export declare function getDepositAddresses(symbols: string[]): {
[key: string]: {
[key: string]: DepositAddress;
};
};
export declare function getWithdrawalFees(symbols: string[]): {
[key: string]: {
[key: string]: WithdrawalFee;
};
};
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>;