Skip to main content

An unofficial client for the official Trading212 API

Project description

python-trading212

CICD Status PyPI - Downloads GitHub License PyPI - Python Version PyPI - Version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_trading212_alinalihassan-2.0.5.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file python_trading212_alinalihassan-2.0.5.tar.gz.

File metadata

File hashes

Hashes for python_trading212_alinalihassan-2.0.5.tar.gz
Algorithm Hash digest
SHA256 0159fecf01371ebefd9de395874f09fd4397c29ae759c231b696c60f23cc5088
MD5 2e20ac7ad98197c05d3bdcbbce55ba3c
BLAKE2b-256 930caaa44d4bde38284541c877f0df135211a5c07653a29caa9885c6a2850d73

See more details on using hashes here.

File details

Details for the file python_trading212_alinalihassan-2.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for python_trading212_alinalihassan-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b9eaf9483de26748cc632d5b0fb20eb603ad03181d0f254b43a049e42bc8a6cb
MD5 cc14fb62e655343c8f478252397e923d
BLAKE2b-256 7725ca68a739cb44ac439e6e9936c67d554b25b31c5f428e95f6233fa6e7ea9d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page