Closed Andys52621 closed 6 months ago
Thanks for reporting this. I will look into this later this week.
Hi Jacob, please let us know when this issue is fixed. Currently the last traded prices is not working. Ask and Bid prices are working correctly.
Map<String, CryptoSnapshot> latestSnapShotMap =null; latestSnapShotMap = alpacaAPI.cryptoMarketData().getSnapshots(a).getSnapshots();
Double currentPrice = Double.parseDouble(String.format("%.2f", latestSnapShotMap.get(Property.stockSymbol).getLatestTrade().getPrice()));
Double askPrice = Double.parseDouble(String.format("%.2f", latestSnapShotMap.get(Property.stockSymbol).getLatestQuote().getAskPrice()));
Double bidPrice = Double.parseDouble(String.format("%.2f", latestSnapShotMap.get(Property.stockSymbol).getLatestQuote().getBidPrice()));
Also cryptoSnapShot.getLatestTrade().getSize();
the latest trade size is not coming correctly. its coming as a huge large negative number like riceSize: 1.949E-5
I tried the latest quote and latest traded bars , but getPrice() method is not returning correct last traded price for the crypto (BTC/USD) however getAsk or getBid are correctly working.
Is this a known issue ?