Carrying forward the great work of Algo2t/alphatrade. This repository provides an unofficial Python API wrapper for Stocko, designed to simplify interaction with their trading platform. Follow the steps below to set up and use the library. Discussion forum :- https://t.me/sasonlineunofficial
Clone the repository to your local machine:
git clone https://github.com/nevatia/StockoPI.gitSet up a virtual environment to isolate dependencies:
python -m pip install virtualenv
python -m venv stockoActivate the environment:
- On Windows:
stocko\Scripts\activate
- On macOS/Linux:
source stocko/bin/activate
Install the dependencies listed in requirements.txt:
python -m pip install -r requirements.txtNavigate to the root of the cloned repository and open the config.py file. Enter your login details:
login_id = "your_login_id"
password = "your_password"
Totp= "your_totp_secret_key"
client_secret = "your client secret received from support"Note: The
totp_secret_keyshould be the SECRET key for generating 2FA codes, not the 6-digit TOTP.
Once set up, you can use the Stocko API wrapper to interact with the trading platform. Refer to the examples in the repository (stockomain.py) to get started.
This is an unofficial library for educational and personal use. Use it at your own risk. The authors are not affiliated with Stocko or SASOnline.