Hello,
Not directly. The market stats are available to the user via the [wallets_exchange_market] UI and are embedded into the table.
However, the “high” and “low” values are only relevant with respect to a particular time interval. If you need access to the price data for the current market, you can find it in the JavaScript object wp.wallets.viewModels.walletsExchange.marketHistory()
.
To get the prices sorted in an array, first do:
let prices = wp.wallets.viewModels.walletsExchange.marketHistory().map( function( p) { return parseFloat(p.rate); } ).sort();
Then, the lowest price within the loaded timerange is the first element in the array:
let low = prices[0];
And the highest price in the loaded timerange, is, conversely, the last element in the array:
let high = prices[ prices.length – 1 ];
Hope this helps. Please let me know if you have any more questions.
with regards,
Alex