Option contractPrint() function not printing ASK &BID

Posted By: avy

Option contractPrint() function not printing ASK &BID - 06/14/22 20:33

Hi,
I am trying to print live option chain using contractPrint() function to CSV file but for some reason it is not pulling Underlying, Ask, Bid & Vol columns or values . Not sure if i am doing something wrong here or missing anything . The script is simple

asset("QQQ");
Multiplier = 100;
contractUpdate(Asset,0,CALL|PUT);
contractPrint();

I am using IB for this on my live account. The idea is to save live option chain in CSV file with price and other information. Please your help on this be much appreciated.

Regards
Avy
Posted By: jcl

Re: Option contractPrint() function not printing ASK &BID - 06/15/22 08:58

IB option chains have no ask and bid. You need contractPrice() for gettng a contract price.
Posted By: avy

Re: Option contractPrint() function not printing ASK &BID - 06/18/22 10:58

Thank you JCL for your help!
© 2024 lite-C Forums