myopenalgo


Namemyopenalgo JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://openalgo.in
SummaryA Python library for interacting with OpenAlgo's trading APIs
upload_time2024-10-27 09:51:06
maintainerNone
docs_urlNone
authorRajandran R
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenAlgo - Python API Client for Automated Trading

## About OpenAlgo

OpenAlgo is a self-hosted, Python-based platform designed to automate trading orders efficiently and effortlessly. Developed using the Flask framework and Tailwind CSS, OpenAlgo offers a user-friendly interface and leverages a robust SQLite database for local data management. Whether running on a personal desktop, laptop, or deployed on a server, OpenAlgo provides the flexibility required for various trading setups.

Download OpenAlgo from GitHub to get started with automating your trading strategies today.

## Key Features

- **Smart Order Placement:** Execute trades swiftly and efficiently with advanced order placement capabilities.
- **Automated Square-off:** Utilize one-click and time-based auto square-off functionalities to optimize trading outcomes.
- **Local Data Storage:** Ensure maximum privacy and control with your data securely stored on your local device.
- **Interactive UI Interface:** Enjoy a seamless trading experience with a clean and intuitive user interface.
- **Comprehensive API Log Management:** Analyze and refine your trading strategies with detailed log management.
- **Versatile API Access:** Supports local API access, Ngrok based internet access, and hosted API access for flexible connectivity.
- **Data Ownership:** Maintain complete ownership of your data, affirming OpenAlgo's commitment to privacy and control.
- **Rapid Execution:** Minimize slippage and maximize potential with faster trade execution.
- **Custom Webhook URL:** Customize and integrate with your preferred trading applications through webhook URLs.

## License

OpenAlgo is licensed under the MIT License. See the LICENSE file for more details.

## Documentation

For a detailed understanding of each API's behavior and capabilities, refer to the [OpenAlgo REST API Documentation](https://docs.openalgo.in/api-documentation/v1).

## Installation

### Install from PyPI

```bash
pip install openalgo
```

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

