Hi, I read the comment: "Dummy Broker Error with IBKR: Could not obtain quote"
https://www.wealth-lab.com/Discussion/Dummy-Broker-Error-with-IBKR-Could-not-obtain-quote-10217
In my case I use Schwab as streaming data provider.
I am using the dummy broker to debug my trading strategy.
I am able to get SPY option quotes in my Strategy a few times in a minute.
This strategy is run every 10 seconds.
However, when a
var task = Task.Run(() => PlaceTrade(_obars, TransactionType.Buy, OrderType.Market, 0, SignalName));
occurs, and I have Auto-Stage set in the Streaming Chart
The signal is staged in the Order Manager.
But if Auto-Place is set then I get a "Could not obtain quote for SPY251219P685" response and the order is not placed.
a) In the above mentioned comment, you suggest the user to try IBKR paper trading.
I am not sure if Schwab offers a paper trading account.
b) Can you please indicate why it is possible to obtain Schwab option quotes via C# but the Order Manager is not able to do so.
c) Is it possible to capture programmatically the response "Could not obtain quote ..."?
d) Is a fix possible?


I need to be able to place dummy broker option orders to debug the rest of my trading code.
Thanks!
https://www.wealth-lab.com/Discussion/Dummy-Broker-Error-with-IBKR-Could-not-obtain-quote-10217
In my case I use Schwab as streaming data provider.
I am using the dummy broker to debug my trading strategy.
I am able to get SPY option quotes in my Strategy a few times in a minute.
This strategy is run every 10 seconds.
However, when a
var task = Task.Run(() => PlaceTrade(_obars, TransactionType.Buy, OrderType.Market, 0, SignalName));
occurs, and I have Auto-Stage set in the Streaming Chart
The signal is staged in the Order Manager.
But if Auto-Place is set then I get a "Could not obtain quote for SPY251219P685" response and the order is not placed.
a) In the above mentioned comment, you suggest the user to try IBKR paper trading.
I am not sure if Schwab offers a paper trading account.
b) Can you please indicate why it is possible to obtain Schwab option quotes via C# but the Order Manager is not able to do so.
c) Is it possible to capture programmatically the response "Could not obtain quote ..."?
d) Is a fix possible?
I need to be able to place dummy broker option orders to debug the rest of my trading code.
Thanks!
Rename
Hmm, do you have Schwab enabled (check box checked) in the Data Manager, Historical Providers tab?
Yes. Please see data manager historical and streaming tabs in the attached images.

By the way, if the same option order is entered manually in Order Manager the same response "Could not obtain quote ..." also comes back. I can stage it but not place it.
SPY251219P685 is the wrong option symbology format for Schwab.
See Help > Extensions > Schwab > Options.
See Help > Extensions > Schwab > Options.
I tried both formats in Order Manager with the same error message.
Please see attached image.
A question on this subject:
- If streaming provider is Schwab should the Dummy Broker format be the same as Schwab or Dummy Broker has its own format.
- I picked up the dummy format from one of the posts.
Please see attached image.
A question on this subject:
- If streaming provider is Schwab should the Dummy Broker format be the same as Schwab or Dummy Broker has its own format.
- I picked up the dummy format from one of the posts.
I am double checking my Schwab format per the Help/Extensions/Schwab/Options.
Will get back to you.
Thanks for all the help today!
Will get back to you.
Thanks for all the help today!
I am able to get quotes from Schwab as follows:
string optSym = SchwabHistorical.Instance.GetOptionsSymbol(_spy, optionTypeHere, price, currentDate, minDaysToExpiry, weeklies, allowExpired, closestStrike);
line 24963: optSym fm OptionNameAtTheMoney: SPY 251219C00685000
line 24841 option name: SPY 251219C00685000 last price: 6.61 underlying price: 684.76 bidPrice: 6.55 askPrice: 6.59
string optSym = SchwabHistorical.Instance.GetOptionsSymbol(_spy, optionTypeHere, price, currentDate, minDaysToExpiry, weeklies, allowExpired, closestStrike);
Feeding this into Order Manager: same error message.

