UNPKG

@exchanges/binance

Version:

Exchange provider for Binance API

61 lines (60 loc) 2.36 kB
import { BinanceSignedClient } from '../../../clients'; import { RefType, spot } from '../../../info'; export interface DailyAccountSnapshotPayload<PayloadType extends spot.DailyAccountSnapshotType> { type: PayloadType; startTime?: Date | number; endTime?: Date | number; limit?: number; } export interface DailyAccountSnapshotSpotResponse { data: { balances: { asset: string; free: number; locked: number; }[]; totalAssetOfBtc: number; }; type: RefType<spot.DailyAccountSnapshotType, 'SPOT'>; updateTime: Date; } export interface DailyAccountSnapshotMarginResponse { data: { marginLevel: number; totalAssetOfBtc: number; totalLiabilityOfBtc: number; totalNetAssetOfBtc: number; userAssets: { asset: string; borrowed: number; free: number; interest: number; locked: number; netAsset: number; }[]; }; type: RefType<spot.DailyAccountSnapshotType, 'MARGIN'>; updateTime: Date; } export interface DailyAccountSnapshotFuturesResponse { data: { assets: { asset: string; marginBalance: number; walletBalance: number; }[]; position: { entryPrice: number; markPrice: number; positionAmt: number; symbol: string; unRealizedProfit: number; }[]; }; type: RefType<spot.DailyAccountSnapshotType, 'FUTURES'>; updateTime: Date; } export declare function dailyAccountSnapshot(client: BinanceSignedClient, payload: DailyAccountSnapshotPayload<'SPOT'>): Promise<DailyAccountSnapshotSpotResponse[]>; export declare function dailyAccountSnapshot(client: BinanceSignedClient, payload: DailyAccountSnapshotPayload<'MARGIN'>): Promise<DailyAccountSnapshotMarginResponse[]>; export declare function dailyAccountSnapshot(client: BinanceSignedClient, payload: DailyAccountSnapshotPayload<'FUTURES'>): Promise<DailyAccountSnapshotFuturesResponse[]>; export declare function dailyAccountSnapshot(client: BinanceSignedClient, payload: DailyAccountSnapshotPayload<spot.DailyAccountSnapshotType>): Promise<DailyAccountSnapshotSpotResponse[] | DailyAccountSnapshotMarginResponse[] | DailyAccountSnapshotFuturesResponse[]>;