fyers-apiv3
Fyers trading APIs.
What it is and what it does
Fyers-apiv3 is the official Python SDK for Fyers, an Indian stock trading platform. It wraps the Fyers REST and WebSocket APIs, allowing developers to authenticate, retrieve account data (profile, funds, holdings), execute trades (single, basket, and multileg orders), and subscribe to real-time market updates via dedicated data and order sockets. The v3 release introduced breaking changes with improved socket performance, expanded symbol tracking capacity, and enhanced error handling.
The library handles OAuth2 authentication flow, order lifecycle management, and streaming updates for market ticks, depth changes, order status, positions, and trades. It supports both synchronous and asynchronous patterns through its FyersModel class and includes built-in support for take-profit and stop-loss overlays on orders. Typical use involves generating an auth code via browser login, exchanging it for an access token, then instantiating a FyersModel object to make API calls.
Use it for:
- Build a Python trading bot that places orders and monitors positions in real-time via Fyers' WebSocket connections.
- Retrieve account holdings, funds, and trade history for portfolio analysis or reconciliation workflows.
- Stream live market data (ticks, depth updates, symbol changes) for a custom trading dashboard or alert system.
- Automate order placement for basket trading or multileg strategies with integrated take-profit and stop-loss logic.
- Integrate Fyers trading capabilities into a larger Python application or Lambda function (via aws_lambda_powertools dependency).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Official Python client library for the Fyers trading API, enabling programmatic access to market data, order placement, account information, and real-time socket updates for trading and position management.
Yes. Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make it safe to adopt. Install if you are building a Python trading application against Fyers' platform; the official status and recent release cadence suggest ongoing support. Prerequisite: you must have a registered Fyers API application and valid credentials.
Install
fyers-apiv3 on PyPI
pip
pip install fyers-apiv3uv
uv add fyers-apiv3poetry
poetry add fyers-apiv3Installing fyers-apiv3
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent releases (latest 2026-08-06, 8 days old) and an active repository. Depends on common libraries (requests, aiohttp, websocket-client) with no exotic system requirements.
License in practice
Licensed under MIT (permissive), allowing unrestricted use, modification, and distribution in commercial or private projects with minimal legal friction.
Quickstart
pip install fyers-apiv3
from fyers_apiv3 import fyersModel
appSession = fyersModel.SessionModel(
client_id="YOUR_APP_ID",
redirect_uri="YOUR_REDIRECT_URI",
secret_key="YOUR_SECRET"
)
auth_url = appSession.generate_authcode()
# After login, set token and generate access token
fyers = fyersModel.FyersModel(token=access_token, client_id=client_id)
print(fyers.get_profile())
Requires a registered Fyers API application (created via https://myapi.fyers.in/dashboard/) with valid client credentials and redirect URI to authenticate and obtain access tokens.
Verify before relying
- Whether Python version constraints exist beyond the stated 'Python v3' requirement
- Specific rate limits or subscription capacity details for real-time socket connections
- Production stability and SLA guarantees for the Fyers API backend service itself
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — requests, asyncio, aiohttp, aws_lambda_powertools, websocket-client, setuptools |
| Maintenance | actively maintained — 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,565/month — #12,242 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fyers_apiv3-3.1.16-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
python-binanceUnofficial Python wrapper for the Binance…
permissive · top 15,000 on PyPI
smartapi-pythonA Python client library for Angel Broking's…
unclear · top 15,000 on PyPI
tastytradeAn asynchronous Python SDK for Tastytrade's…
permissive · top 15,000 on PyPI
dhanhqPython client library for the Dhan trading API,…
permissive · top 15,000 on PyPI
snaptrade-python-sdkPython SDK client for SnapTrade's brokerage…
permissive · top 15,000 on PyPI
alpaca-pyAlpaca-py is the official Python SDK for…
permissive · top 5,000 on PyPI
growwapiSDK for connecting to Groww's trading platform…
permissive · top 15,000 on PyPI
schwab-pyUnofficial wrapper for the Charles Schwab API…
permissive · top 15,000 on PyPI
egnyteOfficial Python client library for Egnyte's…
permissive · top 15,000 on PyPI
shotgun-api3Official Python API client for Autodesk Flow…
unclear · top 15,000 on PyPI