Skip to main content

Demo library

Project description

Forex Data Get and Process

A small demo library for getting forex data and process it

Installation

pip install forex-data

Get started

How to pass currency pairs to process it:

from forex_data import portfolio
from forex_data import get_process
from forex_data import get_process_agg

currency_pairs = [["AUD","USD",[],portfolio("AUD","USD")],
                  ["GBP","EUR",[],portfolio("GBP","EUR")],
                  ["USD","CAD",[],portfolio("USD","CAD")]]

get_process(currency_pairs, "sqlite_hw1/test.db", 86400, 360)   # 86400=24h, 360=6min

# get_process(currency_pairs, db_path, total_run_time, aggregate_time)
# time should be seconds

currency_pairs = [["AUD", "USD"],["GBP","EUR"], ["USD","CAD"]]
for cur in currency_pairs:
    get_process_agg(cur, "sqlite_hw3/aggfive.db", 7200, 36000, 360)
    # don't collect for the first 20 periods(20*6min=20*360s=7200s), run 10h(36000s), aggregate each 6 min

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

forex-data-0.3.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

forex_data-0.3.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file forex-data-0.3.0.tar.gz.

File metadata

  • Download URL: forex-data-0.3.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for forex-data-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6504e5773545ede7d956a182fc3dcc9816b84f267227066c3bc4c45c16a4da23
MD5 601de99e0988406301ee3d0b9b3f33ae
BLAKE2b-256 407dbf8cf65abf5a95aea96e862e5f66e9cd5429d65e85360362ea9b761ef0d1

See more details on using hashes here.

File details

Details for the file forex_data-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: forex_data-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for forex_data-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c53bdb99e60bf941c0eaf97f055cf48fb854fc20b9733e638898bf7f3c4e06b5
MD5 f68d556487ff2646ffb59df1b3c2d8fc
BLAKE2b-256 b53edb9a13acfafe003014e464bad88bb3fc61ae9451d7e6af85d95bfa058653

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