An unofficial API for Firstrade
Project description
firstrade-api
A reverse-engineered python API to interact with the Firstrade Trading platform.
This is not an official api! This api's functionality may change at any time.
This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
In order to use Fractional shares you must accept the agreement on the website before using it in this API.
Contribution
I am new to coding and new to open-source. I would love any help and suggestions!
Setup
Install using pypi:
pip install firstrade
Quikstart
Checkout test.py for sample code.
This code will:
- Login and print account info.
- Get a quote for 'INTC' and print out the information
- Place a market order for 'INTC' on the first account in the
account_numbers
list - Print out the order confirmation
Checkout test.py for sample code.
Implemented Features
- Login
- Get Quotes
- Get Account Data
- Place Orders and Receive order confirmation
- Get Currently Held Positions
- Fractional Trading support (thanks to @jiak94)
- Check on placed order status. (thanks to @Cfomodz)
TO DO
- Cancel placed orders
- Options
- Give me some Ideas!
If you would like to support me, you can do so here:
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
Hashes for firstrade-0.0.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ea4cf95b7e3bb99609b5256dbd987dbaff052fb7d3b32d2afc0748166a18c3 |
|
MD5 | 57eb2c8a32f9e1ebb46fe8d39e5ef2eb |
|
BLAKE2b-256 | ba887b1276f42210a3d65438b9b50a4414788eea9d8b4c12d4bfe5ce1a25bffe |