@fraserdarwent/xapi-node
Version:
This project is made possible to get data from Forex market, execute market or limit order with NodeJS/JS through WebSocket connection
37 lines (36 loc) • 3.27 kB
TypeScript
import { STREAMING_BALANCE_RECORD, STREAMING_CANDLE_RECORD, STREAMING_KEEP_ALIVE_RECORD, STREAMING_NEWS_RECORD, STREAMING_PROFIT_RECORD, STREAMING_TICK_RECORD, STREAMING_TRADE_RECORD, STREAMING_TRADE_STATUS_RECORD, Time } from '../..';
import { StreamConnection } from './StreamConnection';
import { XAPI } from '../XAPI';
export declare class Stream extends StreamConnection {
constructor(XAPI: XAPI);
listen: {
getBalance: (callBack: (data: STREAMING_BALANCE_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getCandles: (callBack: (data: STREAMING_CANDLE_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getKeepAlive: (callBack: (data: STREAMING_KEEP_ALIVE_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getNews: (callBack: (data: STREAMING_NEWS_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getProfits: (callBack: (data: STREAMING_PROFIT_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getTickPrices: (callBack: (data: STREAMING_TICK_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getTrades: (callBack: (data: STREAMING_TRADE_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
getTradeStatus: (callBack: (data: STREAMING_TRADE_STATUS_RECORD, time: Time) => void, key?: string | null) => import("../..").ListenerChild;
};
subscribe: {
getBalance: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getCandles: (symbol: string) => Promise<import("../../interface/Interface").TransactionResolveStream>;
getKeepAlive: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getNews: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getProfits: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getTickPrices: (symbol: string, minArrivalTime?: number, maxLevel?: number) => Promise<import("../../interface/Interface").TransactionResolveStream>;
getTrades: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getTradeStatus: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
};
unSubscribe: {
getBalance: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getCandles: (symbol: string) => Promise<import("../../interface/Interface").TransactionResolveStream>;
getKeepAlive: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getNews: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getProfits: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getTickPrices: (symbol: string) => Promise<import("../../interface/Interface").TransactionResolveStream>;
getTrades: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
getTradeStatus: () => Promise<import("../../interface/Interface").TransactionResolveStream>;
};
}