Comments (7)
same here for AAPL on Market.USA 😢
from finam-export.
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.
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.
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.
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.
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.
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)
- Загрузка котировок акций. HOT 2
- Second day is always missed in logs - why? HOT 10
- Add "-startdate-enddate" to the filename HOT 3
- Any wishes for the library? HOT 5
- Финам включил токены HOT 2
- Can't add new cryptocurrencies market HOT 3
- 1h forex data HOT 2
- Is the stock data from Finam dividend adjusted? HOT 1
- Get error when load EURUSD 15min period for period more than 1 year
- Wrong dictionary cache link
- name 'Timeframe' is not defined
- module 'collections' has no attribute 'Container' HOT 1
- raise FinamDownloadError HOT 2
- HTTP Error 403: Forbidden HOT 16
- Automatic requests splitting HOT 3
- Getting error on export HOT 2
- Looking up Specific Company Minute Data HOT 1
- Cannot download data from SPB exchange using scripts HOT 2
- Price number processing leading to number corruption HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finam-export.