No project description provided
Project description
python-trading-212 (WIP)
This project defines two clients for the Trading 212 api.
Setup
Set the two environment variables:
export T212_API_KEY=123_YOUR_API_KEY
export T212_ENVIRONMENT="live" or "demo"
AsyncTrading212Client
This uses aiohttp to make requests asyncronously.
Usage:
from t212.async_client import AsyncTrading212Client
# To run from synchronous code
import asyncio
asyncio.run(AsyncTrading212Client.fetch_account_cash())
...
# To run from async, simply call
await AsyncTrading212Client.exchange_list()
...
# you can get the response as a python dict by running
response = await AsyncTrading212Client.exchange_list()
response.model_dump(mode="json")
...
# remember to close the client when you're done
AsyncTrading212Client.close_client()
Roadmap
[x] All get endpoint implemented for async class - done 02/09/2025
[ ] All post endpoints implemented for async class - target 10/09/2025
[ ] All get endpoint implemented for sync class - target 20/09/2025
[ ] All post endpoints implemented for sync class - target 30/09/2025
[ ] Deploy on pypi
Project details
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 trading_212_client-0.1.0.tar.gz.
File metadata
- Download URL: trading_212_client-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc69251c2d4b40ab70d0ba6c4008f0b40a66b69d1677ce4a722590c4c04daef3
|
|
| MD5 |
658a37369f7c2eef2ec8f354d67d6f54
|
|
| BLAKE2b-256 |
7b82e1e1bda266ae457aa4edfeb9b87022e6033f22619f29e61e5a44845c6ade
|
Provenance
The following attestation bundles were made for trading_212_client-0.1.0.tar.gz:
Publisher:
python-publish.yml on Lancasterg/python-trading-212
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trading_212_client-0.1.0.tar.gz -
Subject digest:
cc69251c2d4b40ab70d0ba6c4008f0b40a66b69d1677ce4a722590c4c04daef3 - Sigstore transparency entry: 466843534
- Sigstore integration time:
-
Permalink:
Lancasterg/python-trading-212@5077f50a743eacf2be453aa55e1828a6680b3853 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/Lancasterg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5077f50a743eacf2be453aa55e1828a6680b3853 -
Trigger Event:
release
-
Statement type:
File details
Details for the file trading_212_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trading_212_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11c8b9441c82a6a195d99f89144f0abd241d4c0cf070d08c5a97e510ead37130
|
|
| MD5 |
c7cc73e8119a6693b17df19fab6be6ba
|
|
| BLAKE2b-256 |
dd5018ceb18b2ba4ab6afc88c933d8f18debcda6f7fdd782e02240de9841bdd4
|
Provenance
The following attestation bundles were made for trading_212_client-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on Lancasterg/python-trading-212
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trading_212_client-0.1.0-py3-none-any.whl -
Subject digest:
11c8b9441c82a6a195d99f89144f0abd241d4c0cf070d08c5a97e510ead37130 - Sigstore transparency entry: 466843563
- Sigstore integration time:
-
Permalink:
Lancasterg/python-trading-212@5077f50a743eacf2be453aa55e1828a6680b3853 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/Lancasterg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5077f50a743eacf2be453aa55e1828a6680b3853 -
Trigger Event:
release
-
Statement type: