tlab-trading-toolkit
Version:
A trading toolkit for building advanced trading bots on the GDAX platform
22 lines (17 loc) • 764 B
text/typescript
import { ProductMap } from '../../src/exchanges/ProductMap';
import { prepareProductMap } from '../../test/helper';
const assert = require('assert');
describe('ccxt product map', function () {
before(async () => {
return prepareProductMap();
})
it('should find generic product based on exchange product', function () {
console.log('starting');
let genericUSDETH = 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.ExchangeMap.get('GDAX').getExchangeProduct('BTC/USD');
assert.deepEqual('BTC-USD', exchangeUSDETH);
})
})