# Free high resolution financial data

As thebonnotgang(1) stopped updating their database, I was wondering if there are some other free sources of high-frequency data available.

I found a proper tick data api (ca. 25 day history) hosted by onvista which is however undocumented. As some one might be interested I will add a short howto:

urlscheme: http://www.onvista.de/aktien/boxes/times+sales/export.csv?assetId=[ISIN]&assetType=[AssetType]&notation=[exchangeID]&tradingDay=[TradingDay]

[TradingDay]: Can be calculated by fixing a date e.g. 26-01-2016 as 1453791600 and subtracting the number of days multiplied by 86400. You can find the current trading day here[2]. Just klick on 'Anzeigen' as soon as the page loaded.

[ISIN]: self-explanatory I guess

[AssetType]: Up to know I was only downloading stocks so I used 'Aktie'

[ExchangeID]: I'm not able to offer a full list of all exchanges however '1937897' refers to Xetra and '9385907' refers to Tradegate. You can find more by playing around with the stock exchange dropdown menu [here][3] and looking at &notation=[***] within the url.

Example Allianz 06.01.2016: http://www.onvista.de/aktien/boxes/times+sales/export.csv?assetId=DE0008404005&assetType=Aktie&notation=1937897&tradingDay=1452063600

(I am afraid this link will be broken in a few days due to the time horizon. So it should serve just as an example)

As onvista is restructuring their homepage http://www.onvista.de/index/DAX-Index-20735?beta=off I assume they will take this service down.

So did someone discover something similar?

A similar question[4] has been asked several years ago and provides more trivial/googled results.

I didn't have 'sufficient reputation to post the links in correct mode.

For what concerns Forex data which is, however financial data after all, I often use http://www.histdata.com/. Their data is delivered in .CSV format. For timeframes, I quote the website:

We can only deliver you time ordered Tick and M1 (1 minute) data. The data that we have available is organized by forex-pair/year/month.

They also provide data for some commodities and indexes.

Stock / ETF at 5-minute intervals can be downloaded from Yahoo Finance. See the code below:

from urllib import urlretrieve
import numpy as np, pandas as pd, sys
import datetime as dt, requests
import datetime, re, StringIO

symbol = sys.argv[1]

url='http://chartapi.finance.yahoo.com/instrument/1.0/%s/chartdata;type=quote;range=3d/csv' % symbol
response = requests.get(url)
response_body = response.content
content = StringIO.StringIO(response_body)

res = []

The complete script can be found in my quant_at project at Github, see data/hft.py. There are download scripts for equities, futures, ETFs as well.