skillfed

fyers-apiv3

Fyers trading APIs.

fyers-apiv3 v3.1.16 115.6K downloads/30d#12,242 on PyPI103
Permissive license Active released

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-apiv3

uv

uv add fyers-apiv3

poetry

poetry add fyers-apiv3

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

fyers trading api python clientstock trading api sdkreal-time market data socketorder placement and executiontrading account management apilive price updates websocketindian stock market api
trading-apimarket-datawebsocket

More Internet packages