This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Readme for PyHI module

0. Introduction

This is a Python client for HistoricalInvestor.com server, a financial training tool and trading strategy tester application.

1. Using PyHI client

  1. Log in to HI account using a supported browser (manually) and presuming you have some financial instruments bought, click:

Autosys | REST API

This window contains credentials for your HI client:

REST ID: REST Password:

Copy those credentials to your trading automaton configuration.

The window also lists the symbols of available financial instruments you can trade using the client API.

  1. In your program, import the HiData class from “pyhi” module:

from pyhi import HiData, maybe_pretty

  1. Create main instance of the HiData class that will be a HI client, for instance

hd = HiData(restid, restpasswd, ‘AUDJPY’, resolution=’D1’, initialTime=1245803300000, baseurl=’http://historicalinvestor.com’)

The client attempts to open the session to the HI server automatically on creation. It remembers specified parameters like session token, restId and restPassword.

You can call object methods to operate on the virtual market session: getting data, placing orders and closing session.

Example of getting data:

print ‘nnDATA acquired:’, maybe_pretty(hd.get_data(1245803500000, 5))

Placing order for 1 lot of AUDJPY:

print ‘nnOrder:’, maybe_pretty(hd.order(1245803500000, 1))

  1. Transactions

To buy, use positive values (long position) in “volume” parameter.

To sell, use negative values (long position) in “volume” parameter.

  1. close the session with .finish

or else the transactions will not be visible

  1. open executed session in web UI:
  • click Autosys | automaton name (e.g. “MyAutomaton” in “test.py” example) | date and time of the session.
  1. click Results button to view the trade results.

Button Trades turns on buy/sell transaction labels on the main chart.

4. Example

A complete client use example is available in a file “example.py” located in “doc ” subdirectory.

5. Important issues

Remember to close the session with “finish” method of HiData instance - otherwise the session with transactions done will not be shown in web UI!

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyhi-0.2.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Apr 29, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting