Skip to main content

Demo library

Project description

Polygon Data

A library for fetching real-time forex data from polygon.io and store it into sqlite db.

The library has PolygonDataFetch class which has the main function of max code in the fetchData function of library.

It also includes ts_to_datetime(), reset_raw_data_tables(), initialize_raw_data_tables(), initialize_aggregated_tables(),

aggregate_raw_data_tables() functions which were the dependency for max christs main funtion.

Installation


pip install polygon_data

Dependency


polygon-api-client==0.2.11

sqlalchemy

datetime

time

Get started

How to fetch data with this lib?

(Note: Make sure you have a directory named sqlite at the root level)

from polygon_data import PolygonDataFetch



# Instantiate a PolygonDataFetch object

polygonDataFetch = PolygonDataFetch()



# A dictionary defining the set of currency pairs we will be pulling data for

currency_pairs = [["AUD","USD",[],portfolio("AUD","USD")],

                  ["GBP","EUR",[],portfolio("GBP","EUR")],

                  ["USD","CAD",[],portfolio("USD","CAD")],

                  ["USD","JPY",[],portfolio("USD","JPY")],

                  ["USD","MXN",[],portfolio("USD","MXN")],

                  ["EUR","USD",[],portfolio("EUR","USD")],

                  ["USD","CNY",[],portfolio("USD","CNY")],

                  ["USD","CZK",[],portfolio("USD","CZK")],

                  ["USD","PLN",[],portfolio("USD","PLN")],

                  ["USD","INR",[],portfolio("USD","INR")]]



# Call the fetchData method and pass currency_pairs dictionary as a parameter

polygonDataFetch.fetchData(currency_pairs = currency_pairs)

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

polygon-data-0.1.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

polygon_data-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file polygon-data-0.1.2.tar.gz.

File metadata

  • Download URL: polygon-data-0.1.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for polygon-data-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1d8082608f3abec355cf7ace7cf623175cc1be736cd45af8509f77c345b135f4
MD5 eef3e91d09b03faccb6e910d509d3002
BLAKE2b-256 117341ca7afbf49b25bbdaf19f6a367c7e412bfcbb1a017d9c3d5bd711cf3c9d

See more details on using hashes here.

File details

Details for the file polygon_data-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: polygon_data-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for polygon_data-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59595a0d612dc57043c20bc919320fb85c5e444d7512594a10dd66ded2ae16f7
MD5 76b0787a56a43a644bb2cd86a218e71d
BLAKE2b-256 eeece26ec30c68343b88cd3f2384e48d8c092242271903a305dbf6baf8a9c242

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