You can now control the order type from webhooks with the new field named orderType
. The orderType
field is optional. If not specified, the default order type configured in your strategy subscription settings will be applied. The supported values for the orderType
field are:
A market order is the simplest type of order, executed immediately at the current market price. This ensures quick execution but does not guarantee a specific price.
{
"ticker": "SQ",
"action": "buy",
"orderType": "market"
}
Language:JSON
A limit order allows you to specify the maximum price you are willing to pay when buying a stock, or the minimum price you are willing to accept when selling a stock. This ensures that you do not pay more or receive less than this specified price for the stock.
For example, to set up a limit order to buy the ticker symbol SQ
at a maximum price of $200
, you would use the following JSON structure:
{
"ticker": "SQ",
"action": "buy",
"orderType": "limit",
"limitPrice": 200
}
Language:JSON
A stop limit order combines the features of a stop order and a limit order. When you place a stop limit order, you specify two prices: the stopPrice
and the limitPrice
. The order will only be executed at the specified limit price or better, but only after the stock price reaches the stop price. This type of order gives you control over the price at which the order should be executed, helping to limit losses or protect profits.
For example, to place a stop limit order for the ticker symbol SQ
to buy at a limit price of $200
only after the price rises to $201
, you would use the following JSON structure:
{
"ticker": "SQ",
"action": "buy",
"orderType": "stop_limit",
"stopPrice": 201,
"limitPrice": 200
}
Language:JSON
In this example, the action
is set to "buy," indicating a purchase. The orderType
is stop_limit
, specifying that this is a stop limit order. The stopPrice
is set at $201
, which is the price the stock must reach before your limit order is placed. Finally, the limitPrice
is set at $200
, indicating the maximum price you are willing to pay per share.
In this example, the orderType
is trailing_stop
, featuring a trailPercent
of 2%
. This configuration means that the order to sell the stock will activate when its price falls 2%
below its peak value since the order's initiation. This mechanism allows investors to safeguard their gains by setting up an automatic sell trigger in response to price declines.
{
"ticker": "SQ",
"action": "sell",
"orderType": "trailing_stop",
"trailPercent": 2
}
Language:JSON
Instead of a percentage, you can specify a trailing stop order with a fixed dollar amount using the trailAmount
field. This means the order will be executed once the asset's price moves against the direction of the trade by the specified dollar amount from its peak value since the order was placed.
{
"ticker": "SQ",
"action": "sell",
"orderType": "trailing_stop",
"trailAmount": 5
}
Language:JSON
In this example, buying MSFT
stocks is triggered when their price decreases by $5
from the highest price since the order was placed. This method is particularly useful for stocks with higher volatility, as it allows for more precise control over the execution price.
With the addition of the orderType
field in TradersPost, you now have more control and flexibility over your trading strategies. Whether you're using market orders, limit orders, stop orders, or trailing stops, you can tailor each trade to fit your specific needs. We hope you find these new options useful and that they help you achieve your trading goals more effectively. If you have any questions or need assistance, our team is here to help. Happy trading!
DISCLAIMER:
Trading in the financial markets involves a significant risk of loss. The content and strategies shared by TradersPost are provided for informational or educational purposes only and do not constitute trading or investment recommendations or advice. The views and opinions expressed in the materials are those of the authors and do not necessarily reflect the official policy or position of TradersPost.
Please be aware that the authors and contributors associated with our content may hold positions or trade in the financial assets, securities, or instruments mentioned herein. Such holdings could present a conflict of interest or influence the perspective provided in the content. Readers should consider their financial situation, objectives, and risk tolerance before making any trading or investment decisions based on the information shared. It is recommended to seek advice from a qualified financial advisor if unsure about any investments or trading strategies.
Remember, past performance is not indicative of future results. All trading and investment activities involve high risks and can result in the loss of your entire capital. TradersPost is not liable for any losses or damages arising from the use of this information. All users should conduct their own research and due diligence before making financial decisions.