Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Warning!] ETrade API *sever* bug: Stop Price and Trailing Stop Parameter are swapped! #57

Open
mw66 opened this issue Dec 10, 2021 · 4 comments
Labels

Comments

@mw66
Copy link
Contributor

mw66 commented Dec 10, 2021

with this parameter:

[ place_equity_order()] {'accountId': 'xxx', 'symbol': 'STLD', 'orderAction': 'SELL', 'clientOrderId': xxx,
 'priceType': 'TRAILING_STOP_CNST', 'offsetType': 'TRAILING_STOP_CNST',
 'offsetValue': '0.66', 'trailPrice': '0.66', 'stopPrice': '64.49', 'allOrNone': False,
 'quantity': 50, 'orderTerm': 'GOOD_UNTIL_CANCEL', 'marketSession': 'REGULAR'}

I saw the placed order is:

STLD
Initial Stop Price: 0.66
Trailing Stop Parameter: 64.49 point(s) below bid

This is ridiculous: the Initial Stop Price and Trailing Stop Parameter are swapped!

I contacted ETrade customer service, this is what they said:

The current trailing stop price is set in "stopPrice" field

I cannot believe it, looks like they are not going to fix their bugs!

@jessecooper
Copy link
Owner

@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.

@mw66
Copy link
Contributor Author

mw66 commented Dec 13, 2021

Yes, let's doc it.

@rahulrajaram
Copy link

rahulrajaram commented Dec 28, 2022

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>
  • do not pass trailPrice for trailing stops; pass that value via stopPrice
  • API does not allow TRAILING_STOP_PRCT orders on options, so you'll have to stick to TRAILING_STOP_CNST's

Copy link

github-actions bot commented Nov 8, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Nov 8, 2024
@jessecooper jessecooper removed the Stale label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants