import { SdkScales } from "../../shared/decimal-surface.js"; import * as v from "valibot"; //#region src/services/triggers/triggers-output.schemas.d.ts type TriggerPriceSourceLabel = "last" | "index" | "mark" | "unspecified"; type TriggerDirectionLabel = "above" | "below" | "unspecified"; type LadderDistributionLabel = "linear" | "geometric" | "weighted_favorable" | "unspecified"; declare const CreateTriggerResultSchema: v.SchemaWithPipe, v.TransformAction]>; readonly clientTriggerId: v.StringSchema; readonly acceptedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly acceptedAtTsNs: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, v.TransformAction<{ triggerId: string; clientTriggerId: string; acceptedAt?: number | undefined; acceptedAtTsNs: string; }, { acceptedAt: number; acceptedAtNs: string; triggerId: string; clientTriggerId: string; }>]>; type CreateTriggerResult = v.InferOutput; declare const CancelTriggerResultSchema: v.SchemaWithPipe, v.TransformAction]>; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly tsNs: v.BigintSchema; }, undefined>, v.TransformAction<{ triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; tsNs: bigint; }, { ts: number; tsNs: string; triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; }>]>; type CancelTriggerResult = v.InferOutput; declare const ModifyTriggerResultSchema: v.SchemaWithPipe, v.TransformAction]>; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly tsNs: v.BigintSchema; }, undefined>, v.TransformAction<{ triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; tsNs: bigint; }, { ts: number; tsNs: string; triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; }>]>; type ModifyTriggerResult = v.InferOutput; declare const PauseTriggerResultSchema: v.SchemaWithPipe, v.TransformAction]>; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly tsNs: v.BigintSchema; }, undefined>, v.TransformAction<{ triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; tsNs: bigint; }, { ts: number; tsNs: string; triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; }>]>; type PauseTriggerResult = v.InferOutput; declare const ResumeTriggerResultSchema: v.SchemaWithPipe, v.TransformAction]>; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly tsNs: v.BigintSchema; }, undefined>, v.TransformAction<{ triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; tsNs: bigint; }, { ts: number; tsNs: string; triggerId: string; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; }>]>; type ResumeTriggerResult = v.InferOutput; type StopDetailsOutput = { case: "stop"; triggerPrice: string; triggerPriceSource: TriggerPriceSourceLabel; triggerDirection: TriggerDirectionLabel; }; type TrailingDetailsOutput = { case: "trailing"; trailingDistance: string | undefined; trailingDistanceBps: number; activationPrice: string | undefined; peakPrice: string | undefined; troughPrice: string | undefined; maxSlippage: string | undefined; maxSlippageBps: number; triggerPriceSource: TriggerPriceSourceLabel; triggerDirection: TriggerDirectionLabel; /** Current trailing threshold; absent until the trigger is armed. Moves with the peak or trough. */ triggerPrice: string | undefined; }; type TwapDetailsOutput = { case: "twap"; twapDurationMs: number; twapSliceIntervalMs: number; sliceIdx: number; sliceCount: number; /** Cumulative filled child-order base quantity. */ executedQty: string; }; type LadderDetailsOutput = { case: "ladder"; ladderPriceMin: string; ladderPriceMax: string; ladderLevels: number; ladderDistribution: LadderDistributionLabel; /** Cumulative filled child-order base quantity. */ executedQty: string; /** Number of ladder levels with at least one fill. */ executedLevels: number; }; type TriggerDetailsOutput = StopDetailsOutput | TrailingDetailsOutput | TwapDetailsOutput | LadderDetailsOutput | { case: undefined; }; /** Builds the public trigger output schema using each record's symbol ID for quantity scaling. */ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe; readonly subaccountId: v.BigintSchema; readonly symbolId: v.NumberSchema; readonly status: v.NumberSchema; readonly parentOrderId: v.OptionalSchema, undefined>; readonly qtyScaled: v.BigintSchema; readonly feeAsset: v.NumberSchema; readonly selfTradePreventionMode: v.NumberSchema; readonly configuration: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"stopLoss", undefined>; readonly value: v.ObjectSchema<{ readonly triggerPriceTicks: v.BigintSchema; readonly side: v.NumberSchema; readonly child: v.OptionalSchema; readonly value: v.ObjectSchema<{}, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitGtc", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; readonly postOnly: v.BooleanSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitIoc", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitFok", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; }, undefined>, undefined>; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"takeProfit", undefined>; readonly value: v.ObjectSchema<{ readonly triggerPriceTicks: v.BigintSchema; readonly side: v.NumberSchema; readonly child: v.OptionalSchema; readonly value: v.ObjectSchema<{}, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitGtc", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; readonly postOnly: v.BooleanSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitIoc", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitFok", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; }, undefined>, undefined>; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"trailingStop", undefined>; readonly value: v.ObjectSchema<{ readonly trailingDistance: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"trailingDistanceTicks", undefined>; readonly value: v.BigintSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"trailingDistanceBps", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; readonly activationPriceTicks: v.BigintSchema; readonly maxSlippage: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"maxSlippageTicks", undefined>; readonly value: v.BigintSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"maxSlippageBps", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; readonly side: v.NumberSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"twap", undefined>; readonly value: v.ObjectSchema<{ readonly side: v.NumberSchema; readonly durationMs: v.BigintSchema; readonly sliceIntervalMs: v.BigintSchema; readonly execution: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"marketIoc", undefined>; readonly value: v.ObjectSchema<{ readonly maxSlippage: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"maxSlippageTicks", undefined>; readonly value: v.BigintSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"maxSlippageBps", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"limitGtc", undefined>; readonly value: v.ObjectSchema<{ readonly priceTicks: v.BigintSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"ladder", undefined>; readonly value: v.ObjectSchema<{ readonly side: v.NumberSchema; readonly priceMinTicks: v.BigintSchema; readonly priceMaxTicks: v.BigintSchema; readonly levels: v.NumberSchema; readonly postOnly: v.BooleanSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; readonly clientTriggerId: v.StringSchema; readonly createdAt: v.OptionalSchema; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>; readonly updatedAt: v.OptionalSchema; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>; readonly armedAt: v.OptionalSchema; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>; readonly completedAt: v.OptionalSchema; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>; readonly terminalReason: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"cancelReason", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"failureReason", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; readonly runtimeDetails: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"stop", undefined>; readonly value: v.ObjectSchema<{ readonly triggerPriceTicks: v.BigintSchema; readonly triggerPriceSource: v.NumberSchema; readonly triggerDirection: v.NumberSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"trailing", undefined>; readonly value: v.ObjectSchema<{ readonly trailingDistanceTicks: v.BigintSchema; readonly activationPriceTicks: v.BigintSchema; readonly peakPriceTicks: v.BigintSchema; readonly troughPriceTicks: v.BigintSchema; readonly trailingDistanceBps: v.NumberSchema; readonly maxSlippageTicks: v.BigintSchema; readonly maxSlippageBps: v.NumberSchema; readonly triggerPriceSource: v.NumberSchema; readonly triggerDirection: v.NumberSchema; readonly triggerPriceTicks: v.OptionalSchema, undefined>; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"twapState", undefined>; readonly value: v.ObjectSchema<{ readonly twapDurationMs: v.BigintSchema; readonly twapSliceIntervalMs: v.BigintSchema; readonly sliceIdx: v.NumberSchema; readonly sliceCount: v.NumberSchema; readonly executedQtyScaled: v.BigintSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"ladderState", undefined>; readonly value: v.ObjectSchema<{ readonly ladderPriceMinTicks: v.BigintSchema; readonly ladderPriceMaxTicks: v.BigintSchema; readonly ladderLevels: v.NumberSchema; readonly ladderDistribution: v.NumberSchema; readonly executedQtyScaled: v.BigintSchema; readonly executedLevels: v.NumberSchema; }, undefined>; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; }, undefined>, v.TransformAction<{ triggerId: bigint; subaccountId: bigint; symbolId: number; status: number; parentOrderId?: bigint | undefined; qtyScaled: bigint; feeAsset: number; selfTradePreventionMode: number; configuration: { case: "stopLoss"; value: { triggerPriceTicks: bigint; side: number; child?: { execution: { case: "marketIoc"; value: {}; } | { case: "limitGtc"; value: { priceTicks: bigint; postOnly: boolean; }; } | { case: "limitIoc"; value: { priceTicks: bigint; }; } | { case: "limitFok"; value: { priceTicks: bigint; }; } | { case: undefined; value?: undefined; }; } | undefined; }; } | { case: "takeProfit"; value: { triggerPriceTicks: bigint; side: number; child?: { execution: { case: "marketIoc"; value: {}; } | { case: "limitGtc"; value: { priceTicks: bigint; postOnly: boolean; }; } | { case: "limitIoc"; value: { priceTicks: bigint; }; } | { case: "limitFok"; value: { priceTicks: bigint; }; } | { case: undefined; value?: undefined; }; } | undefined; }; } | { case: "trailingStop"; value: { trailingDistance: { case: "trailingDistanceTicks"; value: bigint; } | { case: "trailingDistanceBps"; value: number; } | { case: undefined; value?: undefined; }; activationPriceTicks: bigint; maxSlippage: { case: "maxSlippageTicks"; value: bigint; } | { case: "maxSlippageBps"; value: number; } | { case: undefined; value?: undefined; }; side: number; }; } | { case: "twap"; value: { side: number; durationMs: bigint; sliceIntervalMs: bigint; execution: { case: "marketIoc"; value: { maxSlippage: { case: "maxSlippageTicks"; value: bigint; } | { case: "maxSlippageBps"; value: number; } | { case: undefined; value?: undefined; }; }; } | { case: "limitGtc"; value: { priceTicks: bigint; }; } | { case: undefined; value?: undefined; }; }; } | { case: "ladder"; value: { side: number; priceMinTicks: bigint; priceMaxTicks: bigint; levels: number; postOnly: boolean; }; } | { case: undefined; value?: undefined; }; clientTriggerId: string; createdAt?: { seconds: bigint; nanos: number; } | undefined; updatedAt?: { seconds: bigint; nanos: number; } | undefined; armedAt?: { seconds: bigint; nanos: number; } | undefined; completedAt?: { seconds: bigint; nanos: number; } | undefined; terminalReason: { case: "cancelReason"; value: number; } | { case: "failureReason"; value: number; } | { case: undefined; value?: undefined; }; runtimeDetails: { case: "stop"; value: { triggerPriceTicks: bigint; triggerPriceSource: number; triggerDirection: number; }; } | { case: "trailing"; value: { trailingDistanceTicks: bigint; activationPriceTicks: bigint; peakPriceTicks: bigint; troughPriceTicks: bigint; trailingDistanceBps: number; maxSlippageTicks: bigint; maxSlippageBps: number; triggerPriceSource: number; triggerDirection: number; triggerPriceTicks?: bigint | undefined; }; } | { case: "twapState"; value: { twapDurationMs: bigint; twapSliceIntervalMs: bigint; sliceIdx: number; sliceCount: number; executedQtyScaled: bigint; }; } | { case: "ladderState"; value: { ladderPriceMinTicks: bigint; ladderPriceMaxTicks: bigint; ladderLevels: number; ladderDistribution: number; executedQtyScaled: bigint; executedLevels: number; }; } | { case: undefined; value?: undefined; }; }, { runtimeDetails: TriggerDetailsOutput; cancelReason: "unspecified" | "internal_error" | "oco" | "user_request" | "parent_canceled_no_fill" | "missing_reason_code"; failureReason: undefined; triggerId: string; subaccountId: string; symbolId: number; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; parentOrderId: string | undefined; qty: string; feeAsset: "unspecified" | "quote" | "base"; selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both"; configuration: { type: "stop_loss" | "take_profit"; side: "unspecified" | "buy" | "sell"; triggerPrice: string; execution: { readonly type: "market_ioc"; readonly price?: undefined; readonly postOnly?: undefined; } | { readonly type: "limit_gtc"; readonly price: string; readonly postOnly: boolean; } | { readonly type: "limit_ioc"; readonly price: string; readonly postOnly?: undefined; } | { readonly type: "limit_fok"; readonly price: string; readonly postOnly?: undefined; } | { readonly type: "unspecified"; readonly price?: undefined; readonly postOnly?: undefined; }; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "trailing_stop"; side: "unspecified" | "buy" | "sell"; trailingDistance: { kind: "distance"; distance: string; bps?: undefined; } | { kind: "bps"; bps: number; distance?: undefined; } | { kind: "unspecified"; distance?: undefined; bps?: undefined; }; activationPrice: string | undefined; maxSlippage: { kind: "slippage"; slippage: string; bps?: undefined; } | { kind: "bps"; bps: number; slippage?: undefined; } | { kind: "none"; slippage?: undefined; bps?: undefined; }; triggerPrice?: undefined; execution?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "twap"; side: "unspecified" | "buy" | "sell"; durationMs: number; sliceIntervalMs: number; execution: { readonly type: "market_ioc"; readonly maxSlippage: { kind: "slippage"; slippage: string; bps?: undefined; } | { kind: "bps"; bps: number; slippage?: undefined; } | { kind: "none"; slippage?: undefined; bps?: undefined; }; readonly price?: undefined; } | { readonly type: "limit_gtc"; readonly price: string; maxSlippage?: undefined; } | { readonly type: "unspecified"; maxSlippage?: undefined; readonly price?: undefined; }; triggerPrice?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "ladder"; side: "unspecified" | "buy" | "sell"; priceMin: string; priceMax: string; levels: number; postOnly: boolean; triggerPrice?: undefined; execution?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; } | { type: "unspecified"; side?: undefined; triggerPrice?: undefined; execution?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; }; clientTriggerId: string; createdTs: number | undefined; updatedTs: number | undefined; armedTs: number | undefined; completedTs: number | undefined; } | { runtimeDetails: TriggerDetailsOutput; cancelReason: undefined; failureReason: "unspecified" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "market_halted" | "engine_busy" | "account_unknown" | "order_unknown" | "post_only_cross" | "reduce_only_blocked" | "price_band_violation" | "market_cap_violation" | "empty_book" | "fok_insufficient_liquidity" | "fee_asset_not_allowed" | "market_price_unavailable" | "stale_quote" | "min_quantity" | "step_size" | "invalid_sizing" | "max_quote_debit_too_small" | "fee_ceiling_exceeded" | "trigger_price_invalid" | "trigger_price_source_unsupported" | "trailing_distance_invalid" | "modification_requires_replace" | "order_already_terminal" | "conflict_idempotency_key_reuse" | "rate_limited" | "policy_spot_trade_deny" | "policy_market_deny" | "policy_max_notional" | "policy_max_open_orders" | "policy_trading_halted" | "max_slippage_invalid"; triggerId: string; subaccountId: string; symbolId: number; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; parentOrderId: string | undefined; qty: string; feeAsset: "unspecified" | "quote" | "base"; selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both"; configuration: { type: "stop_loss" | "take_profit"; side: "unspecified" | "buy" | "sell"; triggerPrice: string; execution: { readonly type: "market_ioc"; readonly price?: undefined; readonly postOnly?: undefined; } | { readonly type: "limit_gtc"; readonly price: string; readonly postOnly: boolean; } | { readonly type: "limit_ioc"; readonly price: string; readonly postOnly?: undefined; } | { readonly type: "limit_fok"; readonly price: string; readonly postOnly?: undefined; } | { readonly type: "unspecified"; readonly price?: undefined; readonly postOnly?: undefined; }; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "trailing_stop"; side: "unspecified" | "buy" | "sell"; trailingDistance: { kind: "distance"; distance: string; bps?: undefined; } | { kind: "bps"; bps: number; distance?: undefined; } | { kind: "unspecified"; distance?: undefined; bps?: undefined; }; activationPrice: string | undefined; maxSlippage: { kind: "slippage"; slippage: string; bps?: undefined; } | { kind: "bps"; bps: number; slippage?: undefined; } | { kind: "none"; slippage?: undefined; bps?: undefined; }; triggerPrice?: undefined; execution?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "twap"; side: "unspecified" | "buy" | "sell"; durationMs: number; sliceIntervalMs: number; execution: { readonly type: "market_ioc"; readonly maxSlippage: { kind: "slippage"; slippage: string; bps?: undefined; } | { kind: "bps"; bps: number; slippage?: undefined; } | { kind: "none"; slippage?: undefined; bps?: undefined; }; readonly price?: undefined; } | { readonly type: "limit_gtc"; readonly price: string; maxSlippage?: undefined; } | { readonly type: "unspecified"; maxSlippage?: undefined; readonly price?: undefined; }; triggerPrice?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "ladder"; side: "unspecified" | "buy" | "sell"; priceMin: string; priceMax: string; levels: number; postOnly: boolean; triggerPrice?: undefined; execution?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; } | { type: "unspecified"; side?: undefined; triggerPrice?: undefined; execution?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; }; clientTriggerId: string; createdTs: number | undefined; updatedTs: number | undefined; armedTs: number | undefined; completedTs: number | undefined; } | { runtimeDetails: TriggerDetailsOutput; cancelReason: undefined; failureReason: undefined; triggerId: string; subaccountId: string; symbolId: number; status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused"; parentOrderId: string | undefined; qty: string; feeAsset: "unspecified" | "quote" | "base"; selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both"; configuration: { type: "stop_loss" | "take_profit"; side: "unspecified" | "buy" | "sell"; triggerPrice: string; execution: { readonly type: "market_ioc"; readonly price?: undefined; readonly postOnly?: undefined; } | { readonly type: "limit_gtc"; readonly price: string; readonly postOnly: boolean; } | { readonly type: "limit_ioc"; readonly price: string; readonly postOnly?: undefined; } | { readonly type: "limit_fok"; readonly price: string; readonly postOnly?: undefined; } | { readonly type: "unspecified"; readonly price?: undefined; readonly postOnly?: undefined; }; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "trailing_stop"; side: "unspecified" | "buy" | "sell"; trailingDistance: { kind: "distance"; distance: string; bps?: undefined; } | { kind: "bps"; bps: number; distance?: undefined; } | { kind: "unspecified"; distance?: undefined; bps?: undefined; }; activationPrice: string | undefined; maxSlippage: { kind: "slippage"; slippage: string; bps?: undefined; } | { kind: "bps"; bps: number; slippage?: undefined; } | { kind: "none"; slippage?: undefined; bps?: undefined; }; triggerPrice?: undefined; execution?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "twap"; side: "unspecified" | "buy" | "sell"; durationMs: number; sliceIntervalMs: number; execution: { readonly type: "market_ioc"; readonly maxSlippage: { kind: "slippage"; slippage: string; bps?: undefined; } | { kind: "bps"; bps: number; slippage?: undefined; } | { kind: "none"; slippage?: undefined; bps?: undefined; }; readonly price?: undefined; } | { readonly type: "limit_gtc"; readonly price: string; maxSlippage?: undefined; } | { readonly type: "unspecified"; maxSlippage?: undefined; readonly price?: undefined; }; triggerPrice?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; } | { type: "ladder"; side: "unspecified" | "buy" | "sell"; priceMin: string; priceMax: string; levels: number; postOnly: boolean; triggerPrice?: undefined; execution?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; } | { type: "unspecified"; side?: undefined; triggerPrice?: undefined; execution?: undefined; trailingDistance?: undefined; activationPrice?: undefined; maxSlippage?: undefined; durationMs?: undefined; sliceIntervalMs?: undefined; priceMin?: undefined; priceMax?: undefined; levels?: undefined; readonly postOnly?: undefined; }; clientTriggerId: string; createdTs: number | undefined; updatedTs: number | undefined; armedTs: number | undefined; completedTs: number | undefined; }>]>; /** A normalized standalone trigger record. */ type Trigger = v.InferOutput>; declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe; readonly subaccountId: v.BigintSchema; readonly symbolId: v.NumberSchema; readonly triggerType: v.NumberSchema; readonly eventType: v.NumberSchema; readonly tsNs: v.BigintSchema; readonly childSeq: v.NumberSchema; readonly childOrderId: v.BigintSchema; readonly firePriceTicks: v.OptionalSchema, undefined>; readonly terminalReason: v.VariantSchema<"case", [v.ObjectSchema<{ readonly case: v.LiteralSchema<"cancelReason", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.LiteralSchema<"failureReason", undefined>; readonly value: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly case: v.UndefinedSchema; readonly value: v.OptionalSchema, undefined>; }, undefined>], undefined>; }, undefined>, v.TransformAction<{ triggerId: bigint; subaccountId: bigint; symbolId: number; triggerType: number; eventType: number; tsNs: bigint; childSeq: number; childOrderId: bigint; firePriceTicks?: bigint | undefined; terminalReason: { case: "cancelReason"; value: number; } | { case: "failureReason"; value: number; } | { case: undefined; value?: undefined; }; }, { cancelReason: "unspecified" | "internal_error" | "oco" | "user_request" | "parent_canceled_no_fill" | "missing_reason_code"; failureReason: undefined; triggerId: string; subaccountId: string; symbolId: number; triggerType: "unspecified" | "stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder"; eventType: "unspecified" | "failed" | "canceled" | "updated" | "fired" | "activated"; ts: number; childSeq: number; childOrderId: string | undefined; firePrice: string | undefined; } | { cancelReason: undefined; failureReason: "unspecified" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "market_halted" | "engine_busy" | "account_unknown" | "order_unknown" | "post_only_cross" | "reduce_only_blocked" | "price_band_violation" | "market_cap_violation" | "empty_book" | "fok_insufficient_liquidity" | "fee_asset_not_allowed" | "market_price_unavailable" | "stale_quote" | "min_quantity" | "step_size" | "invalid_sizing" | "max_quote_debit_too_small" | "fee_ceiling_exceeded" | "trigger_price_invalid" | "trigger_price_source_unsupported" | "trailing_distance_invalid" | "modification_requires_replace" | "order_already_terminal" | "conflict_idempotency_key_reuse" | "rate_limited" | "policy_spot_trade_deny" | "policy_market_deny" | "policy_max_notional" | "policy_max_open_orders" | "policy_trading_halted" | "max_slippage_invalid"; triggerId: string; subaccountId: string; symbolId: number; triggerType: "unspecified" | "stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder"; eventType: "unspecified" | "failed" | "canceled" | "updated" | "fired" | "activated"; ts: number; childSeq: number; childOrderId: string | undefined; firePrice: string | undefined; } | { cancelReason: undefined; failureReason: undefined; triggerId: string; subaccountId: string; symbolId: number; triggerType: "unspecified" | "stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder"; eventType: "unspecified" | "failed" | "canceled" | "updated" | "fired" | "activated"; ts: number; childSeq: number; childOrderId: string | undefined; firePrice: string | undefined; }>]>; type TriggerEvent = v.InferOutput>; type ListTriggerEventsResult = { events: TriggerEvent[]; nextPageToken: string; }; //#endregion export { CancelTriggerResult, CancelTriggerResultSchema, CreateTriggerResult, CreateTriggerResultSchema, LadderDetailsOutput, ListTriggerEventsResult, ModifyTriggerResult, ModifyTriggerResultSchema, PauseTriggerResult, PauseTriggerResultSchema, ResumeTriggerResult, ResumeTriggerResultSchema, StopDetailsOutput, TrailingDetailsOutput, Trigger, TriggerDetailsOutput, TriggerEvent, TwapDetailsOutput, createTriggerEventSchema, createTriggerSchema }; //# sourceMappingURL=triggers-output.schemas.d.ts.map