It will throw an invalid token error message, which is correct, as there are no active instrument with instrument_token: 505737.
2. why data is not available
Because you are using an invalid instrument_token. You need to use the correct active instrument_token. Go through the historical data API documentation here.
but when I replace it with 1723649, it works
Yes, because 1723649 is the correct instrument token for NSE:JINDALSTEL. Go through the historical data FAQs here.
NSE:JINDALSTEL
. Go through the historical data FAQs here.