For more detailed usage and additional methods, refer to the [OpenAlgo REST API Documentation](https://docs.openalgo.in/api-documentation/v1)

            

Raw data

            {
    "_id": null,
    "home_page": "https://openalgo.in",
    "name": "myopenalgo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Rajandran R",
    "author_email": "rajandran@marketcalls.in",
    "download_url": "https://files.pythonhosted.org/packages/47/5a/8ec6b783e802b5d2539926aaf668970b2ac6448b63086677748626c5d45b/myopenalgo-1.0.3.tar.gz",
    "platform": null,
    "description": "# OpenAlgo - Python API Client for Automated Trading\r\n\r\n## About OpenAlgo\r\n\r\nOpenAlgo is a self-hosted, Python-based platform designed to automate trading orders efficiently and effortlessly. Developed using the Flask framework and Tailwind CSS, OpenAlgo offers a user-friendly interface and leverages a robust SQLite database for local data management. Whether running on a personal desktop, laptop, or deployed on a server, OpenAlgo provides the flexibility required for various trading setups.\r\n\r\nDownload OpenAlgo from GitHub to get started with automating your trading strategies today.\r\n\r\n## Key Features\r\n\r\n- **Smart Order Placement:** Execute trades swiftly and efficiently with advanced order placement capabilities.\r\n- **Automated Square-off:** Utilize one-click and time-based auto square-off functionalities to optimize trading outcomes.\r\n- **Local Data Storage:** Ensure maximum privacy and control with your data securely stored on your local device.\r\n- **Interactive UI Interface:** Enjoy a seamless trading experience with a clean and intuitive user interface.\r\n- **Comprehensive API Log Management:** Analyze and refine your trading strategies with detailed log management.\r\n- **Versatile API Access:** Supports local API access, Ngrok based internet access, and hosted API access for flexible connectivity.\r\n- **Data Ownership:** Maintain complete ownership of your data, affirming OpenAlgo's commitment to privacy and control.\r\n- **Rapid Execution:** Minimize slippage and maximize potential with faster trade execution.\r\n- **Custom Webhook URL:** Customize and integrate with your preferred trading applications through webhook URLs.\r\n\r\n## License\r\n\r\nOpenAlgo is licensed under the MIT License. See the LICENSE file for more details.\r\n\r\n## Documentation\r\n\r\nFor a detailed understanding of each API's behavior and capabilities, refer to the [OpenAlgo REST API Documentation](https://docs.openalgo.in/api-documentation/v1).\r\n\r\n## Installation\r\n\r\n### Install from PyPI\r\n\r\n```bash\r\npip install openalgo\r\n```\r\n\r\n## Getting Started\r\n\r\nAfter installation, import OpenAlgo and initialize the API client with your credentials:\r\n\r\n```python\r\nfrom openalgo.orders import api\r\n\r\n# Initialize the API client\r\nmy_api = api(api_key=\"your_api_key\")\r\n```\r\n\r\n## Creating an API Object\r\n\r\nTo create an API object, provide your API key, and optionally, the host URL and API version:\r\n\r\n```python\r\nmy_api = api(api_key=\"your_api_key_here\", host=\"http://127.0.0.1:5000\", version=\"v1\")\r\n```\r\n\r\n## Using Object Methods\r\n\r\nUtilize the methods by calling them with the necessary parameters. Here are some examples:\r\n\r\n### Place an Order\r\n\r\n```python\r\nresponse = my_api.placeorder(symbol=\"RELIANCE-EQ\", action=\"BUY\", exchange=\"NSE\", quantity=1)\r\nprint(response)\r\n```\r\n\r\n### Modify an Order\r\n\r\n```python\r\nresponse = my_api.modifyorder(order_id=\"12345678\", symbol=\"INFY-EQ\", action=\"SELL\", exchange=\"NSE\", product=\"CNC\", quantity=2, price=1500)\r\nprint(response)\r\n```\r\n\r\n### Cancel an Order\r\n\r\n```python\r\nresponse = my_api.cancelorder(order_id=\"12345678\")\r\nprint(response)\r\n```\r\n\r\n### Close a Position\r\n\r\n```python\r\nresponse = my_api.closeposition(strategy=\"MyStrategy\")\r\nprint(response)\r\n```\r\n\r\n### Cancel All Orders\r\n\r\n```python\r\nresponse = my_api.cancelallorder(strategy=\"MyStrategy\")\r\nprint(response)\r\n```\r\n\r\nFor more detailed usage and additional methods, refer to the [OpenAlgo REST API Documentation](https://docs.openalgo.in/api-documentation/v1)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for interacting with OpenAlgo's trading APIs",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://openalgo.in"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb048713a0da3397e9d8c1c4d44d22bac1d78fbd84a758c19d6666c6be8606e2",
                "md5": "9dfd660f3f6b0e114da3603d98705ce6",
                "sha256": "63adf9d8ef1100a43216baa439d89b94bdd5612146993747a5da8113b40f6662"
            },
            "downloads": -1,
            "filename": "myopenalgo-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9dfd660f3f6b0e114da3603d98705ce6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5142,
            "upload_time": "2024-10-27T09:51:05",
            "upload_time_iso_8601": "2024-10-27T09:51:05.233069Z",
            "url": "https://files.pythonhosted.org/packages/bb/04/8713a0da3397e9d8c1c4d44d22bac1d78fbd84a758c19d6666c6be8606e2/myopenalgo-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "475a8ec6b783e802b5d2539926aaf668970b2ac6448b63086677748626c5d45b",
                "md5": "fe1371abd745a31421ed06e5ea9a4f54",
                "sha256": "14d1d365db81f7422d03173c91192eeb00d141d7af9ec079d1b4e610faf38acb"
            },
            "downloads": -1,
            "filename": "myopenalgo-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "fe1371abd745a31421ed06e5ea9a4f54",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4283,
            "upload_time": "2024-10-27T09:51:06",
            "upload_time_iso_8601": "2024-10-27T09:51:06.615833Z",
            "url": "https://files.pythonhosted.org/packages/47/5a/8ec6b783e802b5d2539926aaf668970b2ac6448b63086677748626c5d45b/myopenalgo-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 09:51:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "myopenalgo"
}
        
Elapsed time: 1.55423s