python-trading212


Namepython-trading212 JSON
Version 2.0.4 PyPI version JSON
download
home_pagehttps://github.com/jcoelho93/python-trading212
SummaryAn unofficial client for the official Trading212 API
upload_time2024-12-04 18:32:00
maintainerNone
docs_urlNone
authorJosé Coelho
requires_python<4.0,>=3.12
licenseMIT
keywords python trading212 api client unofficial finance stocks trading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-trading212

![CICD Status](https://img.shields.io/github/actions/workflow/status/jcoelho93/python-trading212/ci.yml?label=cicd)
![PyPI - Downloads](https://img.shields.io/pypi/dm/python-trading212?logo=pypi&link=https%3A%2F%2Fpypi.org%2Fproject%2Fpython-trading212%2F)
![GitHub License](https://img.shields.io/github/license/jcoelho93/python-trading212)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-trading212)
![PyPI - Version](https://img.shields.io/pypi/v/python-trading212?logo=pypi&link=https%3A%2F%2Fpypi.org%2Fproject%2Fpython-trading212%2F)


A client for the [Trading212 API](https://t212public-api-docs.redoc.ly/)

## Installation

```bash
pip install python-trading212
```

## Usage

Set your API key in the environment variable:
```bash
export TRADING212_KEY=<your-api-key>
```

```python
from trading212 import Trading212, Pie

trading212 = Trading212()
pie: Pie = trading212.fetch_pie(123)
positions: List[Position] = trading212.fetch_all_open_positions()

trading212.create_pie(
    Pie(
        name='My Pie',
        ...
    )
)

```

## Supported Endpoints

### Instruments Metadata

- [x] Exchange List
- [x] Instrument List

## Pies

- [x] Fetch all pies
- [x] Create Pie
- [x] Delete Pie
- [x] Fetch a Pie
- [x] Update pie

## Equity Orders

- [x] Fetch all
- [x] Place Limit order
- [x] Place Market order
- [x] Place Stop order
- [x] Place StopLimit order
- [x] Cancel by ID
- [x] Fetch by ID

## Account Data

- [x] Fetch account cash
- [x] Fetch account metadata

## Personal Portfolio

- [x] Fetch all open positions
- [x] Fetch a specific position

## Historical Items

- [x] Historical order data
- [x] Paid out dividens
- [x] Exports List
- [x] Export csv
- [x] Transaction list

## Disclaimer

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jcoelho93/python-trading212",
    "name": "python-trading212",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "python, trading212, api, client, unofficial, finance, stocks, trading",
    "author": "Jos\u00e9 Coelho",
    "author_email": "16445494+jcoelho93@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/d9/ec/d32bc26991e4c87c414dd0ec24c730707db86a94be6cb61969fc2994dd91/python_trading212-2.0.4.tar.gz",
    "platform": null,
    "description": "# python-trading212\n\n![CICD Status](https://img.shields.io/github/actions/workflow/status/jcoelho93/python-trading212/ci.yml?label=cicd)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/python-trading212?logo=pypi&link=https%3A%2F%2Fpypi.org%2Fproject%2Fpython-trading212%2F)\n![GitHub License](https://img.shields.io/github/license/jcoelho93/python-trading212)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-trading212)\n![PyPI - Version](https://img.shields.io/pypi/v/python-trading212?logo=pypi&link=https%3A%2F%2Fpypi.org%2Fproject%2Fpython-trading212%2F)\n\n\nA client for the [Trading212 API](https://t212public-api-docs.redoc.ly/)\n\n## Installation\n\n```bash\npip install python-trading212\n```\n\n## Usage\n\nSet your API key in the environment variable:\n```bash\nexport TRADING212_KEY=<your-api-key>\n```\n\n```python\nfrom trading212 import Trading212, Pie\n\ntrading212 = Trading212()\npie: Pie = trading212.fetch_pie(123)\npositions: List[Position] = trading212.fetch_all_open_positions()\n\ntrading212.create_pie(\n    Pie(\n        name='My Pie',\n        ...\n    )\n)\n\n```\n\n## Supported Endpoints\n\n### Instruments Metadata\n\n- [x] Exchange List\n- [x] Instrument List\n\n## Pies\n\n- [x] Fetch all pies\n- [x] Create Pie\n- [x] Delete Pie\n- [x] Fetch a Pie\n- [x] Update pie\n\n## Equity Orders\n\n- [x] Fetch all\n- [x] Place Limit order\n- [x] Place Market order\n- [x] Place Stop order\n- [x] Place StopLimit order\n- [x] Cancel by ID\n- [x] Fetch by ID\n\n## Account Data\n\n- [x] Fetch account cash\n- [x] Fetch account metadata\n\n## Personal Portfolio\n\n- [x] Fetch all open positions\n- [x] Fetch a specific position\n\n## Historical Items\n\n- [x] Historical order data\n- [x] Paid out dividens\n- [x] Exports List\n- [x] Export csv\n- [x] Transaction list\n\n## Disclaimer\n\nTHE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An unofficial client for the official Trading212 API",
    "version": "2.0.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/jcoelho93/python-trading212/issues",
        "Documentation": "https://github.com/jcoelho93/python-trading212",
        "Homepage": "https://github.com/jcoelho93/python-trading212",
        "Repository": "https://github.com/jcoelho93/python-trading212"
    },
    "split_keywords": [
        "python",
        " trading212",
        " api",
        " client",
        " unofficial",
        " finance",
        " stocks",
        " trading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4b7bb16d5e27871df740f91255c1803b9a662ebba4d551b45731bc4c1019d3d",
                "md5": "7998e223a2f61912a4f50388874301ab",
                "sha256": "2477674104e5434bb9b53863a6dc3e61dca2f6680d811338f2c265bd98ab82cc"
            },
            "downloads": -1,
            "filename": "python_trading212-2.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7998e223a2f61912a4f50388874301ab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 7504,
            "upload_time": "2024-12-04T18:31:59",
            "upload_time_iso_8601": "2024-12-04T18:31:59.498995Z",
            "url": "https://files.pythonhosted.org/packages/a4/b7/bb16d5e27871df740f91255c1803b9a662ebba4d551b45731bc4c1019d3d/python_trading212-2.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9ecd32bc26991e4c87c414dd0ec24c730707db86a94be6cb61969fc2994dd91",
                "md5": "5f60764d433bb5d84a6715455ce42415",
                "sha256": "0a670ecf58161600f403e9c6f5017a2d118faf759de3b0947456b9090e37bcbe"
            },
            "downloads": -1,
            "filename": "python_trading212-2.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "5f60764d433bb5d84a6715455ce42415",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 6256,
            "upload_time": "2024-12-04T18:32:00",
            "upload_time_iso_8601": "2024-12-04T18:32:00.690061Z",
            "url": "https://files.pythonhosted.org/packages/d9/ec/d32bc26991e4c87c414dd0ec24c730707db86a94be6cb61969fc2994dd91/python_trading212-2.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-04 18:32:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jcoelho93",
    "github_project": "python-trading212",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-trading212"
}
        
Elapsed time: 0.44171s