ccxws
Version:
Websocket client for 37 cryptocurrency exchanges
72 lines (60 loc) • 1.67 kB
text/typescript
import { testClient } from "../TestRunner";
import { BinanceJeClient } from "../../src/exchanges/BinanceJeClient";
import { get } from "../../src/Https";
async function fetchAllMarkets() {
const results = (await get("https://api.binance.je/api/v1/exchangeInfo")) as any;
return results.symbols
.filter(p => p.status === "TRADING")
.map(p => ({ id: p.symbol, base: p.baseAsset, quote: p.quoteAsset }));
}
testClient({
clientFactory: () => new BinanceJeClient(),
clientName: "BinanceJeClient",
exchangeName: "BinanceJe",
fetchMarkets: fetchAllMarkets,
skip: true,
unsubWaitMs: 1500,
testConnectEvents: true,
testDisconnectEvents: true,
testReconnectionEvents: true,
testCloseEvents: true,
hasTickers: true,
hasTrades: true,
hasCandles: true,
hasLevel2Snapshots: true,
hasLevel2Updates: true,
hasLevel3Snapshots: false,
hasLevel3Updates: false,
ticker: {
hasTimestamp: true,
hasLast: true,
hasOpen: true,
hasHigh: true,
hasLow: true,
hasVolume: true,
hasQuoteVolume: true,
hasChange: true,
hasChangePercent: true,
hasBid: true,
hasBidVolume: true,
hasAsk: true,
hasAskVolume: true,
},
trade: {
hasTradeId: true,
},
candle: {},
l2snapshot: {
hasTimestampMs: false,
hasSequenceId: true,
hasCount: false,
},
l2update: {
hasSnapshot: true,
hasTimestampMs: false,
hasSequenceId: true,
hasLastSequenceId: true,
hasEventMs: true,
hasCount: false,
},
});