Giter Site home page Giter Site logo

Comments (7)

luismarcanth avatar luismarcanth commented on May 19, 2024

same here for AAPL on Market.USA 😢

from finam-export.

windj007 avatar windj007 commented on May 19, 2024

The error says: Automatic downloading is forbidden. I do not know how to overcome it yet.
@ffeast do you know if this API is not working anymore?

Tried to download the same URL from browser, no success... It seems that they may require authentication now.

from finam-export.

windj007 avatar windj007 commented on May 19, 2024

This API endpoint requires token argument, which is obtained by JavaScript/Ajax. It seems that there is no simple way to get data without browser emulation.

from finam-export.

ffeast avatar ffeast commented on May 19, 2024

Does it still reproduce for you?

% finam-download.py --skiperr=0 --startdate=2001-01-01 --market=USA --contracts=AAPL --destdir=./tmp
INFO:root:Handling AAPL
INFO:finam.export:Fetching https://www.finam.ru/profile/moex-akcii/gazprom/export/
INFO:finam.export:Fetching https://www.finam.ru/cache/N72Hgd54/icharts/icharts.js
DEBUG:finam.export:Parsing line starting with "var aEmitentIds = [4"
DEBUG:finam.export:Parsing line starting with "var aEmitentNames = "
DEBUG:finam.export:Parsing line starting with "var aEmitentCodes = "
DEBUG:finam.export:Parsing line starting with "var aEmitentMarkets "
INFO:__main__:Downloading contract id             20569
name      Apple Inc.
code            AAPL
market            25
Name: 0, dtype: object
INFO:finam.export:Fetching http://export.finam.ru/table.csv?sep=3&at=1&e=.csv&d=d&f=table&dtf=1&MSOR=0&tmf=3&mstimever=1&mstime=on&sep2=1&em=20569&code=AAPL&cn=AAPL&df=1&yf=2001&dt=8&datf=5&yt=2020&market=25&mf=0&mt=4&p=8
INFO:__main__:Sleeping for 1 second(s)
(test1) oleg@MacBook-Air-Oleg trading % head ./tmp/AAPL-DAILY.csv 
index,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOL>
2001-01-02,7.4375,7.625,7.28125,7.4375,0
2001-01-03,7.25,8.34375,7.21875,8.1875,0
2001-01-04,9.070319999999999,9.25,8.40625,8.53125,0
2001-01-05,8.46875,8.6875,8.03125,8.1875,0
2001-01-08,8.46875,8.492189999999999,7.96875,8.28125,0
2001-01-09,8.40625,8.820319999999999,8.28125,8.59375,0
2001-01-10,8.34375,8.5,8.03125,8.28125,0
2001-01-11,8.125,9.25,8.125,9.0,0
2001-01-12,8.9375,9.0,8.53125,8.59375,0

(test1) oleg@MacBook-Air-Oleg trading % finam-download.py --skiperr=0 --startdate=2001-01-01 --market=COMMODITIES --contracts=BR --destdir=./tmp
INFO:root:Handling BR
INFO:finam.export:Fetching https://www.finam.ru/profile/moex-akcii/gazprom/export/
INFO:finam.export:Fetching https://www.finam.ru/cache/N72Hgd54/icharts/icharts.js
DEBUG:finam.export:Parsing line starting with "var aEmitentIds = [4"
DEBUG:finam.export:Parsing line starting with "var aEmitentNames = "
DEBUG:finam.export:Parsing line starting with "var aEmitentCodes = "
DEBUG:finam.export:Parsing line starting with "var aEmitentMarkets "
INFO:__main__:Downloading contract id        22460
name         BR
code         BR
market       14
Name: 0, dtype: object
INFO:finam.export:Fetching http://export.finam.ru/table.csv?sep=3&at=1&e=.csv&d=d&f=table&dtf=1&MSOR=0&tmf=3&mstimever=1&mstime=on&sep2=1&em=22460&code=BR&cn=BR&df=1&yf=2001&dt=8&datf=5&yt=2020&market=14&mf=0&mt=4&p=8
INFO:__main__:Sleeping for 1 second(s)
(test1) oleg@MacBook-Air-Oleg trading % head ./tmp/BR-DAILY.csv 
index,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOL>
2009-07-16,63.73,64.32,63.7,64.3,1017
2009-07-17,63.97,66.42,63.96,66.2,1623
2009-07-20,66.66,67.39,66.38,67.39,644
2009-07-21,66.63,68.5,66.63,67.12,242
2009-07-22,67.33,68.01,66.63,67.9,123
2009-07-23,68.05,70.2,67.72,70.2,81
2009-07-24,70.0,70.98,69.77,70.82,230
2009-07-27,71.66,71.83,70.89,70.89,61
2009-07-28,71.46,71.61,69.68,70.35,61

from finam-export.

ffeast avatar ffeast commented on May 19, 2024

Looks like it was a temporary problem / change, I can't reproduce it now (although I managed to reproduce it ~2 weeks ago). Feel free to reopen it if you see this problem again

from finam-export.

IS-live avatar IS-live commented on May 19, 2024

Finam removed token authorization, so the script works again.
Thus, when they'll turn token authorization back up, the script will stop working.
Probably current no-token scenario is temporary, not the token usage one.

from finam-export.

AndreyRzhaksinskiy avatar AndreyRzhaksinskiy commented on May 19, 2024

How we have the same problem:
FinamParsingError: Returned data doesnt seem like a valid csv dataset: Error
Do we have workaround to solve this problem?

from finam-export.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.