finam-export icon indicating copy to clipboard operation
finam-export copied to clipboard

Price number processing leading to number corruption

Open stealzy opened this issue 5 years ago • 3 comments

For example let's take a look on VTBR M5 data for first hour of 2016.01.04 day:

library site UI
0.07833999999999999 0.0783400
0.07841000000000001 0.0784100

stealzy avatar Apr 11 '20 03:04 stealzy

Hmm good point, this definitely needs to be fixed. @stealzy do you have a pull request for that? I don't know what I'd have time for that

ffeast avatar May 10 '20 13:05 ffeast

Попытаю питон на этой неделе. If API will still open.

stealzy avatar May 11 '20 18:05 stealzy

To reproduce and test

from finam.export import Exporter, Market, Timeframe
from datetime import datetime
ticker = "VTBR"
exporter = Exporter()
data = exporter.download(id_=exporter.lookup(code=ticker).index[0],
                         market=Market.SHARES,
                         timeframe=Timeframe.MINUTES5,
                         start_date=datetime(2016, 1, 4),
                         end_date=datetime(2016, 1, 4))
print(data.iloc[:,0].to_list())
print(data.info())

Ta-nu-ki avatar Aug 22 '20 18:08 Ta-nu-ki