[Bug] GTT trigger value is not allowed to be int

VarunAgw
Steps to reproduce.

1. Create a GTT for ADANIGREEN with 420 as trigger_values[0].
2. It will return this error "Invalid condition params."

Note: Adding a decimal part to trigger_values fix this. So 420.01, 420.3 will work, but 420 or 420.00 won't work
  • rakeshr
    @VarunAgw
    We just checked with trigger_values[0] being int and it's working fine. Can you paste complete log here along with requested data.
    Response:
    {'id': 7534317, 'user_id': 'XXXXX', 'parent_trigger': None, 'type': 'single',
    'created_at': '2020-06-24 19:03:32', 'updated_at': '2020-06-24 19:03:32',
    'expires_at': '2021-06-24 19:03:32', 'status': 'active',
    'condition': {'exchange': 'NSE', 'last_price': 440,
    'tradingsymbol': 'ADANIGREEN', 'trigger_values': [435],
    'instrument_token': 912129}, 'orders': [{'exchange': 'NSE',
    'tradingsymbol': 'ADANIGREEN',
    'product': 'CNC', 'order_type': 'LIMIT',
    'transaction_type': 'SELL', 'quantity': 1, 'price': 435, 'result': None}], }
  • VarunAgw
    @rakeshr

    https://pastebin.com/raw/6NKK1C9q

    Seems like the bug is in PHP SDK. If you see the raw request, "40" is not included at all.
Sign In or Register to comment.