An unofficial client for the official Trading212 API
Project description
python-trading212
A client for the Trading212 API
Installation
pip install python-trading212-alinalihassan
Usage
from trading212 import Trading212, Pie
trading212 = Trading212("<api_key>")
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
File details
Details for the file python_trading212_alinalihassan-2.0.5.tar.gz
.
File metadata
- Download URL: python_trading212_alinalihassan-2.0.5.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0159fecf01371ebefd9de395874f09fd4397c29ae759c231b696c60f23cc5088 |
|
MD5 | 2e20ac7ad98197c05d3bdcbbce55ba3c |
|
BLAKE2b-256 | 930caaa44d4bde38284541c877f0df135211a5c07653a29caa9885c6a2850d73 |
File details
Details for the file python_trading212_alinalihassan-2.0.5-py3-none-any.whl
.
File metadata
- Download URL: python_trading212_alinalihassan-2.0.5-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9eaf9483de26748cc632d5b0fb20eb603ad03181d0f254b43a049e42bc8a6cb |
|
MD5 | cc14fb62e655343c8f478252397e923d |
|
BLAKE2b-256 | 7725ca68a739cb44ac439e6e9936c67d554b25b31c5f428e95f6233fa6e7ea9d |