Ashish_Mittal

import requests from kiteconnect import KiteConnect from decimal import Decimal import logging import time import csv import requests api_key = '' access_token = '' symbol = 'RELIANCE' trigger_price = 2581.7 quantity = 1 order_type = 'LIMIT' transaction_type = 'BUY' product = 'CNC' last_price = 2590.25 gtt_order_params = { 'type': 'SINGLE', 'condition': { 'exchange': 'NSE', 'tradingsymbol': symbol, 'trigger_values': [trigger_price], 'last_price': last_price, }, 'orders': [ { 'exchange': 'NSE', 'tradingsymbol': symbol, 'transaction_type': transaction_type, 'quantity': quantity, 'order_type': order_type, 'product': product, 'price': trigger_price } ] } try: response = requests.post( 'https://api.kite.trade/gtt/triggers', headers={ 'X-Kite-Version': '3', Please help.

About

Username
Ashish_Mittal
Joined
Visits
20
Last Active
Roles
Member

Activity

  • import requests
    from kiteconnect import KiteConnect
    from decimal import Decimal
    import logging
    import time
    import csv
    import requests

    api_key = ''
    access_token = ''

    symbol = 'RELIANCE'
    trigger_price = 2581.7
    quantity = 1
    order_type = 'LIMIT'
    transaction_type = 'BUY'
    product = 'CNC'
    last_price = 2590.25

    gtt_order_params = {
    'type': 'SINGLE',
    'condition': {
    'exchange': 'NSE',
    'tradingsymbol': symbol,
    'trigger_values': [trigger_price],
    'last_price': last_price,
    },
    'orders': [
    {
    'exchange': 'NSE',
    'tradingsymbol': symbol,
    'transaction_type': transaction_type,
    'quantity': quantity,
    'order_type': order_type,
    'product': product,
    'price': trigger_price
    }
    ]
    }

    try:
    response = requests.post(
    'https://api.kite.trade/gtt/triggers',
    headers={
    'X-Kite-Version': '3',


    Please help.
    January 1
  • Request to API: {'type': 'SINGLE', 'condition': {'exchange': 'NSE', 'tradingsymbol': 'RELIANCE', 'trigger_values': [2581.7], 'last_price': 2590.25}, 'orders': [{'exchange': 'NSE', 'tradingsymbol': 'RELIANCE', 'transaction_type': 'BUY', 'quantity': 1, 'order_type': 'LIMIT', 'product': 'CNC', 'price': 2581.7}]}
    Response from API: {'status': 'error', 'message': 'Invalid order params.', 'data': None, 'error_type': 'InputException'}
    Error placing GTT order for RELIANCE: {'status': 'error', 'message': 'Invalid order params.', 'data': None, 'error_type': 'InputException'}

    I have tried all ways to first time place GTT order however getting above error. I am giving code subsequently as well.


    January 1