Click here to Login





                                                   Download link does only work in Browser

  0

0
Christian
2021-02-02 07:31:58


Just wanted to get the Nasdaq downloader running again and found out the new link.

https://www.nasdaq.com/api/v1/historical/AAPL/stocks/2010-05-09/2021-02-02/

The CSV file is downloaded immediately in the browser, but the Quantshare downloader constantly reports "No Data are aviable".

I can't explain why the link works in the browser and not via Quantshare. I hope someone can explain this to me.

Thanks for the support

If anyone is interested, here is the URL script for the downloader:
DateTime start = Functions.GetEndDate();
// DateTime end = Functions.GetStartDate();
DateTime today = DateTime.Today;D
string symbol = Functions.GetValues("s");
string dateStart = start.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);
string dateToday = today.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);
Functions.AddURL("https://www.nasdaq.com/api/v1/historical/" + symbol + "/stocks/" + dateStart + "/" + dateToday + "/" , "Downloading...");





US Historical Quotes from NASDAQ website (by Brian Brown, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

QuantShare
2021-03-11 09:37:59

  0

The reason is that the request expects some headers that are passed when requesting it in a browser.
In QuantShare and in the "Update Download Item" form, click on "Settings" button under "Settings" column.

Select "Request Headers" tab then copy the following:

accept: application/json, text/plain, */*
accept-encoding: gzip, deflate, br
accept-language: fr,en-US;q=0.9,en;q=0.8,ar;q=0.7,pl;q=0.6
origin: https://www.nasdaq.com
referer: https://www.nasdaq.com/
sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-site
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36




Stefan
2021-03-12 04:25:23

  0

Somehow I can't get the downloader to run either. Made the changes as suggested and still get no result.
Have read the header via Google Chrome, see here:

:authority: www.nasdaq.com
:method: GET
:path: /api/v1/historical/AAPL/stocks/2010-05-09/2021-03-12
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-encoding: gzip, deflate, br
accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
cookie: ak_bmsc=2BDC5DD2E13FECBFFACA2CD9C59F95FE5C7AD7512C5400004F194B601C8FDA70~pl0b51Y/I7hZ/u7EGTvGHA+IseCkIRcIuvKD1+dVkTm/RIwb9zccWOaOL8E26yYo52o6ZxbZi6ZhwaR5uaNmqRTLR3Gjgrt9PNA035c5W0dFRZfLC526cHZIHdnfEfAipEkLRFDKeCVurfDRgRoihD8q2XRwcNRd08BKYnw7y30A+Z1zFzQRD0YP9D86mJB7fBpvpqBZHicd1+DpJ0xTlPxFBDle7gQIRctiGMldZ6VA8=; AKA_A2=A; bm_sv=A11EA9DD260B66669A5E0F5E43A9F7B6~3vwGmhL1Uts/ISD3pL9PGqcLuXq41LAyZvkY4f5i6ytrBaLjb5+9IY8ZgQHA0L9S5qlIdh6HH5hFlTmVyuOZNAan/n6QTTYpZFsbE7sOlT8JkxFyQaoDBGzT22MwPjhkVFp4sBePdHAlVGqzKWjEro2sVpad2oo/rUKpnY5MsfA=
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36

I myself do not know any programmers, but I have found a website which also deals with the problem, maybe this will help:
https://www.codeproject.com/Questions/5274565/Download-a-CSV-file-with-unknown-location-from-a-U



QuantShare
2021-03-12 09:34:41

  0

It does work here using CSV as Content Type. The response for this API returned in QuantShare:

Date, Close/Last, Volume, Open, High, Low
02/02/2021, $134.99, 83305370, $135.73, $136.31, $134.61
02/01/2021, $134.14, 106239800, $133.75, $135.38, $130.93
01/29/2021, $131.96, 177523800, $135.83, $136.74, $130.21
01/28/2021, $137.09, 142621100, $139.52, $141.99, $136.7
01/27/2021, $142.06, 140843800, $143.43, $144.3, $140.41
...

Note that your request headers are wrong. They are not from the API call.
But it should be working with my request headers. Make sure you are not using any software that intercept http calls like charles or fiddler.



Stefan
2021-03-13 08:23:29

  0

Now I tried to download it, without script and it was working fine.
There was only a flag in the download options wrong :)

Could you please explain me, how you I remove the currency symbold from the data.



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
BSE stock quotes
Stop Loss for the N-first Trading Bars only
Export Indicators Data with Filtering and Column Labels Support
Swing Point Function (SP)
Accumulation Swing Index

How-to Lessons
How to download EOD quotes for active and valid stocks only
How to download a trading item from the Sharing Server
How to download historical quotes of indices
How to download historical EOD data for penny stocks
How to quickly download the most recent EOD data for your stocks

Related Forum Threads
does anyone download ETFs from LSE
How does Simulator work?
Download Multiple Ticker Information to Excel
Can I download EOD data a few hours after market closed?
Download Manager help needed

Blog Posts
How to Download Trading Data for Certain Securities Only
Creating a download item: Initial Jobless Claims
Download Trading Data using the URL-Script
How to search for a download item
Lock, Link and Undock your Charts









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.