UDAPI100060 Error

Everything was working fine untill yesterday. Below error from today. Is Upstox API server down today?

{‘status’: ‘error’, ‘errors’: [{‘errorCode’: ‘UDAPI100060’, ‘message’: ‘Resource not Found.’, ‘propertyPath’: None, ‘invalidValue’: None, ‘error_code’: ‘UDAPI100060’, ‘property_path’: None, ‘invalid_value’: None}]}

Hi @Rohit_K.A
Could you please check again? It should be working fine now. Also, kindly share the path once so we can investigate further.

Thanks!

Once again your API is behaving abruptly. Everything was working fine untill yesterday. Today morning issue suddenly.

url_positions = base_url + ‘/portfolio/short-term-positions’
positions = requests.get(url_positions, headers=headers)
positions = positions.json()
print(positions)

This should output both Status and Data but it is providing only status.

{‘status’: ‘success’}

Traceback (most recent call last):
File “/straddle.py”, line 767, in
pos_quantity_flag = CHECK_OPEN_POSITIONS()
File “/straddle.py”, line 750, in CHECK_OPEN_POSITIONS
positions = positions[‘data’]
KeyError: ‘data’
Script Failed!!

Hi @Rohit_K.A
Could you please check again? It should be working fine now.

Thanks!

Its working now. But why was it not working earlier. We lose track of strategies if this keeps occurring.

Could you please have a validation process before 9 AM every day and ensure API is up and running? This really helps. Thank you!

One more new issue in the morning was that data returned via “/order/retrieve-all” did not include the status_message key. It caused a big problem for me. Then suddenly after 15-20 minutes, it started working as expected.

This reduces the trust and confidence in robustness of the system, and causes to think about moving away.

Once again issue in API. I’m trying to execute orders in NIFTY and checking margin required. It says incorrect quantity?? How come it is incorrect? It was working finr until Friday

{‘instruments’: [{‘instrument_key’: ‘NSE_FO|69358’, ‘quantity’: 600, ‘transaction_type’: ‘BUY’, ‘product’: ‘D’, ‘price’: 6}, {‘instrument_key’: ‘NSE_FO|69220’, ‘quantity’: 600, ‘transaction_type’: ‘BUY’, ‘product’: ‘D’, ‘price’: 5}, {‘instrument_key’: ‘NSE_FO|69236’, ‘quantity’: 600, ‘transaction_type’: ‘SELL’, ‘product’: ‘D’, ‘price’: 116}, {‘instrument_key’: ‘NSE_FO|69237’, ‘quantity’: 600, ‘transaction_type’: ‘SELL’, ‘product’: ‘D’, ‘price’: 116}]}
{‘status’: ‘error’, ‘errors’: [{‘errorCode’: ‘UDAPI1104’, ‘message’: ‘Quantity should be multiple of lot size’, ‘propertyPath’: None, ‘invalidValue’: None, ‘error_code’: ‘UDAPI1104’, ‘property_path’: None, ‘invalid_value’: None}]}

@Rohit_K.A You’re trying to calculate margin for FINNIFTY options, not NIFTY . The lot size for FINNIFTY options is 65 , but the quantity you’ve passed is 600 , which isn’t a valid multiple of the lot size.

You can refer to the Instrument JSON file to check the correct lot sizes.

Thanks

Yes @SANDEEP_5469507
V2 websocket has been discontinued
Please refer to this post Deprecation of WebSocket v2 – Final Update

Thanks!

1 Like

how to migrate WebSocket v2 to v3

Hi @LOKESH_35264392
Migrating to V3 is very straightforward. If you’re using streamer functions, you only need to update the connection classes.
For example, here’s the one for Python: Upstox Python SDK — Market Data Streamer.

If you are decoding data from a proto file, you will need to update it to the following:
MarketDataFeed.proto.

For more details, please refer to the WebSocket V3 Documentation.

Thanks!