Market price type
The Market price type is which quote price TradersPost uses when it needs a market price: for a signal with no price, or to work out a relative take profit or stop loss from a market order. Leave it on Strategy default to use the strategy's setting, which is the mark (the midpoint of the bid and ask) unless you changed it. The choices are:
- Bid/Ask (
ask_bid): the ask price for buys and the bid price for sells. - Midpoint (
mark): halfway between the bid and the ask. - Bid (
bid) and Ask (ask). - Last (
last): the last traded price.
In a signal's JSON the field is marketPriceType: one of ask_bid, mark, ask, bid or last. It is used when the signal has no price of its own. For example, a limit order with no limitPrice is priced from the quote this way:
Bid/Ask:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"marketPriceType": "ask_bid"
}
Midpoint:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"marketPriceType": "mark"
}
Bid:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"marketPriceType": "bid"
}
Ask:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"marketPriceType": "ask"
}
Last:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"marketPriceType": "last"
}
A price in the signal is used instead of a quote, so with a limitPrice the type changes nothing for that price:
{
"ticker": "AAPL",
"action": "buy",
"orderType": "limit",
"limitPrice": 100
}
A broker that cannot quote on the server needs a price in the signal (see Signal price).
Ready to put Market price type to work?
Free 7-day trial
Set-up in 3 minutes
Paper account for testing
By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.