Giter VIP home page Giter VIP logo

python-trading212's Introduction

python-trading212

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

A client for the Trading212 API

Installation

pip install python-trading212

Usage

Set your API key in the environment variable:

export TRADING_212_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.

python-trading212's People

Contributors

jcoelho93 avatar

Stargazers

Alin Ali Hassan avatar Daniel Butler avatar

Watchers

 avatar

Forkers

alinalihassan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.