TpSlValidation
The outcome of validateTpSl. A discriminated union on ok: ok: true means every supplied side passed; ok: false carries per-side error strings so the UI can render them inline. The SDK never throws — the caller decides whether to surface, block, or proceed.
type TpSlValidation =
| { ok: true; tpError?: undefined; slError?: undefined }
| { ok: false; tpError?: string; slError?: string };Fields
okbooleanDiscriminant. true when every supplied side passed.
tpErrorstringoptionalTake-profit error message (only on the ok: false branch).
slErrorstringoptionalStop-loss error message (only on the ok: false branch).
Related
validateTpSl— produces this.ValidateTpSlInputs— the inputs.
Last updated on