ValidateTpSlInputs
Inputs to validateTpSl. openPrice is the price the conditional order’s distance is measured against — the quote’s open price for a closed position, or the live mark price when validating against an open position (set isOpenPosition: true so error text reads accordingly).
Fields
openPricestringReference price for the distance/spread rules (decimal string).
positionTypePositionTypeQuote direction (LONG / SHORT).
pricePrecisionnumberMarket price precision — only used to render the “should be above/below X” hint.
configTpSlConfigLive handler /configs/ data.
takeProfitPricestringoptionalTP trigger price (decimal string). Omit when only setting an SL.
stopLossPricestringoptionalSL trigger price (decimal string). Omit when only setting a TP.
isOpenPositionbooleanoptionalWhen true, error text says “current price” instead of “open price”.
Related
validateTpSl— consumes these.TpSlValidation— the outcome.
Last updated on