@coinset/bitmart
Version:
Universal BitMart API client
35 lines (34 loc) • 1.23 kB
TypeScript
import { SuccessResponse } from "./_utils.js";
export declare type ContractOptions = {
/** contract trading pair */
contractSymbol: string;
};
export declare type ContractResponse = SuccessResponse<{
tickers: {
/** name of contract trading */
contract_symbol: string;
/** last price of contract */
last_price: number;
/** indexPrice of contract */
index_price: number;
/** last funding rate */
last_funding_rate: number;
/** The ratio of price increase and decrease in the last 24 hours */
price_change_percent_24h: number;
/** 24-hour volume */
volume_24h: number;
/** Link to the trading page on the BitMart website */
url: string;
high_price: number;
low_price: number;
legal_coin_price: number;
}[];
}>;
/** Get the latest market quotations of the contract.
* ```ts
* import { fetchContract } from "https://deno.land/x/bitmart@$VERSION/mod.ts"
* await fetchContract()
* ```
* @see https://developer-pro.bitmart.com/en/contract/quotation/tickers.html
*/
export declare function fetchContract(options?: ContractOptions, init?: RequestInit): Promise<ContractResponse>;