sorry my bad. i had initially tried for SPX then later was trying to see if SPY is working . hence when i pasted the code snippet it was SPY.?
But originally my intention was to get real time bars for SPX.
The code you had posted seems to be working. thanks alot. The mistake i had done , when i was originally trying SPX was
contract.exchange("SMART")?
contract.primaryExchance("CBOE")
the above two lines seems to be the issue, in your snippet you are setting the exhange to CBOE which seems to be helping.? ?
thanks again?