I understand that Securities[symbol].Price can give the latest price. But how about bid/ask? Tried Securities[s].Bid and Securities[s].Ask, did not work...
Many thanks.
QUANTCONNECT COMMUNITY
I understand that Securities[symbol].Price can give the latest price. But how about bid/ask? Tried Securities[s].Bid and Securities[s].Ask, did not work...
Many thanks.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Link Liang
Hi QQQ,
Where are you trying to access Securities[s].Bid and Securities[s].Ask? Could you share your code so that we can address in details? Notice that there is a “insert code snippet” tool in forum toolbar, or you could also share your backtest.
Moreover, Securities[s].Bid and Securities[s].Ask are only available for Forex and Future asset types. You may find more information here. For equity and option, you may want to look at here.
Hope it helps!
Erik Bengtson
I dont know if python is different, but in C# use Securities[s].BidPrice and Securities[s].AskPrice
QQQ VVV
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!