A comprehensive Python library designed for seamless interaction with FlareRun's trading APIs
Project description
FlareRun - Python API Client for Automated Trading
Overview
FlareRun is a versatile, self-hosted trading platform built in Python, designed to streamline the automation of trading orders with both precision and ease. Utilizing the Flask framework for backend services and Tailwind CSS for frontend design, FlareRun provides an intuitive and user-friendly interface. At its core, FlareRun integrates a robust SQLite database to manage data locally, ensuring efficient and secure data handling. Whether deployed on a personal desktop, laptop, or a remote server, FlareRun is engineered to adapt to various trading environments, offering unparalleled flexibility.
To begin automating your trading strategies with FlareRun, simply download the platform from GitHub and integrate it into your trading workflow for a seamless experience.
Key Features
Intelligent Order Placement: FlareRun enables you to execute trades quickly and accurately, thanks to its sophisticated order placement functionality. This advanced capability allows for efficient and effective trade execution, ensuring you capitalize on market opportunities with precision.
Automated Square-off: FlareRun includes one-click and time-based auto square-off features, designed to optimize your trading outcomes. These automation options help you manage your trades more effectively, reducing manual intervention and improving overall trading efficiency.
Local Data Storage: With FlareRun, your data is stored securely on your local device, offering enhanced privacy and control. This local storage solution ensures that sensitive trading information remains under your exclusive control, safeguarding your data from external breaches.
Interactive User Interface: Enjoy a smooth and engaging trading experience with FlareRun's clean and intuitive user interface. The platform’s design focuses on ease of use, providing a seamless interaction for both novice and experienced traders.
Comprehensive API Log Management: FlareRun offers detailed log management and analysis tools, allowing you to refine and improve your trading strategies. The comprehensive logging system provides valuable insights into your trading activities, facilitating better decision-making.
Versatile API Access: FlareRun supports various methods of API access, including local API connections, Ngrok-based internet access, and hosted API endpoints. This versatility ensures flexible connectivity options, adapting to different trading setups and requirements.
Complete Data Ownership: FlareRun is committed to data privacy and control. By retaining full ownership of your data, the platform aligns with best practices in data security and user privacy, reflecting its dedication to safeguarding your trading information.
Rapid Execution: Minimize trading slippage and maximize potential returns with FlareRun's rapid trade execution capabilities. The platform is optimized for quick order processing, helping you take advantage of market conditions without delay.
Customizable Webhook URL: FlareRun allows for seamless integration with your preferred trading applications through customizable webhook URLs. This feature enables you to tailor the platform to fit your specific trading ecosystem, enhancing its functionality and connectivity.
Installation
Install from PyPI
pip install flarerun
Getting Started
After installation, import OpenAlgo and initialize the API client with your credentials:
from openalgo.orders import api
# Initialize the API client
my_api = api(api_key="your_api_key")
Creating an API Object
To create an API object, provide your API key, and optionally, the host URL and API version:
my_api = api(api_key="your_api_key_here", host="http://127.0.0.1:5000", version="v1")
Using Object Methods
Utilize the methods by calling them with the necessary parameters. Here are some examples:
Place an Order
response = my_api.placeorder(symbol="RELIANCE-EQ", action="BUY", exchange="NSE", quantity=1)
print(response)
Modify an Order
response = my_api.modifyorder(order_id="12345678", symbol="INFY-EQ", action="SELL", exchange="NSE", product="CNC", quantity=2, price=1500)
print(response)
Cancel an Order
response = my_api.cancelorder(order_id="12345678")
print(response)
Close a Position
response = my_api.closeposition(strategy="MyStrategy")
print(response)
Cancel All Orders
response = my_api.cancelallorder(strategy="MyStrategy")
print(response)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flarerun-2.0.0.tar.gz.
File metadata
- Download URL: flarerun-2.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5fab2443cf5c667cc02b44f30cf8463333fde4d7b4f67b9729ac6dc278f2c7f
|
|
| MD5 |
b1e481fc3fb088387294f68a35a0e711
|
|
| BLAKE2b-256 |
0aa21e6d4440cd81f5d0d33c22d2a26ed3290d91761f15543fb6854a4ec8be65
|
File details
Details for the file FlareRun-2.0.0-py3-none-any.whl.
File metadata
- Download URL: FlareRun-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a641e8e9fb06c24d347c114b15dc2cda30ea6e00631d8e686fc944d8f001175a
|
|
| MD5 |
83a26c101cdd5e542660f2a91d98272e
|
|
| BLAKE2b-256 |
2f7c553685b6860ff8cfdcdbb80c3125da35f07aa9f07bbf4e7ffff8e66ebe1d
|