An unofficial client for the official Trading212 API
Project description
python-trading212
A client for the Trading212 API
Installation
pip install python-trading212
Usage
Set your API key in the environment variable:
export TRADING212_KEY=<your-api-key>
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
- Exchange List
- Instrument List
Pies
- Fetch all pies
- Create Pie
- Delete Pie
- Fetch a Pie
- Update pie
Equity Orders
- Fetch all
- Place Limit order
- Place Market order
- Place Stop order
- Place StopLimit order
- Cancel by ID
- Fetch by ID
Account Data
- Fetch account cash
- Fetch account metadata
Personal Portfolio
- Fetch all open positions
- Fetch a specific position
Historical Items
- Historical order data
- Paid out dividens
- Exports List
- Export csv
- 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.
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 python_trading212-2.0.4.tar.gz.
File metadata
- Download URL: python_trading212-2.0.4.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a670ecf58161600f403e9c6f5017a2d118faf759de3b0947456b9090e37bcbe
|
|
| MD5 |
5f60764d433bb5d84a6715455ce42415
|
|
| BLAKE2b-256 |
d9ecd32bc26991e4c87c414dd0ec24c730707db86a94be6cb61969fc2994dd91
|
Provenance
The following attestation bundles were made for python_trading212-2.0.4.tar.gz:
Publisher:
publishing.yml on jcoelho93/python-trading212
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_trading212-2.0.4.tar.gz -
Subject digest:
0a670ecf58161600f403e9c6f5017a2d118faf759de3b0947456b9090e37bcbe - Sigstore transparency entry: 153384259
- Sigstore integration time:
-
Permalink:
jcoelho93/python-trading212@3e221e5bbb5476cc4ecde8346c2588465abe12fc -
Branch / Tag:
refs/tags/2.0.4 - Owner: https://github.com/jcoelho93
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishing.yml@3e221e5bbb5476cc4ecde8346c2588465abe12fc -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_trading212-2.0.4-py3-none-any.whl.
File metadata
- Download URL: python_trading212-2.0.4-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2477674104e5434bb9b53863a6dc3e61dca2f6680d811338f2c265bd98ab82cc
|
|
| MD5 |
7998e223a2f61912a4f50388874301ab
|
|
| BLAKE2b-256 |
a4b7bb16d5e27871df740f91255c1803b9a662ebba4d551b45731bc4c1019d3d
|
Provenance
The following attestation bundles were made for python_trading212-2.0.4-py3-none-any.whl:
Publisher:
publishing.yml on jcoelho93/python-trading212
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_trading212-2.0.4-py3-none-any.whl -
Subject digest:
2477674104e5434bb9b53863a6dc3e61dca2f6680d811338f2c265bd98ab82cc - Sigstore transparency entry: 153384260
- Sigstore integration time:
-
Permalink:
jcoelho93/python-trading212@3e221e5bbb5476cc4ecde8346c2588465abe12fc -
Branch / Tag:
refs/tags/2.0.4 - Owner: https://github.com/jcoelho93
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishing.yml@3e221e5bbb5476cc4ecde8346c2588465abe12fc -
Trigger Event:
release
-
Statement type: