Unknown `tradingsymbol` when running on AWS EC2 instance

Savita
Hi,
i have a code which is running correctly and placing orders through kite api on PyCharm on my mac
however when i run the same code on ubuntu instance on AWS EC2 is getting the following error stack?

Exchange Downloaded..
2022-01-25 16:15:31.380933+00:00
placed 0, stay_in_trade 0, first_run Y
Entry 1 and Quantity 1
NATURALGAS22FEBFUT : BUY Order Unknown `tradingsymbol`.
Unknown `tradingsymbol`.
Traceback (most recent call last):
File "Swing_NG.py", line 152, in place_order
order_id = kite.place_order(
File "/home/ubuntu/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 355, in place_order
return self._post("order.place",
File "/home/ubuntu/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 841, in _post
return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
File "/home/ubuntu/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 913, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.InputException: Unknown `tradingsymbol`.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Swing_NG.py", line 196, in start_place_order
trade_id = place_order(df.iloc[0]["tradingsymbol"], "BUY", df_ha.iloc[-2]["high"], 1)
File "Swing_NG.py", line 171, in place_order
order_id = kite.place_order(
File "/home/ubuntu/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 355, in place_order
return self._post("order.place",
File "/home/ubuntu/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 841, in _post
return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
File "/home/ubuntu/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 913, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.InputException: Unknown `tradingsymbol`.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Swing_NG.py", line 441, in
trailing()
File "Swing_NG.py", line 285, in trailing
start_place_order(1,1)
File "Swing_NG.py", line 219, in start_place_order
senderrormail("Placing order",c, date, time)
File "Swing_NG.py", line 134, in senderrormail
context = ssl.create_default_context()

  • Savita
    changing it to "MCX" instead of kite.EXCHANGE_MCX solved this.
    thanks for an earlier post on this
This discussion has been closed.