Get position data is not proper

I am using the following piece of code,

get_position_url = https://api.upstox.com/v2/portfolio/short-term-positions
headers = {
    'Accept': 'application/json',
    'Authorization': f'Bearer {live_access_token}'
}

try:
    response = requests.get(get_position_url, headers=headers, data=payload)
    response.raise_for_status()
    json_data = response.json()
except Exception as e:
    print(f" Error fetching positions: {e}")
    return 0

but i am getting the output of json_data,
{‘status’: ‘success’, ‘data’: [{‘exchange’: ‘NFO’, ‘multiplier’: 0.0, ‘value’: 0.0, ‘pnl’: 0.0, ‘product’: ‘I’, ‘instrument_token’: ‘’, ‘average_price’: 0.0, ‘buy_value’: 0.0, ‘overnight_quantity’: 0, ‘day_buy_value’: 32471.25, ‘day_buy_price’: 0.0, ‘overnight_buy_amount’: 0.0, ‘overnight_buy_quantity’: 0, ‘day_buy_quantity’: 0, ‘day_sell_value’: 30465.0, ‘day_sell_price’: 0.0, ‘overnight_sell_amount’: 0.0, ‘overnight_sell_quantity’: 0, ‘day_sell_quantity’: 0, ‘quantity’: 0, ‘last_price’: 0.0, ‘unrealised’: 0.0, ‘realised’: 0.0, ‘sell_value’: 0.0, ‘tradingsymbol’: ‘’, ‘trading_symbol’: ‘’, ‘close_price’: 0.0, ‘buy_price’: 0.0, ‘sell_price’: 0.0}]}
NSE_FO|40476 not found in position data.

I am checking for the “NSE_FO|40476” instrument as i have executed this particular instrument.

1 Like

@nandhini_manickam Could you please share 6 digit UCC for further investigation ?

I think you are referring to user ID 404779

I am also facing this issue (id 00A2TG)

1 Like

Hi @AJEYA_B_4176078,

We are checking this and will get back to you soon, thanks.

I got the same issue. I posted it under my account. My id JD5715

Hi @SHIVA_GANG_3534354,

We will check this and will get back to you soon, thanks.

Same issue here from today afternoon.

Any updates on this?

Hi @nandhini_manickam/@AJEYA_B_4176078/@SHIVA_GANG_3534354/@ASHUTOSH_37141904,

This issue has been resolved. Could you please confirm you if the issue is still persisting for you’ll? Thanks.