Skip to main content

Pyrobot

Table of Contents

Overview

Current Version: 1.0.6

A trading robot written in Python utilizing the Lemon Markets API designed to mimic a few common scenarios:

  1. Providing an interface for the user's trading account. The PyRobot object will initialize a new instance of the robot and provide general information regarding the user's account. It will also serve as main object connecting all other objects to provide easy access to other functionalities.

  2. Maintaining a portfolio of multiple instruments. The Portfolio object will be able to calculate common portfolio risk metrics, display order information, and provide both historical and real-time prices for instruments.

  3. Define an order that can be used to trade a financial instrument. With the Trade object, you can place, cancel and retrieve orders.

  4. Define and calculate indicators using both historical and real-time prices. The Indicator object will help you easily define the input of your indicators, calculate them, and then update their values as new prices come.

  5. Access new information daily. The MarketData,TradingPositions and TradingAccount objects will interact with the Lemon Markets API to ensure the trader is equipped with up-to-date information regarding the market and their portfolio.

Setup

Setup - PyPi Install:

The project can be found at PyPI, if you'd like to view the project please use this link. To install the library, run the following command from the terminal.

pip install trad-robo-python

Usage

To run the robot, you will need to provide a few pieces of information from your Lemon Markets Paper Trading Account The following items are need for authentication:

  • Market Data API Key: This will be provided when you register an account with the Lemon Markets website. An example of a Market Data API key could look like the following eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJh.

  • Paper Trading API Key: This will be provided when you register an account with the Lemon Markets website. An example of a Paper Trading API key could look like the following eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..

Once you've identified those pieces of info, you can run the robot. Here is a simple example that will create a new instance of it:

from pyrobot.robot import PyRobot

# Initialize the robot
trading_robot = PyRobot(
    market_api_key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJh',
    paper-trading_api_key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.'
)

For more detailed examples, go to the run_robot.py file to see an example of how to use the library along with all the different objects inside.

Metadata

Release files for trad-robo-python 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for trad-robo-python 1.0.6
File Interpreter ABI Platform
trad_robo_python-1.0.6-py3-none-any.whl Python 3 none any Details

Release files / trad_robo_python-1.0.6-py3-none-any.whl

Download URL trad_robo_python-1.0.6-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4f9266677ad6352be592e604d38a4e92475d3816f67c91e906c962b5ccedebe
BLAKE2b-256 checksum
How to use checksums
76f3226885dc031b37a67f34b24c79ebfce3e320342e82c2d203dd1aa4ca5b98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.2

Security for trad-robo-python 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.6 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page