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