Git Product home page Git Product logo

ritpytrading's Introduction

ritpytrading

RIT-trading-python

PyPI pyversions Build Status Updates PyPI version fury.io Python 3 Codacy Badge License

Python trading module for the Rotman Interactive Trader trading software. PyPI page.

Installation with pip: pip install ritpytrading

Full documentation available online.

A GitHub markdown flavor documentation can be found at documentation/README.md.

Image not displayed.

Prerequisites

Python version 3

The Rotman Interactive Trading Client which can only be operated in a Windows system. However, development of the PyPI ritpytrading package can be in done in Linux/BSD envrionment as well.

The full documentation for the Rotman Interactive Trader Client REST API can be found at Swaggerhub. The documentation is also present in a JSON format in the swagger_client_generated folder.

Installing

RIT Client Software

The RIT Client for Windows system can be downloaded at http://rit.rotman.utoronto.ca/software.asp.

Instructions for setting up an RIT demonstration client account for the Liability Trading 3 case file can be found at RIT’s website at http://rit.rotman.utoronto.ca/demo.asp.

Virtual environment packages with virtualenv or anaconda should be used for both Windows and Linux/BSD based systems.

Windows

Initialize the repository with git. Detailed instructions to download git for windows can be found at atlassian. The repository can then be initialized with git using:

$ git clone https://github.com/SamSamhuns/RIT-trading-python

Two options are available after this:

  • Anaconda is recommended for Windows system. Set up up a virtual conda environment first. Then open the anaconda prompt and use the command conda install --yes --file requirements.txt to install all modules from requirements.txt.
  • Or Install python and add it to your PATH system variable. Then install the pip package if not installed already also adding it to the PATH system variable. Then run the following commands.
$ pip install virtualenv
$ virtualenv venv
$ venv\Scripts\activate
$ pip install -r requirements.txt

Linux/BSD

After cloning the repository, install the required python packages using pip.

$ git clone https://github.com/SamSamhuns/RIT-trading-python
$ pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Building dists and running tests using makefile

For Windows, different options are available for using makefile. GnuWin's make provides a native port for Windows (without requiring a full runtime environment like Cygwin). After installing GnuWin, add C:\Program Files (x86)\GnuWin32\bin to your system PATH variable to run makefiles from any directory.

  • For Windows, run makefile commands with make -f Makefile.win <directive>. Example make -f Makefile.win help
  • For Linux/BSD, run makefile commands with make <directive>.

Run the following command to get a list of all Makefile command options.

$ make help

To run tests

$ make test
$ make test-all

To ensure the README.rst will be rendered in PyPI [might be outdated. Check twine check below]

$ python setup.py check --restructuredtext

To report any problems rendering your README. If your markup renders fine, the command will output Checking distribution FILENAME: Passed. To run the check on sdist and wheel.

$ twine check dist/*

To build the source and wheel package.

$ make build

Running tests with the python unittest module

Once python has been added to the PATH system variable in Windows, the code for running the scripts on Windows and Linux/BSD based systems are the same.

From the main directory, run:

$ python -m unittest

If no tests are run from the command above, run the verbose mode.

Verbose mode

$ python -m unittest discover -v

Usage (Only on Windows)

IMPORTANT: The RIT Trading client must also be running to make sure the REST RIT API Client requests can be made. In each script your RIT Client API key must be entered and the requests module be imported to make API calls.

To test out the ritpytrading package, install using pip inside a virtual environment:

$ pip install ritpytrading

Examples scripts are present inside the examples folder. Documentation for usage available here.

Built With

Versioning

Version tracked with Git

Authors

  • Samridha Shrestha

License

This project is licensed under the Apahce 2.0 License - see the LICENSE.md file for details

Acknowledgments

Contributions

contributions welcome

Disclaimer

All RIT software and external RIT links are provided by the Rotman School of Management and are their exclusive property.

ritpytrading's People

Contributors

samsamhuns avatar pyup-bot avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.