@hackape/tardis-dev
Version:
Convenient access to tick-level historical and real-time cryptocurrency market data via Node.js
22 lines • 948 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getExchangeDetails = void 0;
const got_1 = __importDefault(require("got"));
const options_1 = require("../options");
const marketinfo_1 = require("./marketinfo");
async function getExchangeDetails(exchange) {
const options = options_1.getOptions();
const exchangeDetails = (await got_1.default.get(`${options.endpoint}/exchanges/${exchange}`).json());
const marketInfoDatabase = await marketinfo_1.getMarketInfo(exchange);
if (marketInfoDatabase) {
exchangeDetails.availableSymbols.forEach((symbol) => {
marketInfoDatabase.mixin(exchange, symbol);
});
}
return exchangeDetails;
}
exports.getExchangeDetails = getExchangeDetails;
//# sourceMappingURL=exchangedetails.js.map
;