Skip to main content

To extract realtime or history price data of stocks or crypto currencies.

Project description

PRICEIT

Author: David WANG

Version 0.0.3

  • To extract realtime or history price data of stocks or crypto currencies. (Please note this package is based on free API (e.g. Yahoo Finance). There may be a little time lag (seconds or minutes) for some market.)

  • To extract the latest full list of stock tickers in NASDAQ, NYSE and AMEX.

Installation:

pip install priceit

Usage:

(1) To get realtime TSLA price

from priceit import *

ticker ='TSLA'
print(getprice(ticker))

Result:

['TSLA', 1049.61, 'Delayed Quote', '2022-01-14 16:00:04']

(Sample above is taken during weekend, when the market is close. So it shows 'Delayed Quote'. Try this when market is open, and you can get realtime quote (almost realtime). Please allow seconds or minutes time lag for certain market.)

(2) To get history daily price of BTC-USD from 2022-01-12 to 2022-01-14

from priceit import *

ticker = 'BTC-USD'
startdate = '2022-01-12'
enddate = '2022-01-14'
print(histprice(ticker,startdate,enddate))

Result:

{'currency': 'USD', 'symbol': 'BTC-USD', 'exchangeName': 'CCC', 'data': {'timestamp': ['2022-01-12', '2022-01-13', '2022-01-14'], 'volume': [33499938689, 47691135082, 23577403399], 'high': [44135.3671875, 44278.421875, 43346.6875], 'low': [42528.98828125, 42447.04296875, 41982.6171875], 'close': [43949.1015625, 42591.5703125, 43099.69921875], 'open': [42742.1796875, 43946.7421875, 42598.87109375], 'adjclose': [43949.1015625, 42591.5703125, 43099.69921875]}}

(3) To get full list of stock ticker in NASDAQ, NYSE and AMEX

from priceit import *

exchange = 'NASDAQ'
print(tickerlist(exchange))

Result:

{'symbol': ['AAPL', 'MSFT',...], 'name': ['Apple Inc. Common Stock', 'Microsoft Corporation Common Stock',...]}

Notes:

  • This project is being built up. More functions will be added.
  • If to get realtime price, please limit your frequency of data extraction.
  • After getting the full list of stock tickers, you can save it in your local disk so as to save the network resources.

About the Author

I am currently in Grade 11 (as of 16 Jan 2022). I have great interests in AI trading and real world simulation with C++, Java and Python. I am summarizing my free data sources in this project. And hopefully this can save some of your time in data extraction.

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

priceit-0.0.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

priceit-0.0.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file priceit-0.0.4.tar.gz.

File metadata

  • Download URL: priceit-0.0.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.7

File hashes

Hashes for priceit-0.0.4.tar.gz
Algorithm Hash digest
SHA256 85f95bb68be2074d9d49bb3e7a0450f685958b10a9ba6e8748af760a2a7c7ceb
MD5 1987147fd684f5e337493ab01bfb880a
BLAKE2b-256 2f5a70e5b6875874ce55be466abed4b6610018f893492b2042a3c28017731db2

See more details on using hashes here.

File details

Details for the file priceit-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: priceit-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.7

File hashes

Hashes for priceit-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 da525e588dd6b3d9dfe637880ebef8a81d65e894a7ed3a2844751b6e646af427
MD5 4c3b0f9a7b0c3141783e056e447339cb
BLAKE2b-256 03778c9bf5b59e0d1cdd1e11dbebb1ffd8ef3e9d7c3871ebfae31d0230cb93f4

See more details on using hashes here.

Supported by

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