Group Details Private

Global Moderators

Forum wide moderators

  • RE: Error in Subscribed Feed

    Hi @mukul ,

    Try to do

       print(message)
    

    before your print statement.

    Currently your are subscribed to these feeds

    {'symbol': 'NIFTY17AUGFUT', 'exchange': 'NSE_FO', 'timestamp': '1503478818000', 'ltp': 9822.35, 'instrument': Instrument(exchange='NSE_FO', token=62729, parent_token=26000, symbol='nifty17augfut', name='', closing_price=9784.65, expiry='1504117800000', strike_price=None, tick_size=5.0, lot_size=75, instrument_type='FUTIDX', isin=None), 'close': 9784.65}
    ERROR:websocket:error from callback <bound method Upstox._on_data of <upstox_api.api.Upstox object at 0x7ff98eccbda0>>: 'ltt'
    {'spot_price': 9813.15, 'atp': 9816.7, 'asks': [{'price': 9822.5, 'orders': 1, 'quantity': 150}, {'price': 9822.7, 'orders': 1, 'quantity': 150}, {'price': 9822.9, 'orders': 1, 'quantity': 75}, {'price': 9823.0, 'orders': 2, 'quantity': 375}, {'price': 9823.7, 'orders': 2, 'quantity': 375}], 'high': 9833.0, 'bids': [{'price': 9822.3, 'orders': 1, 'quantity': 225}, {'price': 9822.2, 'orders': 1, 'quantity': 75}, {'price': 9821.75, 'orders': 1, 'quantity': 75}, {'price': 9821.6, 'orders': 1, 'quantity': 375}, {'price': 9821.55, 'orders': 4, 'quantity': 975}], 'instrument': Instrument(exchange='NSE_FO', token=62729, parent_token=26000, symbol='nifty17augfut', name='', closing_price=9784.65, expiry='1504117800000', strike_price=None, tick_size=5.0, lot_size=75, instrument_type='FUTIDX', isin=None), 'timestamp': '1503478818000', 'open': 9811.0, 'vtt': 4647600.0, 'ltt': 1503478818000, 'lower_circuit': 8806.2, 'total_sell_qty': 648225, 'yearly_low': None, 'low': 9797.0, 'symbol': 'NIFTY17AUGFUT', 'ltp': 9822.35, 'total_buy_qty': 637425, 'exchange': 'NSE_FO', 'upper_circuit': 10763.15, 'oi': 24917250.0, 'close': 9784.65}
    NIFTY17AUGFUT   1503478818000   9822.35   1503478818000   9813.15   75   9821.55   975   9823.7   37
    

    as it seems you are subscribed for both LTP and FULL feed for "NIFTY17AUGFUT".

    Thanks,
    Alok Gaira

    posted in Python
  • RE: Error in Subscribed Feed

    @mukul ,

    You will get ltp only when you subscribe from full feed i.e "LiveFeedType.Full" if you have subscribed it for "LiveFeedType.LTP: it will through error because message dict won't have "ltt" key.

    Can you please confirm it?

    Thanks,
    Alok Gaira

    posted in Python
  • RE: Error in Subscribed Feed

    Hi @mukul ,

    Please make a call to u.get_master_contract('NSE_FO') before initiating your socket
    or
    don't print ['instrument'][9], it will only get created once you have called the u.get_master_contract('NSE_FO') API.

    Thanks,
    Alok GAira

    posted in Python
  • RE: Error in Subscribed Feed

    Hi @mukul ,

    It's your six digit id which you used while login.

    Thanks,
    Alok GAira

    posted in Python
  • RE: Error in Subscribed Feed

    Hi,

    Can you please tell your ucc. Also can you please verify which version of python library you are using.

    Thanks,
    Alok Gaira

    posted in Python
  • RE: Internal Server Error

    Hi @sedhuait ,

    Can you try it now, I think it's resolved for 3 you access tokens.

    Thanks,
    Alok Gaira

    posted in Upstox API
  • RE: Internal Server error

    Hi @sedhuait ,

    Can you please comment out that request for now.
    It won't get fixed on today trading session because most probably it requires a server restart which we can't do in between a trading session.

    Thanks,
    Alok Gaira

    posted in NodeJS
  • RE: Error in get_order_history

    Hi, @ganesh ,

    The answer to your queries are:

    1. The scenarios are
    (i) place an order and your socket get disconnected or your program crashed(you missed the order_updates).
    (ii) You place an order and our server crashed we restarted the server but you missed the order updates.

    2.For various order, the sequence of order updates are like this

    Complete Order
    put order req received --> validation pending --> open pending --> open --> complete
    Cancelled Order
    put order req received --> validation pending --> open pending --> open --> cancel pending --> cancelled --> cancelled
    Modify Complete Order
    put order req received --> validation pending --> open pending --> open --> modify validation pending --> modify pending --> modified --> open --> cancel pending --> cancelled --> cancelled
    Modified Cancelled AMO
    after market order req received --> modify after market order req received --> put order req received --> validation pending --> open pending --> open --> cancel pending --> cancelled --> cancelled
    Mkt Complete Order
    put order req received --> validation pending --> open pending --> open --> complete

    If you are clever enough you can check the sequence of order_updates and find the missed order update.

    But most probably you will miss an update if you socket gets disconnected.

    3. Fetch "get_order_history" once at the start and append all the order update from socket to it.

    We will try to give a DEMO on it in future, or append it in our library.

    Thanks,
    Alok Gaira

    posted in Python
  • RE: Internal Server error

    Hi @sedhuait ,

    We are working on the issue.

    Till that time can you generate a new access token and see if the API is working on it.

    Thanks,
    Alok Gaira

    posted in NodeJS
  • RE: placeOrder response inconsistent for order type SL-M

    Hi @AbhiShah ,

    Thanks for informing.
    It's an issue from our side we will try to resolve it ASAP.

    Thanks,
    Alok Gaira

    posted in Upstox API

Looks like your connection to Upstox Forum was lost, please wait while we try to reconnect.