Last updated 2 days ago
This API returns 24-hour market ticker data (open, close, high, low, amount, and volume). It accepts optional parameters for market ID, chain IDs, and chain asset types for filtering; if omitted, ticker data for all markets is returned.
import { hibitClient } from '@delandlabs/hibit-sdk'; const options = { network: HibitNetwork.Testnet }; hibitClient.setOptions(options); const req = { marketId:10017n }; const tickers = await hibitClient.getMarketsTicker(req);
Source code
The market id.
Filter markets by chain IDs (optional).
Filter markets by chain asset types (optional).
GET /v1/markets/ticker HTTP/1.1 Host: testnetopenapi.hibit.app Accept: */*
OK
{ "code": 1, "message": "text", "data": { "items": [ { "id": "text", "o": "text", "h": "text", "l": "text", "c": "text", "v": "text", "a": "text", "t": null } ] } }