Hi Sir,
As observed, the market login and interactive login are working correctly on our end. We are successfully able to:
Fetch the instrument file
Retrieve quotes, LTP, and historical data
Proceed with order placement without any issues
However, in your API setup, it appears that the interactive login is not completing successfully. Due to this, errors are occurring while accessing the instrument file and related functionalities.
For your reference, below is the exact code snippet being used from our end:
from XTS_Tradehull import Tradehull
import pdb
import datetime
from datetime import timedelta
import pprint as pprint
import pandas as pd
tsl = Tradehull(
interactive_key=“YOUR_INTERACTIVE_API_KEY”,
interactive_secret=“YOUR_INTERACTIVE_SECRET”,
market_key=“YOUR_MARKET_API_KEY”,
market_secret=“YOUR_MARKET_SECRET”,
client_code=“YOUR_CLIENT_CODE”,
root_url=“https://ttblaze.iifl.com”
)
pdb.set_trace()
quote_data = tsl.get_quote(‘YESBANK-EQ’)
print(quote_data)
ltp_nifty = tsl.get_ltp(“NIFTY”)
print(“NIFTY LTP:”, ltp_nifty)
ltp_yesbank = tsl.get_ltp(“YESBANK-EQ”)
print(“YESBANK LTP:”, ltp_yesbank)
Additionally, we inspected the internal object state for debugging:
tsl.xts1.dict
Snapshot:
{
‘debug’: False,
‘apiKey’: ‘',
‘secretKey’: '’,
‘source’: ‘WEBAPI’,
‘disable_ssl’: True,
‘root’: ‘https://ttblaze.iifl.com’,
‘timeout’: 7,
‘token’: ‘',
‘userID’: '’,
‘vendorClient’: True
}
This confirms that:
Base configuration is correct
Token is being generated
Market data APIs are functioning
However, the interactive session is not getting established properly, which is likely the root cause of the issue.
Request you to please:
Recheck the interactive API credentials (key & secret)
Ensure that interactive trading API access is enabled for the account
Validate the interactive login flow from your end
Please let us know if any further details are required.
Best regards,
Jigyanshu Sharma