Coder Social home page Coder Social logo

philipperemy / fx-1-minute-data Goto Github PK

View Code? Open in Web Editor NEW
453.0 32.0 142.0 57 KB

HISTDATA - Dataset composed of all FX trading pairs / Crude Oil / Stock Indexes. Simple API to retrieve 1 Minute data (and tick data) Historical FX Prices (up to date).

License: Apache License 2.0

Python 97.47% Shell 2.53%
fx trading financial-data financial-markets deep-learning machine-learning dataset

fx-1-minute-data's Introduction

FX 1-Minute Dataset (+ Crude Oil and Stock indexes e.g. SP500)

API and dataset download for histdata.com. Tick data is also available with the API.

Download the dataset

pip install -r requirements.txt
python download_all_fx_data.py

Expect it to take around 10 minutes if you have a fast internet connection.

API

Downloads Downloads

pip install histdata

Examples

from histdata import download_hist_data as dl
from histdata.api import Platform as P, TimeFrame as TF
  • Download tick data for 2019/06:
dl(year='2019', month='6', pair='eurusd', platform=P.GENERIC_ASCII, time_frame=TF.TICK_DATA)
  • Other possible calls:
dl(year='2019', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.TICK_DATA_LAST)
dl(year='2019', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.TICK_DATA_ASK)
dl(year='2019', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.TICK_DATA_BID)
dl(year='2019', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.ONE_MINUTE)
dl(year='2019', month='6', pair='eurusd', platform=P.GENERIC_ASCII, time_frame=TF.TICK_DATA)
dl(year='2019', month='6', pair='eurusd', platform=P.EXCEL, time_frame=TF.ONE_MINUTE)
dl(year='2019', month='6', pair='eurusd', platform=P.META_TRADER, time_frame=TF.ONE_MINUTE)
dl(year='2019', month='6', pair='eurusd', platform=P.META_STOCK, time_frame=TF.ONE_MINUTE)
dl(year='2018', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.TICK_DATA_LAST)
dl(year='2018', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.TICK_DATA_ASK)
dl(year='2018', month='6', pair='eurusd', platform=P.NINJA_TRADER, time_frame=TF.TICK_DATA_BID)

Data specification

This repository contains:

  • A dataset of all the FX prices (1-minute data) from 2000, in Generic ASCII.
    • More than 66 FX pairs
  • Contains some commodities:
    • WTI/USD = WEST TEXAS INTERMEDIATE in USD
    • BCO/USD = BRENT CRUDE OIL in USD
  • Contains some indexes:
    • SPX/USD = S&P 500 in USD
    • JPX/JPY = NIKKEI 225 in JPY
    • NSX/USD = NASDAQ 100 in USD
    • FRX/EUR = FRENCH CAC 40 in EUR
    • UDX/USD = US DOLLAR INDEX in USD
    • UKX/GBP = FTSE 100 in GBP
    • GRX/EUR = DAX 30 in EUR
    • AUX/AUD = ASX 200 in AUD
    • HKX/HKD = HAN SENG in HKD E - TX/EUR = EUROSTOXX 50 in EUR
  • A set of functions to download the historical prices yourself.

All the data is retrieved from: http://www.histdata.com/

Any file in a dataset is zipped and contains:

  • a CSV (semicolon separated file).
  • a status report (containing some meta data such as gaps).

Any CSV file looks like this:

20120201 000000;1.306600;1.306600;1.306560;1.306560;0
20120201 000100;1.306570;1.306570;1.306470;1.306560;0
20120201 000200;1.306520;1.306560;1.306520;1.306560;0
20120201 000300;1.306610;1.306610;1.306450;1.306450;0
20120201 000400;1.306470;1.306540;1.306470;1.306520;0
[...]

Headers are not included in the CSV files. They are:

DateTime Stamp;Bar OPEN Bid Quote;Bar HIGH Bid Quote;Bar LOW Bid Quote;Bar CLOSE Bid Quote;Volume

DateTime Stamp

Format: YYYYMMDD HHMMSS

Legend:

  • YYYY – Year
  • MM – Month (01 to 12)
  • DD – Day of the Month
  • HH – Hour of the day (in 24h format)
  • MM – Minute
  • SS – Second, in this case it will be always 00

TimeZone: Eastern Standard Time (EST) time-zone WITHOUT Day Light Savings adjustments

OPEN Bid Quote

The open (first) bid quote of the 1M bin.

HIGH Bid Quote

The highest bid quote of the 1M bin.

LOW Bid Quote

The lowest bid quote of the 1M bin.

CLOSE Bid Quote

The close (last) bid quote of the 1M bin.

Volume

Number of lots. Looks like it's always 0.

fx-1-minute-data's People

Contributors

crazy25000 avatar hiroq avatar philipperemy avatar sachin-smart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fx-1-minute-data's Issues

Expired Certificate

Max retries exceeded with URL.

I think the Hisdata website's certificate expired.

Use 7zip for compression: ~50% smaller than current one with zip files

Out of curiosity, tested compressing files since this repo hitting storage limit. Used the GBPUSD folder as a test: https://github.com/philipperemy/FX-1-Minute-Data/tree/master/2000-Jun2019/gbpusd

  1. Extracted contents of each zip file
  2. Compressed all the CSV and TXT files using 7zip CLI: 7z a -r -mx=9 gbpusd *.csv *.txt
  3. New zip file: 27mb
  4. Original folder size: 52mb

There are other compression algorithms/tools that have higher compression ratios, but found them to be unstable or too slow.

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.