pycooltrader

Python library to pull ASX end of day prices from CoolTrader.com.au


License
MIT
Install
pip install pycooltrader==2.0.1

Documentation

PyCoolTrader

Build Status

Python library to pull ASX end of day prices from CoolTrader.com.au.

Installation

Install via pip:

$ pip install pycooltrader

API

get_latest_all()

Pull the latest available end of day price data for all securities listed on the ASX. The days prices are released on CoolTrader at 7:30pm, so, before that the returned prices will be for the day previous.

Example

>>> import pycooltrader.eod
>>> results = pycooltrader.eod.get_latest_all()
>>> print(results)
{
    "1AD": {
        "ticker": "1AD",
        "date": datetime.datetime(2018, 5, 1, 0, 0),
        "open": 0.29,
        "high": 0.29,
        "low": 0.285,
        "close": 0.29,
        "volume": 147760
    },
    "1AG": {
    ...

get_latest_single()

Get end of day prices / data for the given ASX listed security.

NOTE: This calls get_latest_all() internally and thus is no quicker than just calling that. This is just a convienience function.

Example

>>> import pycooltrader.eod
>>> results = pycooltrader.eod.get_latest_single('CBA')
>>> print(results)
{
    "ticker": "CBA",
    "date": datetime.datetime(2018, 5, 1, 0, 0),
    "open": 72.72,
    "high": 73.73,
    "low": 72.72,
    "close": 73.46,
    "volume": 3665086
}

get_latest_tickers()

Get all of the tickers present in the latest end of day feed.

Example

>>> import pycooltrader.eod
>>> results = pycooltrader.eod.get_latest_tickers()
>>> print(results)
[
    "1AD",
    "1AG",
    "1AL",
    "1PG",
    "1ST",
    "3DP",
    ...

Changelog

2.0.1

  • PyPi readme fix

2.0.0

  • Date now returned as datetime object rather than a string
  • Better unit testing
  • Better exception handling

1.0.1

  • Typo bug fix

1.0.0

Initial release