API Support Forum
OEC API > API Support > COM API: SIM OE Option Price Error
Author Topic: COM API: SIM OE Option Price Error
(6 messages, Page 1 of 1)
Moderators: VPfau
CM4645
Posts: 33
Joined: Oct 25, 2022


Posted: Oct 17, 2023 @ 07:32 AM             Msg. 1 of 6
Given the issues with pricing in the sim environment for OE options, would it be possible to apply a fix that would match any long/short order with the current ask/bid? If necessary, I can provide supporting price matching errors I am currently receiving from the sim environment.

Thanks,
Chris
CM4645
Posts: 33
Joined: Oct 25, 2022


Posted: Oct 20, 2023 @ 09:12 AM             Msg. 2 of 6
Couple examples from this AM of price discrepancy:

(First line is the submitted order price, second line is the fill price)

10/20/2023 8:24:01 AM Order State -7 Sent OEW3V23 C4295 Buy 1 Limit 15.5
10/20/2023 8:24:02 AM Fill 213168781 Working OEW3V23 C4295 Buy 1 Limit 13

10/20/2023 8:24:02 AM Order State -8 Sent OEW3V23 C4300 Sell 1 Limit 11.5
10/20/2023 8:24:03 AM Fill 213168782 Working OEW3V23 C4300 Sell 1 Limit 12.25

10/20/2023 8:40:39 AM Order State -11 Sent OEW3V23 C4300 Buy 1 Limit 15.5
10/20/2023 8:40:40 AM Fill 213168785 Working OEW3V23 C4300 Buy 1 Limit 12.5

10/20/2023 8:45:41 AM Order State -15 Sent OEW3V23 P4275 Buy 1 Limit 8.35
10/20/2023 8:45:42 AM Fill 213168789 Working OEW3V23 P4275 Buy 1 Limit 5.9

Code to open position short:

PlaceOrder(client, contractVar, OrderSide.Sell, OrderType.Limit, orderQty: 1, limitPrice: contractVar.PositionContract.CurrentPrice.BidPrice - 0.5);


Code to close:

PlaceOrder(client, contractVar, OrderSide.Buy, OrderType.Limit, orderQty: Math.Abs(positionVar.Net.Volume), limitPrice: contractVar.PositionContract.CurrentPrice.AskPrice + 0.5);
CMicciche902
Posts: 348
Joined:


Posted: Oct 24, 2023 @ 12:27 PM             Msg. 3 of 6
Please do not expect fills to be realistic in our simulator.
Chris M
CM4645
Posts: 33
Joined: Oct 25, 2022


Posted: Oct 25, 2023 @ 08:21 PM             Msg. 4 of 6
Chris,
Yes, understood. But at a minimum, it should at least match the current ask/bid for a corresponding long/short order. Is there something I am missing on why this couldnt be approached in this way?
CMicciche902
Posts: 348
Joined:


Posted: Oct 26, 2023 @ 08:22 AM             Msg. 5 of 6
No, not necessarily in the simulator. Fills may not be realistic.
Chris M
CM4645
Posts: 33
Joined: Oct 25, 2022


Posted: Oct 26, 2023 @ 09:50 AM             Msg. 6 of 6
Chris,
Sorry to belabor the point, but why not implement a simple matching approach based on whether its a long/short order and the current ask/bid? In real trading, hitting the ask for a long order will result in an immediate fill. And hitting the bid will result in an immediate fill for a short order.

Obviously, this wont help a strategy that is intended to split the bid/ask etc., but this would be a major step forward in accuracy and I would assume low development time.