UNPKG

@thespidercode/openbook-swap

Version:
21 lines (20 loc) 646 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.geTokenPrices = void 0; const api_constant_1 = require("./constants/api.constant"); const geTokenPrices = async (tokens) => { try { return { data: await (await fetch(`${api_constant_1.API_BASE_URL}markets/get-token-prices`, { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ tokens: tokens }) })).json() }; } catch (error) { console.log(error); return null; } }; exports.geTokenPrices = geTokenPrices;