GithubHelp home page GithubHelp logo

Comments (3)

jessecooper avatar jessecooper commented on May 27, 2024

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

from pyetrade.

mw66 avatar mw66 commented on May 27, 2024

Yes, let's doc it.

from pyetrade.

rahulrajaram avatar rahulrajaram commented on May 27, 2024

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

from pyetrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.