tardis-dev
Version:
Convenient access to tick-level historical and real-time cryptocurrency market data via Node.js
113 lines • 3.39 kB
TypeScript
import { BookChange, OptionSummary, Trade } from '../types';
import { Mapper } from './mapper';
export declare class BinanceEuropeanOptionsTradesMapper implements Mapper<'binance-european-options', Trade> {
canHandle(message: BinanceResponse<any>): boolean;
getFilters(symbols?: string[]): {
readonly channel: "trade";
readonly symbols: string[] | undefined;
}[];
map(binanceTradeResponse: BinanceResponse<BinanceOptionsTradeData>, localTimestamp: Date): Generator<Trade, void, unknown>;
}
export declare class BinanceEuropeanOptionsBookChangeMapper implements Mapper<'binance-european-options', BookChange> {
canHandle(message: BinanceResponse<any>): boolean;
getFilters(symbols?: string[]): {
readonly channel: "depth100";
readonly symbols: string[] | undefined;
}[];
map(message: BinanceResponse<BinanceOptionsDepthData>, localTimestamp: Date): Generator<BookChange, void, unknown>;
protected mapBookLevel(level: BinanceBookLevel): {
price: number;
amount: number;
};
}
export declare class BinanceEuropeanOptionSummaryMapper implements Mapper<'binance-european-options', OptionSummary> {
private readonly _indexPrices;
private readonly _openInterests;
canHandle(message: BinanceResponse<any>): boolean;
getFilters(symbols?: string[]): ({
readonly channel: "ticker";
readonly symbols: string[] | undefined;
} | {
readonly channel: "index";
readonly symbols: string[] | undefined;
} | {
readonly channel: "openInterest";
readonly symbols: string[] | undefined;
})[];
map(message: BinanceResponse<BinanceOptionsTickerData | BinanceOptionsIndexData | BinanceOptionsOpenInterestData[]>, localTimestamp: Date): Generator<OptionSummary, void, unknown>;
}
type BinanceResponse<T> = {
stream: string;
data: T;
};
type BinanceOptionsTradeData = {
e: 'trade';
E: 1696118408137;
s: 'DOGE-231006-0.06-C';
t: '15';
p: '2.64';
q: '0.01';
b: '4647850284614262784';
a: '4719907951072796672';
T: 1696118408134;
S: '-1';
};
type BinanceOptionsDepthData = {
e: 'depth';
E: 1696118400038;
T: 1696118399082;
s: 'BTC-231027-34000-C';
u: 1925729;
pu: 1925729;
b: [['60', '7.31'], ['55', '2.5'], ['50', '15'], ['45', '15'], ['40', '34.04']];
a: [['65', '8.28'], ['70', '38.88'], ['75', '15'], ['1200', '0.01'], ['4660', '0.42']];
};
type BinanceOptionsTickerData = {
e: '24hrTicker';
E: 1696118400043;
T: 1696118400000;
s: 'BNB-231013-200-P';
o: '1';
h: '1';
l: '0.9';
c: '0.9';
V: '11.08';
A: '9.97';
P: '-0.1';
p: '-0.1';
Q: '11';
F: '0';
L: '8';
n: 1;
bo: '1';
ao: '1.7';
bq: '50';
aq: '50';
b: '0.35929501';
a: '0.43317497';
d: '-0.16872899';
t: '-0.16779034';
g: '0.0153237';
v: '0.09935076';
vo: '0.41658748';
mp: '1.5';
hl: '37.1';
ll: '0.1';
eep: '0';
};
type BinanceOptionsIndexData = {
e: 'index';
E: 1696118400040;
s: 'BNBUSDT';
p: '214.6133998';
};
type BinanceOptionsOpenInterestData = {
e: 'openInterest';
E: 1696118400042;
s: 'XRP-231006-0.46-P';
o: '39480.0';
h: '20326.64319';
};
type BinanceBookLevel = [string, string];
export {};
//# sourceMappingURL=binanceeuropeanoptions.d.ts.map