tarkah / tickrs

Realtime ticker data in your terminal 📈
MIT License
1.17k stars 58 forks source link

Futures #31

Closed nhsb1 closed 3 years ago

nhsb1 commented 3 years ago

Are futures symbols supported? This may be a case of me just not entering the symbols correctly, but I can't seem to figure it out. I know Yahoo! does expose the futures here (https://finance.yahoo.com/commodities/). Taking the S&P ES as an example, (https://finance.yahoo.com/quote/ES%3DF?p=ES%3DF), I've tried variations on the symbol... (ES, ES=F, ES=F?,ES=F?,ES=F?p) to no avail.

(Also - Very cool tool that you've developed! I was looking to do something vaguely similar in Python until I came across this).

Thanks!

tarkah commented 3 years ago

Yeah, so it appears the API does support it! The reason nothing is showing up is because one of the pieces of API data I'm expecting is missing (luckily nothing critical, just "Company Info" which doesn't relate here). I can easily fix this issue to get things to show up.

In addition, to better support futures, I need to adjust the 1D chart since it's currently assuming 9am-4pm ET for market hours. Luckily the API tells me the trading hours for any instrument so I can leverage that.

tarkah commented 3 years ago

I'll be merging #32 soon to close this out. Here is how it looks:

image

tarkah commented 3 years ago

new release has been published to https://github.com/tarkah/tickrs/releases/tag/v0.7.0. Binaries should be available shortly. I've also released to crates.io