Open mw66 opened 2 years ago
@mw66 I appreciate the heads up but I am unsure what to do with this issue. I think the best course of action for this project would be to make a known issues section in the docs.
Yes, let's doc it.
This drove me nuts for a day. See instruction on page 22 here:
stopPrice
The designated boundary price for a stop order. For trailing stop orders this will
represent the dollar amount or percentage trailing value. Enter percentages as
whole numbers.
A PreviewOrderRequest example for options:
<PreviewOrderRequest>
<Order>
<Instrument>
<Product>
<callPut>CALL</callPut>
<expiryDay>...</expiryDay>
<expiryMonth>...</expiryMonth>
<expiryYear>...</expiryYear>
<securityType>OPTN</securityType>
<strikePrice>4.00</strikePrice>
<symbol>...</symbol>
</Product>
<orderAction>SELL_CLOSE</orderAction>
<quantity>1</quantity>
</Instrument>
<allOrNone>false</allOrNone>
<marketSession>REGULAR</marketSession>
<orderTerm>GOOD_UNTIL_CANCEL</orderTerm>
<priceType>TRAILING_STOP_CNST</priceType>
<offsetType>TRAILING_STOP_CNST</offsetType>
<stopPrice>0.15</stopPrice>
</Order>
<clientOrderId>...</clientOrderId>
<orderType>OPTN</orderType>
</PreviewOrderRequest>
trailPrice
for trailing stops; pass that value via stopPrice
TRAILING_STOP_PRCT
orders on options, so you'll have to stick to TRAILING_STOP_CNST
's
with this parameter:
I saw the placed order is:
This is ridiculous: the Initial Stop Price and Trailing Stop Parameter are swapped!
I contacted ETrade customer service, this is what they said:
I cannot believe it, looks like they are not going to fix their bugs!