New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

trad-robo-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trad-robo-python

A trading robot written in Python utilizing the Lemon Markets API capable of maintaining a portfolio of instruments, displaying performance metrics, submitting orders, providing real-time & historical data and showcasing technical indicators.

  • 1.0.6
  • PyPI
  • Socket score

Maintainers
1

Pyrobot

Table of Contents

  • Overview
  • Setup
  • Usage

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc