Market History
Makes a request to the MarketHistoryService API. The market history service retrieves information about a market. For more details, see the Onyx API documentation.
options
(object) A JavaScript object of API request parameters.RETURN
(object) Returns the HTTP response body or error.
(async function() {
const oUsdcMarketData = await Onyx.api.marketHistory({
"asset": Onyx.util.getAddress(Onyx.oUSDC),
"min_block_timestamp": 1559339900,
"max_block_timestamp": 1598320674,
"num_buckets": 10,
});
console.log('oUsdcMarketData', oUsdcMarketData); // JavaScript Object
})().catch(console.error);
Last updated