rewrote fetching market data from public API