import { FeeAsset, SelfTradePreventionMode, Side } from "../../gen/orders/v1/orders_pb.js"; import { TriggerEventType, TriggerLimitFok, TriggerLimitGtc, TriggerLimitIoc, TriggerStatus, TriggerType, TwapLimitGtc, TwapMarketIoc } from "../../gen/triggers/v1/triggers_pb.js"; import { SdkScales } from "../../shared/decimal-surface.js"; import * as v from "valibot"; //#region src/services/triggers/trigger-input.schemas.d.ts /** Builds the create-trigger boundary schema using catalog scales keyed by symbol ID. */ declare function createCreateTriggerInputSchema(scales: SdkScales): v.UnionSchema<[v.SchemaWithPipe; readonly execution: v.VariantSchema<"type", [v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"market_ioc", undefined>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_gtc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly postOnly: v.OptionalSchema, false>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_ioc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_fok", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>; readonly triggerType: v.LiteralSchema<"stop_loss", undefined>; readonly triggerPrice: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.CheckAction<{ side: "sell"; execution: { type: "market_ioc"; } | { type: "limit_gtc"; price: string; postOnly: boolean; } | { type: "limit_ioc"; price: string; } | { type: "limit_fok"; price: string; }; triggerType: "stop_loss"; triggerPrice: string; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, "SELL triggers must use the quote fee asset">, v.TransformAction<{ side: "sell"; execution: { type: "market_ioc"; } | { type: "limit_gtc"; price: string; postOnly: boolean; } | { type: "limit_ioc"; price: string; } | { type: "limit_fok"; price: string; }; triggerType: "stop_loss"; triggerPrice: string; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "stopLoss"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; } | { readonly case: "takeProfit"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>]>, v.SchemaWithPipe; readonly execution: v.VariantSchema<"type", [v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_gtc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly postOnly: v.OptionalSchema, false>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_ioc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_fok", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>; readonly triggerType: v.LiteralSchema<"stop_loss", undefined>; readonly triggerPrice: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.TransformAction<{ side: "buy"; execution: { type: "limit_gtc"; price: string; postOnly: boolean; } | { type: "limit_ioc"; price: string; } | { type: "limit_fok"; price: string; }; triggerType: "stop_loss"; triggerPrice: string; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "stopLoss"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; } | { readonly case: "takeProfit"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>]>, v.SchemaWithPipe; readonly execution: v.VariantSchema<"type", [v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"market_ioc", undefined>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_gtc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly postOnly: v.OptionalSchema, false>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_ioc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_fok", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>; readonly triggerType: v.LiteralSchema<"take_profit", undefined>; readonly triggerPrice: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.CheckAction<{ side: "sell"; execution: { type: "market_ioc"; } | { type: "limit_gtc"; price: string; postOnly: boolean; } | { type: "limit_ioc"; price: string; } | { type: "limit_fok"; price: string; }; triggerType: "take_profit"; triggerPrice: string; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, "SELL triggers must use the quote fee asset">, v.TransformAction<{ side: "sell"; execution: { type: "market_ioc"; } | { type: "limit_gtc"; price: string; postOnly: boolean; } | { type: "limit_ioc"; price: string; } | { type: "limit_fok"; price: string; }; triggerType: "take_profit"; triggerPrice: string; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "stopLoss"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; } | { readonly case: "takeProfit"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>]>, v.SchemaWithPipe; readonly execution: v.VariantSchema<"type", [v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_gtc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly postOnly: v.OptionalSchema, false>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_ioc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_fok", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>; readonly triggerType: v.LiteralSchema<"take_profit", undefined>; readonly triggerPrice: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.TransformAction<{ side: "buy"; execution: { type: "limit_gtc"; price: string; postOnly: boolean; } | { type: "limit_ioc"; price: string; } | { type: "limit_fok"; price: string; }; triggerType: "take_profit"; triggerPrice: string; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "stopLoss"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; } | { readonly case: "takeProfit"; readonly value: { triggerPriceTicks: bigint; side: Side.BUY | Side.SELL; child: { readonly execution: { readonly case: "marketIoc"; readonly value: import("@bufbuild/protobuf").Message<"triggers.v1.TriggerMarketIoc">; }; } | { readonly execution: { readonly case: "limitGtc"; readonly value: TriggerLimitGtc; }; } | { readonly execution: { readonly case: "limitIoc"; readonly value: TriggerLimitIoc; }; } | { readonly execution: { readonly case: "limitFok"; readonly value: TriggerLimitFok; }; }; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>]>, v.SchemaWithPipe; readonly trailingDistance: v.UnionSchema<[v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"distance", undefined>; readonly distance: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"bps", undefined>; readonly bps: v.UnionSchema<[v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>, v.SchemaWithPipe, v.GtValueAction]>], undefined>; }, undefined>], undefined>; readonly activationPrice: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; readonly maxSlippage: v.OptionalSchema; readonly slippage: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"bps", undefined>; readonly bps: v.UnionSchema<[v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>, v.SchemaWithPipe, v.GtValueAction]>], undefined>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"none", undefined>; }, undefined>], undefined>, undefined>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.CheckAction<{ triggerType: "trailing_stop"; trailingDistance: { kind: "bps"; bps: string | number; } | { kind: "distance"; distance: string; }; activationPrice?: string | undefined; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, "Trailing-stop triggers must use the quote fee asset">, v.TransformAction<{ triggerType: "trailing_stop"; trailingDistance: { kind: "bps"; bps: string | number; } | { kind: "distance"; distance: string; }; activationPrice?: string | undefined; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "trailingStop"; readonly value: { readonly trailingDistance: { value: bigint; case: "trailingDistanceTicks"; } | { value: number; case: "trailingDistanceBps"; } | { case: undefined; value?: undefined; }; readonly activationPriceTicks: bigint; readonly maxSlippage: { value: bigint; case: "maxSlippageTicks"; } | { value: number; case: "maxSlippageBps"; } | { case: undefined; value?: undefined; }; readonly side: Side.SELL; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>]>, v.SchemaWithPipe; readonly side: v.SchemaWithPipe, v.TransformAction<"buy" | "sell", Side.BUY | Side.SELL>]>; readonly durationMs: v.SchemaWithPipe, v.TrimAction]>, v.NumberSchema], undefined>, v.TransformAction]>; readonly sliceIntervalMs: v.SchemaWithPipe, v.TrimAction]>, v.NumberSchema], undefined>, v.TransformAction]>; readonly execution: v.VariantSchema<"type", [v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"market_ioc", undefined>; readonly maxSlippage: v.OptionalSchema; readonly slippage: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"bps", undefined>; readonly bps: v.UnionSchema<[v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>, v.SchemaWithPipe, v.GtValueAction]>], undefined>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"none", undefined>; }, undefined>], undefined>, undefined>; }, undefined>, v.StrictObjectSchema<{ readonly type: v.LiteralSchema<"limit_gtc", undefined>; readonly price: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.CheckAction<{ triggerType: "twap"; side: Side.BUY | Side.SELL; durationMs: bigint; sliceIntervalMs: bigint; execution: { type: "market_ioc"; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; } | { type: "limit_gtc"; price: string; }; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, "SELL triggers must use the quote fee asset">, v.CheckAction<{ triggerType: "twap"; side: Side.BUY | Side.SELL; durationMs: bigint; sliceIntervalMs: bigint; execution: { type: "market_ioc"; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; } | { type: "limit_gtc"; price: string; }; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, "sliceIntervalMs cannot exceed durationMs">, v.TransformAction<{ triggerType: "twap"; side: Side.BUY | Side.SELL; durationMs: bigint; sliceIntervalMs: bigint; execution: { type: "market_ioc"; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; } | { type: "limit_gtc"; price: string; }; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "twap"; readonly value: { readonly side: Side.BUY | Side.SELL; readonly durationMs: bigint; readonly sliceIntervalMs: bigint; readonly execution: { readonly case: "marketIoc"; readonly value: TwapMarketIoc; } | { readonly case: "limitGtc"; readonly value: TwapLimitGtc; }; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>]>, v.SchemaWithPipe; readonly side: v.SchemaWithPipe, v.TransformAction<"buy" | "sell", Side.BUY | Side.SELL>]>; readonly priceMin: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly priceMax: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly levels: v.SchemaWithPipe, v.TrimAction]>, v.SchemaWithPipe, v.IntegerAction]>], undefined>, v.TransformAction]>; readonly postOnly: v.OptionalSchema, false>; readonly symbolId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly clientTriggerId: v.OptionalSchema, v.TrimAction]>, () => `${string}-${string}-${string}-${string}-${string}`>; readonly qty: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly feeAsset: v.SchemaWithPipe, "quote">, v.TransformAction<"quote" | "base", FeeAsset.QUOTE | FeeAsset.BASE>]>; readonly selfTradePreventionMode: v.SchemaWithPipe, "expire_maker">, v.TransformAction<"expire_taker" | "expire_maker" | "expire_both", SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH>]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.CheckAction<{ triggerType: "ladder"; side: Side.BUY | Side.SELL; priceMin: string; priceMax: string; levels: number; postOnly: boolean; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, "SELL triggers must use the quote fee asset">, v.TransformAction<{ triggerType: "ladder"; side: Side.BUY | Side.SELL; priceMin: string; priceMax: string; levels: number; postOnly: boolean; symbolId: number; clientTriggerId: string; qty: string; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "ladder"; readonly value: { readonly side: Side.BUY | Side.SELL; readonly priceMinTicks: bigint; readonly priceMaxTicks: bigint; readonly levels: number; readonly postOnly: boolean; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }>, v.CheckAction<{ subaccountId: bigint | undefined; trigger: { strategy: { readonly case: "ladder"; readonly value: { readonly side: Side.BUY | Side.SELL; readonly priceMinTicks: bigint; readonly priceMaxTicks: bigint; readonly levels: number; readonly postOnly: boolean; }; }; symbolId: number; qtyScaled: bigint; feeAsset: FeeAsset.QUOTE | FeeAsset.BASE; selfTradePreventionMode: SelfTradePreventionMode.EXPIRE_MAKER | SelfTradePreventionMode.EXPIRE_TAKER | SelfTradePreventionMode.EXPIRE_BOTH; clientTriggerId: string; }; }, "priceMin must be less than priceMax">]>], undefined>; /** Public input for creating a standalone trigger. */ type CreateTriggerInput = v.InferInput>; /** Public filters for listing triggers in an account scope. */ declare const ListTriggersInputSchema: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; readonly symbolId: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>, undefined>; readonly status: v.SchemaWithPipe, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>; readonly triggerType: v.SchemaWithPipe, undefined>, v.TransformAction<"stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder" | undefined, TriggerType>]>; readonly limit: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>, 50>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, "">; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.TransformAction<{ parentOrderId?: bigint | undefined; symbolId?: number | undefined; status?: (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[] | undefined; triggerType?: TriggerType | undefined; limit: number; pageToken: string; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; parentOrderId?: bigint | undefined; symbolId?: number | undefined; status?: (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[] | undefined; triggerType?: TriggerType | undefined; limit: number; pageToken: string; }>]>; /** Public filters for listing triggers. */ type ListTriggersInput = v.InferInput; declare const CancelTriggerInputSchema: v.SchemaWithPipe, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; triggerId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>, v.TransformAction<{ account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, { subaccountId: bigint | undefined; triggerId: bigint; }>]>; type CancelTriggerInput = v.InferInput; declare const GetTriggerInputSchema: v.SchemaWithPipe, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; triggerId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>, v.TransformAction<{ account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, { subaccountId: bigint | undefined; triggerId: bigint; }>]>; type GetTriggerInput = v.InferInput; declare const PauseTriggerInputSchema: v.SchemaWithPipe, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; triggerId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>, v.TransformAction<{ account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, { subaccountId: bigint | undefined; triggerId: bigint; }>]>; type PauseTriggerInput = v.InferInput; declare const ResumeTriggerInputSchema: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; readonly triggerId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>, v.TransformAction<{ symbolId: number; account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, { subaccountId: bigint | undefined; symbolId: number; triggerId: bigint; }>]>; type ResumeTriggerInput = v.InferInput; declare function createModifyTriggerInputSchema(scales: SdkScales): v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly triggerPrice: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; readonly limitPrice: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; readonly trailingDistance: v.OptionalSchema; readonly distance: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"bps", undefined>; readonly bps: v.UnionSchema<[v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>, v.SchemaWithPipe, v.GtValueAction]>], undefined>; }, undefined>], undefined>, undefined>; readonly activationPrice: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"none", undefined>; }, undefined>], undefined>, undefined>; readonly maxSlippage: v.OptionalSchema; readonly slippage: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"bps", undefined>; readonly bps: v.UnionSchema<[v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>, v.SchemaWithPipe, v.GtValueAction]>], undefined>; }, undefined>, v.StrictObjectSchema<{ readonly kind: v.LiteralSchema<"none", undefined>; }, undefined>], undefined>, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; readonly triggerId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>, v.CheckAction<{ symbolId: number; triggerPrice?: string | undefined; limitPrice?: string | undefined; trailingDistance?: { kind: "bps"; bps: string | number; } | { kind: "distance"; distance: string; } | undefined; activationPrice?: string | { kind: "none"; } | undefined; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, "At least one patch field is required">, v.TransformAction<{ symbolId: number; triggerPrice?: string | undefined; limitPrice?: string | undefined; trailingDistance?: { kind: "bps"; bps: string | number; } | { kind: "distance"; distance: string; } | undefined; activationPrice?: string | { kind: "none"; } | undefined; maxSlippage?: { kind: "bps"; bps: string | number; } | { kind: "none"; } | { kind: "slippage"; slippage: string; } | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, { triggerId: bigint; subaccountId: bigint | undefined; symbolId: number; triggerPriceTicks: bigint | undefined; limitPriceTicks: bigint | undefined; trailingDistance: { value: bigint; case: "trailingDistanceTicks"; } | { value: number; case: "trailingDistanceBps"; } | { case: undefined; value?: undefined; } | { readonly case: undefined; readonly value: undefined; }; activationPriceTicks: bigint | undefined; maxSlippage: { value: bigint; case: "maxSlippageTicks"; } | { value: number; case: "maxSlippageBps"; } | { case: undefined; value?: undefined; } | { readonly case: undefined; readonly value: undefined; }; }>]>; /** * A trigger patch. Omitted fields remain unchanged; `{ kind: "none" }` clears * `activationPrice` or `maxSlippage`. */ type ModifyTriggerInput = v.InferInput>; declare const ListTriggerEventsInputSchema: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>, undefined>; readonly eventType: v.OptionalSchema, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, "">; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; readonly triggerId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>, v.TransformAction<{ limit?: number | undefined; eventType?: "failed" | "canceled" | "updated" | "fired" | "activated" | undefined; pageToken: string; account?: "active" | "main" | { subaccountId: string; } | undefined; triggerId: bigint; }, { subaccountId: bigint | undefined; eventType: TriggerEventType.EVENT_FIRED | TriggerEventType.EVENT_CANCELED | TriggerEventType.EVENT_UPDATED | TriggerEventType.EVENT_FAILED | TriggerEventType.EVENT_ACTIVATED | undefined; limit?: number | undefined; pageToken: string; triggerId: bigint; }>]>; type ListTriggerEventsInput = v.InferInput; //#endregion export { CancelTriggerInput, CancelTriggerInputSchema, CreateTriggerInput, GetTriggerInput, GetTriggerInputSchema, ListTriggerEventsInput, ListTriggerEventsInputSchema, ListTriggersInput, ListTriggersInputSchema, ModifyTriggerInput, PauseTriggerInput, PauseTriggerInputSchema, ResumeTriggerInput, ResumeTriggerInputSchema, createCreateTriggerInputSchema, createModifyTriggerInputSchema }; //# sourceMappingURL=trigger-input.schemas.d.ts.map