UNPKG

ccxws

Version:

Websocket client for 37 cryptocurrency exchanges

93 lines 2.88 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const TestRunner_1 = require("../TestRunner"); const DigifinexClient_1 = require("../../src/exchanges/DigifinexClient"); const https = __importStar(require("../../src/Https")); (0, TestRunner_1.testClient)({ clientFactory: () => new DigifinexClient_1.DigifinexClient(), clientName: "DigifinexClient", exchangeName: "Digifinex", markets: [ { id: "btc_usdt", base: "BTC", quote: "USDT", }, { id: "eth_usdt", base: "ETH", quote: "USDT", }, ], async fetchAllMarkets() { const res = await https.get("https://openapi.digifinex.com/v3/markets"); return res.data.map(p => ({ id: p.market, base: p.market.split("_")[0], quote: p.market.split("_")[1], })); }, testConnectEvents: true, testDisconnectEvents: true, testReconnectionEvents: true, testCloseEvents: true, testAllMarketsTrades: true, testAllMarketsTradesSuccess: 20, hasTickers: true, hasTrades: true, hasCandles: false, hasLevel2Snapshots: false, 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, hasAsk: true, hasBid: true, hasAskVolume: true, hasBidVolume: true, }, trade: { hasTradeId: true, tradeIdPattern: /[0-9]+/, }, l2update: { hasSnapshot: true, hasTimestampMs: false, hasSequenceId: false, hasCount: false, }, l2snapshot: { hasTimestampMs: false, hasSequenceId: false, hasCount: false, }, }); //# sourceMappingURL=DigifinexClient.spec.js.map