UNPKG

@coinset/bitmart

Version:

Universal BitMart API client

33 lines 1.53 kB
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports", "./_utils.js", "./constants.js", "./ticker.js"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reviver = exports.fetchTickers = void 0; const _utils_js_1 = require("./_utils.js"); const constants_js_1 = require("./constants.js"); const ticker_js_1 = require("./ticker.js"); Object.defineProperty(exports, "reviver", { enumerable: true, get: function () { return ticker_js_1.reviver; } }); /** Ticker is an overview of the market status of a trading pair, including the latest trade price, top bid and ask prices and 24-hour trading volume. * ```ts * import { fetchTickers } from "https://deno.land/x/bitmart@$VERSION/mod.ts" * await fetchTickers() * ``` * @note The fetched data is cached for 5 minutes. * @see https://developer-pro.bitmart.com/en/spot/quotation/ticker.html */ function fetchTickers(init) { const url = new URL("spot/v1/ticker", constants_js_1.BASE_URL); return (0, _utils_js_1.jsonFetch)(url, init, { parseJson: ticker_js_1.reviver, }); } exports.fetchTickers = fetchTickers; }); //# sourceMappingURL=tickers.js.map