tlab-trading-toolkit
Version:
A trading toolkit for building advanced trading bots on the GDAX platform
28 lines (27 loc) • 1.51 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const ProductMap_1 = require("../../src/exchanges/ProductMap");
const helper_1 = require("../../test/helper");
const assert = require('assert');
describe('ccxt product map', function () {
before(() => __awaiter(this, void 0, void 0, function* () {
return helper_1.prepareProductMap();
}));
it('should find generic product based on exchange product', function () {
console.log('starting');
let genericUSDETH = ProductMap_1.ProductMap.ExchangeMap.get('GDAX').getGenericProduct('BTC-USD');
assert.deepEqual('BTC/USD', genericUSDETH);
});
it('should find exchange product based on generic product', function () {
let exchangeUSDETH = ProductMap_1.ProductMap.ExchangeMap.get('GDAX').getExchangeProduct('BTC/USD');
assert.deepEqual('BTC-USD', exchangeUSDETH);
});
});