How about Python libraries like ultrafinance and PyAlgoTrader?
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It only takes a minute to sign up.Sign up to join this community
At the moment QuantConnect doesn't have bid & ask data.
However, I've been using limit orders in my backtests, and adjusting the limit orders. I'm guessing what they do is fill your limit order according to the trades coming in... so limit order backtests 'steal' the trades as they come in, until your limit order is filled.
For low volume stocks with big spreads, your limit order may not get filled for a long time...
Their 'standard' Order() method just fills your order at the current price.
You can also model slippage ( 1/10th of 1% in this example):
Securities[symbol].SlippageModel = new ConstantSlippageModel(0.001m);
All that said, there really is no good way to model bid/ask in a backtest, because in the real world, placing a large-ish limit order often scares off real world traders.
QuantConnect uses L1 data (bid and ask quotes) for its US Equities Backtesting.
QuantConnect has a full break down of the data library, including free data for download in LEAN format at the data library page: https://www.quantconnect.com/data
US Equities - Trades and Quotes data in tick, second, minute, hour and daily bars. Quote data was added to backtesting in April 2020.
US Fundamentals - MorningStar corporation fundamentals.
FOREX & CFD - Quotes; Tick, second, minute, hour and daily bars for FXCM and Oanda market providers. Bars are from the midpoint of the quote data.
US Options - Trade and Quote Minute Bars.
US Futures - Trades, Quotes; Tick, second, minute, hour and daily bars.
(Disclosure, I am the Founder of QuantConnect)
Edit: Updated state of Futures and Options, and US Equity Quote.