I’m quite new to trading, and I would like to use the Java API to get the latest market price of a symbol. (like every second or so)
But I’m not sure to which stream I could best subscribe for getting this info.
Aggregate Trade stream
Kline/Candlestick (seems not a good option as fastest subscription is every 1 minute)
Inividual Symbol Mini Ticker streams => sounds like a good fit, but the note “These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs” makes me doubt if this could be used for getting the current price quite accurately.
All info welcome, as I can’t seem to find out the differences or use-cases of the various streams.
@dino Sorry to reopen this, but i have the same question and just wanted to confirm: is the price we get from the aggregate trade stream the current symbol price? Does it match the price we would get by calling the /api/v3/ticker/price rest endpoint?
awesome, thanks for your POC. I was getting a bit confused by the multiple agg trades with the same value, but it seems that they do match. It’s easier to see in your screenshot.