UNPKG

@coinset/bitmart

Version:

Universal BitMart API client

31 lines 904 B
import { jsonFetch } from "./_utils.js"; import { BASE_URL } from "./constants.js"; import { isString } from "../deps.js"; const reviver = (key, value) => { if ([ "quote_increment", "base_min_size", "base_max_size", "min_buy_amount", "min_sell_amount", ] .includes(key) && isString(value)) { return Number(value); } return value; }; /** Get a detailed list of all trading pairs on the platform. * ```ts * import { fetchSymbolDetails } from "https://deno.land/x/bitmart@$VERSION/mod.ts" * await fetchSymbolDetails() * ``` * @see https://developer-pro.bitmart.com/en/spot/basic/symbols_detail.html */ export function fetchSymbolDetails(init) { const url = new URL("spot/v1/symbols/details", BASE_URL); return jsonFetch(url, init, { parseJson: reviver, }); } //# sourceMappingURL=symbol_details.js.map