Skip to main content

A lightweight, efficient Python wrapper for fetching historical equity market data via Angel One SmartAPI.

Project description

Trader_AngleOne

A lightweight, efficient Python wrapper for fetching historical equity market data via Angel One SmartAPI.

Features

  • Easy Authentication: Initialize seamlessly using dictionary unpacking.
  • Granular Timeframes: Supports 1-minute up to daily data intervals.
  • NSE Equity Focus: Built specifically to fetch NSE - EQ segment data (e.g., NIFTY, BANKNIFTY, RELIANCE, CIPLA).

Installation

Install the package via pip (once published to PyPI):

pip install Trader_AngleOne

Quick Start & Usage

This library focuses exclusively on the NSE Equity (NSE-EQ) segment. It does not support Derivatives/Futures data.

Here is how to initialize the trader and fetch historical data across various timeframes:

from Trader_AngleOne import TraderAngleOne

# 1. Define your Angel One API credentials
crd = {
    "api_key"    : "abc",
    "secret_key" : "abc-abc-abc",
    "totp"       : "abcAKBDLEMI",
    "userid"     : "U8XX1XX",
    "pwd"        : "1XX8",
}

# 2. Initialize the client using dictionary unpacking
angle = TraderAngleOne(**crd)

# 3. Fetch Historical Data (Parameters: Token/Symbol, Interval, Start Time, End Time, Exchange)

# Fetch 1-Minute Data
reliance_1 = angle.get_history_data('RELIANCE', '1', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

# Fetch 3-Minute Data
reliance_3 = angle.get_history_data('RELIANCE', '3', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

# Fetch 5-Minute Data
reliance_5 = angle.get_history_data('RELIANCE', '5', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

# Fetch 15-Minute Data
reliance_15 = angle.get_history_data('RELIANCE', '15', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

# Fetch 30-Minute Data
reliance_30 = angle.get_history_data('RELIANCE', '30', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

# Fetch 1-Hour Data
reliance_1H = angle.get_history_data('RELIANCE', '1H', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

# Fetch 1-Day Data
reliance_1D = angle.get_history_data('RELIANCE', '1D', '2026-01-01 09:15', '2026-01-02 15:30', 'NSE')

Supported Timeframes

Pass these exact string values into the second argument of get_history_data():

  • "1" - 1 Minute
  • "3" - 3 Minutes
  • "5" - 5 Minutes
  • "15" - 15 Minutes
  • "30" - 30 Minutes
  • "1H" - 1 Hour
  • "1D" - 1 Day

License

Distributed under the MIT License. See LICENSE for more information.

Trader_AngleOne

d983ccc6afe5dd7c494481585c5374dd60606e58

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trader_angleone-1.5.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trader_angleone-1.5-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file trader_angleone-1.5.tar.gz.

File metadata

  • Download URL: trader_angleone-1.5.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for trader_angleone-1.5.tar.gz
Algorithm Hash digest
SHA256 81f946a98a8e3f5b205c98dcb043d5f70308d566e0b12dd0e6b43d62ad277625
MD5 fca25f40226ff7145a2557a404f0f7a1
BLAKE2b-256 33246505448efc0e9c7662d89a8a4850e7a65f00d00b8cac731b94e7a96cc93e

See more details on using hashes here.

File details

Details for the file trader_angleone-1.5-py3-none-any.whl.

File metadata

  • Download URL: trader_angleone-1.5-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for trader_angleone-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7ef08a4e95eaa395158b13f8d9fafbf4cd20d5dcb6b5e211e5aa856621a0e8ba
MD5 617db3aeb9a79cee48e1c1b2bf208662
BLAKE2b-256 1a4e48cc131c86e2b20faa2e8aeadcd3977037286bbf76c7dac89c4b6fcd101c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page