Skip to main content

No project description provided

Project description

OHLC-DATA

Easily download OHLC data from either alpaca (requires API keys) or yfinance to csv files
To acquire API keys for alpaca visit: https://alpaca.markets/

Instructions

  • Open your preferred CLI (Terminal/Command Prompt etc)
  • Create and activate a Python virtual environment

Mac/Linux

python3 -m venv <venv>
source ./<venv>/bin/activate

Windows

python -m venv <venv>
./<venv>/Scripts/activate

Installation

Mac/Linux

pip3 install ohlc-data

Windows

pip install ohlc-data

Download OHLC data

ohlc_download

Running this script will create a folder in the current directory called 'ohlc_csv' if there isn't one already by that name. It will then take you through a series of prompts:

Download data for one or multiple symbols

You can choose to get data for one symbol or multiple symbols at once. Symbols are not case sensitve.

Choose source

You can then choose which API to use. Alpaca requires API keys that you'll be prompted to enter, yfinance does not require API keys.

Valid Periods and Intervals (Timeframes)

Valid periods: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max
Valid intervals: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo

yfinance:

  • 1m data cannot extend past 7 days
  • 2m - 30m data, and 90m data cannot extend past 60 days
  • 1h data cannot extend past 730 days
  • 1d - 3mo data allows max available data

alpaca:

  • Data from 2016 to present is available for all intervals

Start and End Dates (Optional)

To get data from a specifc date range, leave Period blank and instead use the Start date and End date fields.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ohlc_data-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ohlc_data-0.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file ohlc_data-0.2.0.tar.gz.

File metadata

  • Download URL: ohlc_data-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Darwin/22.6.0

File hashes

Hashes for ohlc_data-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d657a4c110a4445372f8b07def56c8d1aac61398c99f7f6d9cc9d4caf20f72a5
MD5 3e4f194a68f45ac03c3a618daac51a97
BLAKE2b-256 54206bb25f3a02714a488aff96bed3f5f1d2a95cee76b4c76c2bcf5b085b3259

See more details on using hashes here.

File details

Details for the file ohlc_data-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ohlc_data-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Darwin/22.6.0

File hashes

Hashes for ohlc_data-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2ddeb687bd0457065635a4cd639176fcdb04b53189627e0fea995efd4df7f63
MD5 bcfaef2f8c06966bbf6f2910f145acb2
BLAKE2b-256 3c1e1cd793f7955bfbb7fed89da6f35314770c238dd1d61d6f69836af47afbd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page