Metadata-Version: 2.1
Name: FlareRun
Version: 2.0.0
Summary: A comprehensive Python library designed for seamless interaction with FlareRun's trading APIs
Home-page: https://flarerun.online
Author: Aryan Chander
Author-email: aryanchander5@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests

## 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

```bash
pip install flarerun
```

## Getting Started

After installation, import OpenAlgo and initialize the API client with your credentials:

```python
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:

```python
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

```python
response = my_api.placeorder(symbol="RELIANCE-EQ", action="BUY", exchange="NSE", quantity=1)
print(response)
```

### Modify an Order

```python
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

```python
response = my_api.cancelorder(order_id="12345678")
print(response)
```

### Close a Position

```python
response = my_api.closeposition(strategy="MyStrategy")
print(response)
```

### Cancel All Orders

```python
response = my_api.cancelallorder(strategy="MyStrategy")
print(response)
```