string optSym = SchwabHistorical.Instance.GetOptionsSymbol(_spy, optionTypeHere, price, currentDate, minDaysToExpiry, weeklies, allowExpired, closestStrike);
line 24963: optSym fm OptionNameAtTheMoney: SPY 251219C00685000
line 24841 option name: SPY 251219C00685000 last price: 6.61 underlying price: 684.76 bidPrice: 6.55 askPrice: 6.59
string optSym = SchwabHistorical.Instance.GetOptionsSymbol(_spy, optionTypeHere, price, currentDate, minDaysToExpiry, weeklies, allowExpired, closestStrike);
Feeding this into Order Manager: same error message.
Small typo from Schwab entry in WL8:
ddd is referenced below as nnn
Schwab-standard option symbol format (uppercase only) RRRRRRYYMMDDsWWWWWddd where:
○ R is a 6-character space-filled root
○ YYMMDD is the expiration year, month, and day
○ s is the side: C/P (call/put)
○ WWWWW is the whole portion of the strike price, zero-filled
○ nnn is the decimal portion of the strike price, zero-filled
Example: June 17, 2022 ATVI Call 67.5 Strike: ATVI 061722C00067500
ddd is referenced below as nnn
Schwab-standard option symbol format (uppercase only) RRRRRRYYMMDDsWWWWWddd where:
○ R is a 6-character space-filled root
○ YYMMDD is the expiration year, month, and day
○ s is the side: C/P (call/put)
○ WWWWW is the whole portion of the strike price, zero-filled
○ nnn is the decimal portion of the strike price, zero-filled
Example: June 17, 2022 ATVI Call 67.5 Strike: ATVI 061722C00067500
The Dummy Broker requires a provider that can return a chart with a partial bar for quotes for the symbol.
It ain't gonna happen with options for Schwab.
Thinking out loud, add a feature request to modify WL's Data Valet to change automatically change option symbol formats on a per Provider basis.
For example, say the request is for SPYwww251219C00685000 (www are white spaces). Schwab will return null since it doesn't currently provider option historical data. The Data Valet could move to the next provider, say it's IB, and change the format to SPY251219C685 using the OptionsHelper.ConvertSymbol().
It could open a can of worms in practice... the bars.Symbol would have to be modified to the original symbol, for example.
It ain't gonna happen with options for Schwab.
Thinking out loud, add a feature request to modify WL's Data Valet to change automatically change option symbol formats on a per Provider basis.
For example, say the request is for SPYwww251219C00685000 (www are white spaces). Schwab will return null since it doesn't currently provider option historical data. The Data Valet could move to the next provider, say it's IB, and change the format to SPY251219C685 using the OptionsHelper.ConvertSymbol().
It could open a can of worms in practice... the bars.Symbol would have to be modified to the original symbol, for example.
Maybe we can make it happen. So, Schwab is able to deliver streaming quotes for the options symbol but not historical data?
No historical, no streaming.
Only snapshots via the methods described in the Help.
Only snapshots via the methods described in the Help.
Thank you for considering options to remedy this issue.
I have a data table (with an updated image in the file system) that is constantly getting filled with option quotes (SPY at the money). It alternates between C and P unless there is a position at which time it reverts to the polarity of the position. This is from Schwab using the calls you have provided in help/extensions/Schwab.
A solution from you would obviously be better. I was thinking of cooking up a simple dummy broker by writing to a file that contains a list of Position objects modified somewhat.
PlaceTrade(buy) => PlaceTrade with OrderManager in auto-stage mode.
(+) add a Positions object entry into the positions file
GetPositionsAllSymbols => read the positions file and search for the most recent entry date of the correct polarity and of correct signal name. If found buy is complete.
PlaceTrade(sell) => PlaceTrade with OrderManager in auto-stage mode.
(+) in the positions file find the latest entry with the correct options name
(+) update this entry with exit price and time
GetPositionsAllSymbols => read the positions file and search for the most recent entry date of the correct polarity and of correct signal name. If found sell is complete.
Now the round trip is complete.
Four related questions: the answers to the first two are probably yes.
1) Does Schwab allow options trading via API? TD Ameritrade allowed this. But Fidelity did not.
2) Has someone in the community placed options trades with Schwab? I see one recent comment.
3) Does Schwab allow paper trading of options
4) Do you think it is possible to add ask size and bid size to the quote. TDA had provided this. I would think Schwab does as well. The most recent Schwab build (10) did not have it.
Thanks again for your help and for a great unique product.
I have a data table (with an updated image in the file system) that is constantly getting filled with option quotes (SPY at the money). It alternates between C and P unless there is a position at which time it reverts to the polarity of the position. This is from Schwab using the calls you have provided in help/extensions/Schwab.
A solution from you would obviously be better. I was thinking of cooking up a simple dummy broker by writing to a file that contains a list of Position objects modified somewhat.
PlaceTrade(buy) => PlaceTrade with OrderManager in auto-stage mode.
(+) add a Positions object entry into the positions file
GetPositionsAllSymbols => read the positions file and search for the most recent entry date of the correct polarity and of correct signal name. If found buy is complete.
PlaceTrade(sell) => PlaceTrade with OrderManager in auto-stage mode.
(+) in the positions file find the latest entry with the correct options name
(+) update this entry with exit price and time
GetPositionsAllSymbols => read the positions file and search for the most recent entry date of the correct polarity and of correct signal name. If found sell is complete.
Now the round trip is complete.
Four related questions: the answers to the first two are probably yes.
1) Does Schwab allow options trading via API? TD Ameritrade allowed this. But Fidelity did not.
2) Has someone in the community placed options trades with Schwab? I see one recent comment.
3) Does Schwab allow paper trading of options
4) Do you think it is possible to add ask size and bid size to the quote. TDA had provided this. I would think Schwab does as well. The most recent Schwab build (10) did not have it.
Thanks again for your help and for a great unique product.
Your Response
Post
Edit Post
Login is required