Keyboard Shortcuts
Likes
Search
Futures data for indian market
I am currently trying to fetch futures data for indian market, from what i see there is no extra commission for this data.?
"No security definition has been found for the request"
this is the error i get when i try to fetch historical data for furtures. configuration of the contract formed is : -? contract.secType("IND"); |
开云体育Go to the Exchange listing for NSE on IB’s website. Select ‘Indices’ as the product type. Then you will see that there are several contracts that begin with ‘NIFTY’, but they all have some kind of suffix, such as ‘NIFTYIT’ or ’NIFTYOIL’. In other words, ‘NIFTY’ is not a valid symbol (which is exactly what the error message is telling you). ? ? ? From: [email protected] <[email protected]> On Behalf Of ram.bharadwaj.arya@...
Sent: 20 February 2023 09:01 To: [email protected] Subject: [TWS API] Futures data for indian market ? I am currently trying to fetch futures data for indian market, from what i see there is no extra commission for this data.? "No security definition has been found for the request"
contract.secType("IND"); |
开云体育NIFTY50 and NIFTYIT with currency INR work fine for me. ? Please show your contract attributes again. ? ? From: [email protected] <[email protected]> On Behalf Of ram.bharadwaj.arya@...
Sent: 20 February 2023 09:53 To: [email protected] Subject: Re: [TWS API] Futures data for indian market ? tried NIFTY50 with INR, still the same issue. |
开云体育By the way, if you use my ContractInspector tool, freely available from the link below (Windows only), you can easily experiment with different contract parameters to see what they give you. This can save you lots of frustration: ? ? ? ? From: [email protected] <[email protected]> On Behalf Of Richard L King
Sent: 20 February 2023 10:00 To: [email protected] Subject: Re: [TWS API] Futures data for indian market ? NIFTY50 and NIFTYIT with currency INR work fine for me. ? Please show your contract attributes again. ? ? From: [email protected] <[email protected]> On Behalf Of ram.bharadwaj.arya@... ? tried NIFTY50 with INR, still the same issue. |
Its all same once you understand how to form a contract structure. Only changes would be the symbol, currency and exchange. If you have any confusion, better to use the tool Richard suggested. Trust me, it will save lot of your time.
I dont trade US market. So no working example from my end. However, the sample code has host of examples. You can look into ContractSamples.py? Closest that I found in ContractSamples.py - ?
? ? ? ? contract = Contract()
? ? ? ? contract.symbol = "ES";
? ? ? ? contract.secType = "FUT";
? ? ? ? contract.exchange = "QBALGO";
? ? ? ? contract.currency = "USD";
? ? ? ? contract.lastTradeDateOrContractMonth = "202003"; Remember, you should have subscription of US derivatives market data for that particular exchange |