@coinset/bitmart
Version:
Universal BitMart API client
19 lines • 736 B
JavaScript
import { jsonFetch } from "./_utils.js";
import { BASE_URL } from "./constants.js";
import { reviver } from "./ticker.js";
/** 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
*/
export function fetchTickers(init) {
const url = new URL("spot/v1/ticker", BASE_URL);
return jsonFetch(url, init, {
parseJson: reviver,
});
}
export { reviver };
//# sourceMappingURL=tickers.js.map