Last updated 2 days ago
This API returns market swap pool information. If a market ID is provided, it returns details for that specific market; otherwise, it returns data for all markets.
import { hibitClient } from '@delandlabs/hibit-sdk'; const options = { network: HibitNetwork.Testnet }; hibitClient.setOptions(options); const marketId = 10008n; const swapInfos = await hibitClient.getMarketsSwapInfo(marketId);
Source code
The market id. This is an optional field that specifies the market for which liquidity information is requested.
GET /v1/markets/swap HTTP/1.1 Host: testnetopenapi.hibit.app Accept: */*
OK
{ "code": 1, "message": "text", "data": { "items": [ { "marketId": "text", "poolAmount": "text", "poolVolume": "text", "poolLiquidity": "text" } ] } }