Skip to main content

No project description provided

Project description

easy_kite_methods

The easy_kite_methods package provides a seamless interface for interacting with the Kite Connect API for stock trading on the Zerodha platform.

Installation

To install the easy_kite_methods package, run the following command:

pip install easy_kite_methods

Configuration

Before using the easy_kite_methods package, you must configure your environment with necessary API keys and secrets. Follow these steps to set up your environment:

  1. Environment Variables: Store your Kite Connect API key and secret in a .env file at the root of your project. This file should contain:

    KITE_API_KEY=your_api_key_here
    KITE_API_SECRET=your_api_secret_here
    

Usage

Import the package using the alias ekm and utilize its functions for interacting with the Zerodha Kite Connect API.

Example Imports

import easy_kite_methods as ekm

Placing Orders

  • Place a Normal Order:

    order_id = ekm.place_normal_order(stock_name="RELIANCE", quantity=1, order_type="BUY")
    
  • Place a Limit Order:

    order_id = ekm.place_limit_order(stock_name="TCS", quantity=2, price=3500, order_type="SELL")
    

Modifying Orders

  • Modify an Order:

    modified_order_id = ekm.modify_order(variety="regular", orderId="your_order_id_here", quantity=2, price=3550)
    

Fetching Account Details

  • Fetch Holdings:

    holdings = ekm.get_holdings()
    
  • Fetch Positions:

    positions = ekm.get_positions()
    

Additional Methods

Include more comprehensive functionalities for trading:

  • Get Stock Price:

    stock_price = ekm.get_stock_price(name="RELIANCE")
    
  • Get Stock Instrument Token:

    token = ekm.get_stock_instrument_token(stock_name="RELIANCE")
    
  • Buy/Sell Intraday Normal Order:

    order_id = ekm.buy_intraday_normal_order(stock_name="INFY", quantity=10)
    
    order_id = ekm.sell_intraday_normal_order(stock_name="INFY", quantity=5)
    
  • Buy/Sell Intraday Limit Order:

    order_id = ekm.buy_intraday_limit_order(stock_name="INFY", quantity=10, price=1500)
    
    order_id = ekm.sell_intraday_limit_order(stock_name="INFY", quantity=5, price=1500)
    
  • Place Stop Loss Market Order:

    order_id = ekm.place_slm_order(stock_name="INFY", quantity=10, order_type="BUY", price=1500)
    
  • Modify Order Properties:

    new_order_id = ekm.modify_order_quantity(variety="regular", order_id="order123", quantity=15)
    
    new_order_id = ekm.modify_order_price(variety="regular", order_id="order123", price=1520)
    
  • Cancel or Exit Orders:

    ekm.cancel_order(order_id="order123")
    
    ekm.exit_orders(order_id="order123")
    

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

easy_kite_methods-0.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

easy_kite_methods-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file easy_kite_methods-0.0.2.tar.gz.

File metadata

  • Download URL: easy_kite_methods-0.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for easy_kite_methods-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ef4b89c82d2c56a845be10c43da504ba9a70eb640bbd23078fed62c99227554c
MD5 f8ccebed646e31fa9ac606e74a87b570
BLAKE2b-256 051eec270a7cf4ba57f90472c77677a3bbb2ac5667dfdb83d83fcba3aae6b608

See more details on using hashes here.

File details

Details for the file easy_kite_methods-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: easy_kite_methods-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for easy_kite_methods-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d8e861aee7792260d6fa7f95e6e7367f2d22d85b524483f854112cc3a41260b
MD5 b596dded193563f359db7c4b1cff4785
BLAKE2b-256 fd30e9015ff73ad28c298e2a85265d7d9fff8e2906ae41198bb0e89d829f115f

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