Example: futures-get-klines.ts
Static snapshot for Bitmart/Rest/Futures/futures-get-klines.ts.
Example Path
Bitmart/Rest/Futures/futures-get-klines.ts
Source Link
Repository source: https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Bitmart/Rest/Futures/futures-get-klines.ts
Code Snapshot
import { FuturesClientV2 } from 'bitmart-api';
const client = new FuturesClientV2();
async function getFuturesKlines() {
try {
const klines = await client.getFuturesKlines({
symbol: 'BTCUSDT',
start_time: 1709130476,
end_time: 1709131476,
});
console.log('Tickers: ', JSON.stringify(klines, null, 2));
} catch (e) {
console.error('Req error: ', e);
}
}
getFuturesKlines();
This is a static, crawlable snapshot. The interactive app loads after JavaScript starts and can refresh live data.