get 24hr ticker
API details
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.
Query parameters
MarketIdstringOptional
ChainIdsstring[]Optional
ChainAssetTypesstring[]Optional
Responses
200
OK
400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
500
Internal Server Error
501
Not Implemented
get
GET /v1/markets/ticker HTTP/1.1
Host: testnetopenapi.hibit.app
Accept: */*
{
"code": 1,
"message": "text",
"data": {
"items": [
{
"id": "text",
"o": "text",
"h": "text",
"l": "text",
"c": "text",
"v": "text",
"a": "text",
"t": null
}
]
}
}
Code example
import { hibitClient } from '@delandlabs/hibit-sdk';
const options = {
network: HibitNetwork.Testnet
};
hibitClient.setOptions(options);
const req = { marketId:10017n };
const tickers = await hibitClient.getMarketsTicker(req);
SDK
Source code https://github.com/Deland-Labs/hibit-sdk
Last updated