@polyester/sdk 0.35.0-devnet-20261110193018 → 0.35.0-devnet-20261111024555

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -144,6 +144,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
144
144
  readonly case: v.LiteralSchema<"stopLoss", undefined>;
145
145
  readonly value: v.ObjectSchema<{
146
146
  readonly triggerPriceTicks: v.BigintSchema<undefined>;
147
+ readonly triggerPriceSource: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
147
148
  readonly side: v.NumberSchema<undefined>;
148
149
  readonly child: v.OptionalSchema<v.ObjectSchema<{
149
150
  readonly execution: v.VariantSchema<"case", [v.ObjectSchema<{
@@ -188,6 +189,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
188
189
  readonly case: v.LiteralSchema<"takeProfit", undefined>;
189
190
  readonly value: v.ObjectSchema<{
190
191
  readonly triggerPriceTicks: v.BigintSchema<undefined>;
192
+ readonly triggerPriceSource: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
191
193
  readonly side: v.NumberSchema<undefined>;
192
194
  readonly child: v.OptionalSchema<v.ObjectSchema<{
193
195
  readonly execution: v.VariantSchema<"case", [v.ObjectSchema<{
@@ -254,6 +256,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
254
256
  }, undefined>], undefined>;
255
257
  readonly side: v.NumberSchema<undefined>;
256
258
  readonly limitPriceTicks: v.OptionalSchema<v.BigintSchema<undefined>, 0n>;
259
+ readonly triggerPriceSource: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
257
260
  }, undefined>;
258
261
  }, undefined>, v.ObjectSchema<{
259
262
  readonly case: v.LiteralSchema<"twap", undefined>;
@@ -383,6 +386,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
383
386
  case: "stopLoss";
384
387
  value: {
385
388
  triggerPriceTicks: bigint;
389
+ triggerPriceSource: number;
386
390
  side: number;
387
391
  child?: {
388
392
  execution: {
@@ -425,6 +429,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
425
429
  case: "takeProfit";
426
430
  value: {
427
431
  triggerPriceTicks: bigint;
432
+ triggerPriceSource: number;
428
433
  side: number;
429
434
  child?: {
430
435
  execution: {
@@ -489,6 +494,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
489
494
  };
490
495
  side: number;
491
496
  limitPriceTicks: bigint;
497
+ triggerPriceSource: number;
492
498
  };
493
499
  } | {
494
500
  case: "twap";
@@ -608,7 +614,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
608
614
  }, {
609
615
  runtimeDetails: TriggerDetailsOutput;
610
616
  version: number;
611
- cancelReason: "unspecified" | "internal_error" | "oco" | "user_request" | "account_repair" | "market_halted" | "parent_canceled_no_fill" | "self_trade_prevention" | "pair_drain_trigger" | "pair_drain_twap" | "pair_drain_ladder" | "pair_drain_attached_leg" | "missing_reason_code";
617
+ cancelReason: "unspecified" | "oco" | "user_request" | "account_repair" | "market_halted" | "internal_error" | "parent_canceled_no_fill" | "self_trade_prevention" | "pair_drain_trigger" | "pair_drain_twap" | "pair_drain_ladder" | "pair_drain_attached_leg" | "missing_reason_code";
612
618
  failureReason: undefined;
613
619
  triggerId: string;
614
620
  subaccountId: string;
@@ -620,8 +626,9 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
620
626
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
621
627
  configuration: {
622
628
  type: "stop_loss" | "take_profit";
623
- side: "unspecified" | "buy" | "sell";
629
+ side: "buy" | "sell" | "unspecified";
624
630
  triggerPrice: string;
631
+ triggerPriceSource: "unspecified" | "last" | "index" | "mark";
625
632
  execution: {
626
633
  readonly type: "market_ioc";
627
634
  readonly maxSlippage: {
@@ -672,7 +679,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
672
679
  readonly postOnly?: undefined;
673
680
  } | {
674
681
  type: "trailing_stop";
675
- side: "unspecified" | "buy" | "sell";
682
+ side: "buy" | "sell" | "unspecified";
676
683
  trailingDistance: {
677
684
  kind: "distance";
678
685
  distance: string;
@@ -701,6 +708,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
701
708
  bps?: undefined;
702
709
  };
703
710
  limitPrice: string | undefined;
711
+ triggerPriceSource: "unspecified" | "last" | "index" | "mark";
704
712
  triggerPrice?: undefined;
705
713
  execution?: undefined;
706
714
  durationMs?: undefined;
@@ -711,7 +719,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
711
719
  readonly postOnly?: undefined;
712
720
  } | {
713
721
  type: "twap";
714
- side: "unspecified" | "buy" | "sell";
722
+ side: "buy" | "sell" | "unspecified";
715
723
  durationMs: number;
716
724
  sliceIntervalMs: number;
717
725
  execution: {
@@ -740,6 +748,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
740
748
  readonly price?: undefined;
741
749
  };
742
750
  triggerPrice?: undefined;
751
+ triggerPriceSource?: undefined;
743
752
  trailingDistance?: undefined;
744
753
  activationPrice?: undefined;
745
754
  readonly maxSlippage?: undefined;
@@ -750,12 +759,13 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
750
759
  readonly postOnly?: undefined;
751
760
  } | {
752
761
  type: "ladder";
753
- side: "unspecified" | "buy" | "sell";
762
+ side: "buy" | "sell" | "unspecified";
754
763
  priceMin: string;
755
764
  priceMax: string;
756
765
  levels: number;
757
766
  postOnly: boolean;
758
767
  triggerPrice?: undefined;
768
+ triggerPriceSource?: undefined;
759
769
  execution?: undefined;
760
770
  trailingDistance?: undefined;
761
771
  activationPrice?: undefined;
@@ -767,6 +777,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
767
777
  type: "unspecified";
768
778
  side?: undefined;
769
779
  triggerPrice?: undefined;
780
+ triggerPriceSource?: undefined;
770
781
  execution?: undefined;
771
782
  trailingDistance?: undefined;
772
783
  activationPrice?: undefined;
@@ -788,7 +799,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
788
799
  runtimeDetails: TriggerDetailsOutput;
789
800
  version: number;
790
801
  cancelReason: undefined;
791
- failureReason: "unspecified" | "internal_error" | "market_halted" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented";
802
+ failureReason: "unspecified" | "market_halted" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented";
792
803
  triggerId: string;
793
804
  subaccountId: string;
794
805
  symbolId: number;
@@ -799,8 +810,9 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
799
810
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
800
811
  configuration: {
801
812
  type: "stop_loss" | "take_profit";
802
- side: "unspecified" | "buy" | "sell";
813
+ side: "buy" | "sell" | "unspecified";
803
814
  triggerPrice: string;
815
+ triggerPriceSource: "unspecified" | "last" | "index" | "mark";
804
816
  execution: {
805
817
  readonly type: "market_ioc";
806
818
  readonly maxSlippage: {
@@ -851,7 +863,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
851
863
  readonly postOnly?: undefined;
852
864
  } | {
853
865
  type: "trailing_stop";
854
- side: "unspecified" | "buy" | "sell";
866
+ side: "buy" | "sell" | "unspecified";
855
867
  trailingDistance: {
856
868
  kind: "distance";
857
869
  distance: string;
@@ -880,6 +892,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
880
892
  bps?: undefined;
881
893
  };
882
894
  limitPrice: string | undefined;
895
+ triggerPriceSource: "unspecified" | "last" | "index" | "mark";
883
896
  triggerPrice?: undefined;
884
897
  execution?: undefined;
885
898
  durationMs?: undefined;
@@ -890,7 +903,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
890
903
  readonly postOnly?: undefined;
891
904
  } | {
892
905
  type: "twap";
893
- side: "unspecified" | "buy" | "sell";
906
+ side: "buy" | "sell" | "unspecified";
894
907
  durationMs: number;
895
908
  sliceIntervalMs: number;
896
909
  execution: {
@@ -919,6 +932,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
919
932
  readonly price?: undefined;
920
933
  };
921
934
  triggerPrice?: undefined;
935
+ triggerPriceSource?: undefined;
922
936
  trailingDistance?: undefined;
923
937
  activationPrice?: undefined;
924
938
  readonly maxSlippage?: undefined;
@@ -929,12 +943,13 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
929
943
  readonly postOnly?: undefined;
930
944
  } | {
931
945
  type: "ladder";
932
- side: "unspecified" | "buy" | "sell";
946
+ side: "buy" | "sell" | "unspecified";
933
947
  priceMin: string;
934
948
  priceMax: string;
935
949
  levels: number;
936
950
  postOnly: boolean;
937
951
  triggerPrice?: undefined;
952
+ triggerPriceSource?: undefined;
938
953
  execution?: undefined;
939
954
  trailingDistance?: undefined;
940
955
  activationPrice?: undefined;
@@ -946,6 +961,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
946
961
  type: "unspecified";
947
962
  side?: undefined;
948
963
  triggerPrice?: undefined;
964
+ triggerPriceSource?: undefined;
949
965
  execution?: undefined;
950
966
  trailingDistance?: undefined;
951
967
  activationPrice?: undefined;
@@ -978,8 +994,9 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
978
994
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
979
995
  configuration: {
980
996
  type: "stop_loss" | "take_profit";
981
- side: "unspecified" | "buy" | "sell";
997
+ side: "buy" | "sell" | "unspecified";
982
998
  triggerPrice: string;
999
+ triggerPriceSource: "unspecified" | "last" | "index" | "mark";
983
1000
  execution: {
984
1001
  readonly type: "market_ioc";
985
1002
  readonly maxSlippage: {
@@ -1030,7 +1047,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1030
1047
  readonly postOnly?: undefined;
1031
1048
  } | {
1032
1049
  type: "trailing_stop";
1033
- side: "unspecified" | "buy" | "sell";
1050
+ side: "buy" | "sell" | "unspecified";
1034
1051
  trailingDistance: {
1035
1052
  kind: "distance";
1036
1053
  distance: string;
@@ -1059,6 +1076,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1059
1076
  bps?: undefined;
1060
1077
  };
1061
1078
  limitPrice: string | undefined;
1079
+ triggerPriceSource: "unspecified" | "last" | "index" | "mark";
1062
1080
  triggerPrice?: undefined;
1063
1081
  execution?: undefined;
1064
1082
  durationMs?: undefined;
@@ -1069,7 +1087,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1069
1087
  readonly postOnly?: undefined;
1070
1088
  } | {
1071
1089
  type: "twap";
1072
- side: "unspecified" | "buy" | "sell";
1090
+ side: "buy" | "sell" | "unspecified";
1073
1091
  durationMs: number;
1074
1092
  sliceIntervalMs: number;
1075
1093
  execution: {
@@ -1098,6 +1116,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1098
1116
  readonly price?: undefined;
1099
1117
  };
1100
1118
  triggerPrice?: undefined;
1119
+ triggerPriceSource?: undefined;
1101
1120
  trailingDistance?: undefined;
1102
1121
  activationPrice?: undefined;
1103
1122
  readonly maxSlippage?: undefined;
@@ -1108,12 +1127,13 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1108
1127
  readonly postOnly?: undefined;
1109
1128
  } | {
1110
1129
  type: "ladder";
1111
- side: "unspecified" | "buy" | "sell";
1130
+ side: "buy" | "sell" | "unspecified";
1112
1131
  priceMin: string;
1113
1132
  priceMax: string;
1114
1133
  levels: number;
1115
1134
  postOnly: boolean;
1116
1135
  triggerPrice?: undefined;
1136
+ triggerPriceSource?: undefined;
1117
1137
  execution?: undefined;
1118
1138
  trailingDistance?: undefined;
1119
1139
  activationPrice?: undefined;
@@ -1125,6 +1145,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1125
1145
  type: "unspecified";
1126
1146
  side?: undefined;
1127
1147
  triggerPrice?: undefined;
1148
+ triggerPriceSource?: undefined;
1128
1149
  execution?: undefined;
1129
1150
  trailingDistance?: undefined;
1130
1151
  activationPrice?: undefined;
@@ -1189,14 +1210,14 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
1189
1210
  fireRefusalReason?: number | undefined;
1190
1211
  }, {
1191
1212
  /** Why a `fire_refused` attempt was refused; the trigger stayed live. */
1192
- fireRefusalReason: "unspecified" | "internal_error" | "market_halted" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented" | undefined;
1193
- cancelReason: "unspecified" | "internal_error" | "oco" | "user_request" | "account_repair" | "market_halted" | "parent_canceled_no_fill" | "self_trade_prevention" | "pair_drain_trigger" | "pair_drain_twap" | "pair_drain_ladder" | "pair_drain_attached_leg" | "missing_reason_code";
1213
+ fireRefusalReason: "unspecified" | "market_halted" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented" | undefined;
1214
+ cancelReason: "unspecified" | "oco" | "user_request" | "account_repair" | "market_halted" | "internal_error" | "parent_canceled_no_fill" | "self_trade_prevention" | "pair_drain_trigger" | "pair_drain_twap" | "pair_drain_ladder" | "pair_drain_attached_leg" | "missing_reason_code";
1194
1215
  failureReason: undefined;
1195
1216
  triggerId: string;
1196
1217
  subaccountId: string;
1197
1218
  symbolId: number;
1198
1219
  triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
1199
- eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
1220
+ eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
1200
1221
  ts: number;
1201
1222
  tsNs: string;
1202
1223
  childSeq: number;
@@ -1204,14 +1225,14 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
1204
1225
  firePrice: string | undefined;
1205
1226
  } | {
1206
1227
  /** Why a `fire_refused` attempt was refused; the trigger stayed live. */
1207
- fireRefusalReason: "unspecified" | "internal_error" | "market_halted" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented" | undefined;
1228
+ fireRefusalReason: "unspecified" | "market_halted" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented" | undefined;
1208
1229
  cancelReason: undefined;
1209
- failureReason: "unspecified" | "internal_error" | "market_halted" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented";
1230
+ failureReason: "unspecified" | "market_halted" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented";
1210
1231
  triggerId: string;
1211
1232
  subaccountId: string;
1212
1233
  symbolId: number;
1213
1234
  triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
1214
- eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
1235
+ eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
1215
1236
  ts: number;
1216
1237
  tsNs: string;
1217
1238
  childSeq: number;
@@ -1219,14 +1240,14 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
1219
1240
  firePrice: string | undefined;
1220
1241
  } | {
1221
1242
  /** Why a `fire_refused` attempt was refused; the trigger stayed live. */
1222
- fireRefusalReason: "unspecified" | "internal_error" | "market_halted" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented" | undefined;
1243
+ fireRefusalReason: "unspecified" | "market_halted" | "internal_error" | "missing_reason_code" | "unknown_symbol" | "pair_disabled" | "min_notional" | "tick_size" | "insufficient_funds" | "risk_limit" | "duplicate_client_id" | "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" | "invalid_time_in_force" | "duplicate_order_id" | "max_quantity" | "max_notional" | "pair_post_only" | "max_open_orders_total" | "stp_mode_not_allowed" | "pair_backlogged" | "mode_not_supported" | "market_quote_stale" | "market_quote_unhealthy" | "qty_invalid" | "limit_price_invalid" | "twap_interval_invalid" | "ladder_range_too_narrow" | "ladder_levels_invalid" | "attached_legs_exceeded" | "price_levels_exhausted" | "settlement_backlogged" | "client_order_ids_exhausted" | "invalid_order_id" | "order_id_conflict" | "invalid_side" | "invalid_order_type" | "invalid_stp_mode" | "invalid_order_flags" | "price_level_quantity_limit" | "child_qty_raise_not_allowed" | "triggers_exhausted" | "order_sequence_exhausted" | "fee_schedule_unavailable" | "policy_unavailable" | "account_routing_invalid" | "client_trigger_id_invalid" | "trigger_direction_invalid" | "fee_asset_invalid" | "fee_ceiling_invalid" | "unsupported_field_set" | "trigger_fire_limit_reached" | "condition_flags_invalid" | "condition_parameter_set" | "slippage_ticks_invalid" | "slippage_bps_invalid" | "slippage_bounds_conflict" | "limit_child_slippage_set" | "new_account_capacity_reached" | "order_type_not_allowed_in_auction" | "post_only_not_allowed_in_auction" | "twap_capacity_reached" | "order_limits_unavailable" | "child_order_inconsistent" | "index_price_unavailable" | "trigger_would_trigger_immediately" | "max_open_orders_per_pair" | "account_repairing" | "self_trade_prevented" | undefined;
1223
1244
  cancelReason: undefined;
1224
1245
  failureReason: undefined;
1225
1246
  triggerId: string;
1226
1247
  subaccountId: string;
1227
1248
  symbolId: number;
1228
1249
  triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
1229
- eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
1250
+ eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
1230
1251
  ts: number;
1231
1252
  tsNs: string;
1232
1253
  childSeq: number;
@@ -1 +1 @@
1
- {"version":3,"file":"triggers-output.schemas.d.ts","names":[],"sources":["../../../src/services/triggers/triggers-output.schemas.ts"],"mappings":";;;KAyBK;KAEA;KAEA;cAiBQ,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;KAc1B,sBAAsB,EAAE,mBAAmB;cAE1C,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAE1B,sBAAsB,EAAE,mBAAmB;cAE1C,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAE1B,sBAAsB,EAAE,mBAAmB;cAE1C,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KACzB,qBAAqB,EAAE,mBAAmB;cAEzC,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAC1B,sBAAsB,EAAE,mBAAmB;KAoS3C;EACR;EACA;EACA,oBAAoB;EACpB,kBAAkB;;KAGV;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB;EACpB,kBAAkB;;EAElB;;KAGQ;EACR;EACA;EACA;EACA;EACA;;EAEA;;KAGQ;EACR;EACA;EACA;EACA;EACA,oBAAoB;;EAEpB;;EAEA;;KAGQ,uBACN,oBACA,wBACA,oBACA;EACE;;;iBAuGQ,oBAAoB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;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kBAAkB;iBAEtC,yBAAyB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuC9C,eAAe,EAAE,YAAY,kBAAkB;KAE/C;EACR,QAAQ;EACR"}
1
+ {"version":3,"file":"triggers-output.schemas.d.ts","names":[],"sources":["../../../src/services/triggers/triggers-output.schemas.ts"],"mappings":";;;KAyBK;KAEA;KAEA;cAiBQ,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;KAc1B,sBAAsB,EAAE,mBAAmB;cAE1C,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAE1B,sBAAsB,EAAE,mBAAmB;cAE1C,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAE1B,sBAAsB,EAAE,mBAAmB;cAE1C,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KACzB,qBAAqB,EAAE,mBAAmB;cAEzC,2BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;KAC1B,sBAAsB,EAAE,mBAAmB;KA8S3C;EACR;EACA;EACA,oBAAoB;EACpB,kBAAkB;;KAGV;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB;EACpB,kBAAkB;;EAElB;;KAGQ;EACR;EACA;EACA;EACA;EACA;;EAEA;;KAGQ;EACR;EACA;EACA;EACA;EACA,oBAAoB;;EAEpB;;EAEA;;KAGQ,uBACN,oBACA,wBACA,oBACA;EACE;;;iBAuGQ,oBAAoB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;KAuC9C,eAAe,EAAE,YAAY,kBAAkB;KAE/C;EACR,QAAQ;EACR"}
@@ -72,6 +72,7 @@ const ConditionalExecutionRawSchema = v.variant("case", [
72
72
  ]);
73
73
  const ConditionalConfigurationRawSchema = v.object({
74
74
  triggerPriceTicks: v.bigint(),
75
+ triggerPriceSource: v.optional(v.number(), 0),
75
76
  side: v.number(),
76
77
  child: v.optional(v.object({ execution: ConditionalExecutionRawSchema }))
77
78
  });
@@ -93,7 +94,8 @@ const TrailingConfigurationRawSchema = v.object({
93
94
  activationPriceTicks: v.bigint(),
94
95
  maxSlippage: MaxSlippageRawSchema,
95
96
  side: v.number(),
96
- limitPriceTicks: v.optional(v.bigint(), 0n)
97
+ limitPriceTicks: v.optional(v.bigint(), 0n),
98
+ triggerPriceSource: v.optional(v.number(), 0)
97
99
  });
98
100
  const TwapConfigurationRawSchema = v.object({
99
101
  side: v.number(),
@@ -176,6 +178,7 @@ function transformTriggerConfiguration(configuration, scales) {
176
178
  type: configuration.case === "stopLoss" ? "stop_loss" : "take_profit",
177
179
  side: enumLabel(OrderSideCodec.protoToOutput, configuration.value.side),
178
180
  triggerPrice: scaledToDecimalOutput(configuration.value.triggerPriceTicks, scales.price()),
181
+ triggerPriceSource: enumLabel(TriggerPriceSourceCodec.protoToOutput, configuration.value.triggerPriceSource),
179
182
  execution: transformConditionalExecution(configuration.value.child?.execution ?? { case: void 0 }, scales)
180
183
  };
181
184
  case "trailingStop": return {
@@ -190,7 +193,8 @@ function transformTriggerConfiguration(configuration, scales) {
190
193
  } : { kind: "unspecified" },
191
194
  activationPrice: configuration.value.activationPriceTicks > 0n ? scaledToDecimalOutput(configuration.value.activationPriceTicks, scales.price()) : void 0,
192
195
  maxSlippage: formatMaxSlippage(configuration.value.maxSlippage, scales),
193
- limitPrice: configuration.value.limitPriceTicks > 0n ? scaledToDecimalOutput(configuration.value.limitPriceTicks, scales.price()) : void 0
196
+ limitPrice: configuration.value.limitPriceTicks > 0n ? scaledToDecimalOutput(configuration.value.limitPriceTicks, scales.price()) : void 0,
197
+ triggerPriceSource: enumLabel(TriggerPriceSourceCodec.protoToOutput, configuration.value.triggerPriceSource)
194
198
  };
195
199
  case "twap": return {
196
200
  type: "twap",
@@ -1 +1 @@
1
- {"version":3,"file":"triggers-output.schemas.js","names":["TriggerSideCodec"],"sources":["../../../src/services/triggers/triggers-output.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n BigIntStringSchema,\n OptionalTimestampMsSchema,\n TimestampSchema,\n PublicIdSchema,\n} from \"../../shared/schemas.js\";\nimport { enumLabel, enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { tsNsToMs, tsObjToMs } from \"../../utils/time.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport {\n TriggerTypeCodec,\n TriggerStatusCodec,\n FeeAssetCodec,\n SelfTradePreventionModeCodec,\n TriggerPriceSourceCodec,\n TriggerDirectionCodec,\n LadderDistributionCodec,\n TriggerSideCodec,\n TriggerEventTypeCodec,\n TriggerCancelReasonCodec,\n TriggerFailureReasonCodec,\n} from \"./triggers.codecs.js\";\n\ntype TriggerPriceSourceLabel = \"last\" | \"index\" | \"mark\" | \"unspecified\";\n\ntype TriggerDirectionLabel = \"above\" | \"below\" | \"unspecified\";\n\ntype LadderDistributionLabel = \"linear\" | \"geometric\" | \"weighted_favorable\" | \"unspecified\";\n\nconst TriggerResultStatusSchema = enumLabelSchema(TriggerStatusCodec.protoToOutput);\n\nconst TriggerMutationResultBaseSchema = v.pipe(\n v.object({\n triggerId: PublicIdSchema,\n status: TriggerResultStatusSchema,\n tsNs: v.bigint(),\n }),\n v.transform(({ tsNs, ...result }) => ({\n ...result,\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n);\n\nexport const CreateTriggerResultSchema = v.pipe(\n v.object({\n triggerId: PublicIdSchema,\n clientTriggerId: v.string(),\n acceptedAt: OptionalTimestampMsSchema,\n acceptedAtTsNs: BigIntStringSchema,\n }),\n v.transform(({ acceptedAt, acceptedAtTsNs, ...result }) => ({\n ...result,\n acceptedAt: acceptedAt ?? tsNsToMs(BigInt(acceptedAtTsNs)),\n acceptedAtNs: acceptedAtTsNs,\n })),\n);\n\nexport type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;\n\nexport const CancelTriggerResultSchema = TriggerMutationResultBaseSchema;\n\nexport type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;\n\nexport const ModifyTriggerResultSchema = TriggerMutationResultBaseSchema;\n\nexport type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;\n\nexport const PauseTriggerResultSchema = TriggerMutationResultBaseSchema;\nexport type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;\n\nexport const ResumeTriggerResultSchema = TriggerMutationResultBaseSchema;\nexport type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;\n\nconst MaxSlippageRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"maxSlippageTicks\"), value: v.bigint() }),\n v.object({ case: v.literal(\"maxSlippageBps\"), value: v.number() }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst ConditionalExecutionRawSchema = v.variant(\"case\", [\n v.object({\n case: v.literal(\"marketIoc\"),\n value: v.object({ maxSlippage: v.optional(MaxSlippageRawSchema, { case: undefined }) }),\n }),\n v.object({\n case: v.literal(\"limitGtc\"),\n value: v.object({\n priceTicks: v.bigint(),\n postOnly: v.boolean(),\n }),\n }),\n v.object({\n case: v.literal(\"limitIoc\"),\n value: v.object({ priceTicks: v.bigint() }),\n }),\n v.object({\n case: v.literal(\"limitFok\"),\n value: v.object({ priceTicks: v.bigint() }),\n }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst ConditionalConfigurationRawSchema = v.object({\n triggerPriceTicks: v.bigint(),\n side: v.number(),\n child: v.optional(\n v.object({\n execution: ConditionalExecutionRawSchema,\n }),\n ),\n});\n\nconst TrailingConfigurationRawSchema = v.object({\n trailingDistance: v.variant(\"case\", [\n v.object({ case: v.literal(\"trailingDistanceTicks\"), value: v.bigint() }),\n v.object({ case: v.literal(\"trailingDistanceBps\"), value: v.number() }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n ]),\n activationPriceTicks: v.bigint(),\n maxSlippage: MaxSlippageRawSchema,\n side: v.number(),\n limitPriceTicks: v.optional(v.bigint(), 0n),\n});\n\nconst TwapConfigurationRawSchema = v.object({\n side: v.number(),\n durationMs: v.bigint(),\n sliceIntervalMs: v.bigint(),\n execution: v.variant(\"case\", [\n v.object({\n case: v.literal(\"marketIoc\"),\n value: v.object({ maxSlippage: MaxSlippageRawSchema }),\n }),\n v.object({\n case: v.literal(\"limitGtc\"),\n value: v.object({ priceTicks: v.bigint() }),\n }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n ]),\n});\n\nconst LadderConfigurationRawSchema = v.object({\n side: v.number(),\n priceMinTicks: v.bigint(),\n priceMaxTicks: v.bigint(),\n levels: v.number(),\n postOnly: v.boolean(),\n});\n\nconst TriggerConfigurationRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"stopLoss\"), value: ConditionalConfigurationRawSchema }),\n v.object({ case: v.literal(\"takeProfit\"), value: ConditionalConfigurationRawSchema }),\n v.object({ case: v.literal(\"trailingStop\"), value: TrailingConfigurationRawSchema }),\n v.object({ case: v.literal(\"twap\"), value: TwapConfigurationRawSchema }),\n v.object({ case: v.literal(\"ladder\"), value: LadderConfigurationRawSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nfunction transformConditionalExecution(\n execution: v.InferOutput<typeof ConditionalExecutionRawSchema>,\n scales: SdkScales,\n) {\n switch (execution.case) {\n case \"marketIoc\":\n return {\n type: \"market_ioc\",\n maxSlippage: formatMaxSlippage(execution.value.maxSlippage, scales),\n } as const;\n case \"limitGtc\":\n return {\n type: \"limit_gtc\",\n price: scaledToDecimalOutput(execution.value.priceTicks, scales.price()),\n postOnly: execution.value.postOnly,\n } as const;\n case \"limitIoc\":\n return {\n type: \"limit_ioc\",\n price: scaledToDecimalOutput(execution.value.priceTicks, scales.price()),\n } as const;\n case \"limitFok\":\n return {\n type: \"limit_fok\",\n price: scaledToDecimalOutput(execution.value.priceTicks, scales.price()),\n } as const;\n default:\n return { type: \"unspecified\" } as const;\n }\n}\n\nfunction transformTriggerConfiguration(\n configuration: v.InferOutput<typeof TriggerConfigurationRawSchema>,\n scales: SdkScales,\n) {\n switch (configuration.case) {\n case \"stopLoss\":\n case \"takeProfit\":\n return {\n type:\n configuration.case === \"stopLoss\"\n ? (\"stop_loss\" as const)\n : (\"take_profit\" as const),\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n triggerPrice: scaledToDecimalOutput(\n configuration.value.triggerPriceTicks,\n scales.price(),\n ),\n execution: transformConditionalExecution(\n configuration.value.child?.execution ?? { case: undefined },\n scales,\n ),\n };\n case \"trailingStop\":\n return {\n type: \"trailing_stop\" as const,\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n trailingDistance:\n configuration.value.trailingDistance.case === \"trailingDistanceTicks\"\n ? {\n kind: \"distance\" as const,\n distance: scaledToDecimalOutput(\n configuration.value.trailingDistance.value,\n scales.price(),\n ),\n }\n : configuration.value.trailingDistance.case === \"trailingDistanceBps\"\n ? {\n kind: \"bps\" as const,\n bps: configuration.value.trailingDistance.value,\n }\n : { kind: \"unspecified\" as const },\n activationPrice:\n configuration.value.activationPriceTicks > 0n\n ? scaledToDecimalOutput(\n configuration.value.activationPriceTicks,\n scales.price(),\n )\n : undefined,\n maxSlippage: formatMaxSlippage(configuration.value.maxSlippage, scales),\n limitPrice:\n configuration.value.limitPriceTicks > 0n\n ? scaledToDecimalOutput(configuration.value.limitPriceTicks, scales.price())\n : undefined,\n };\n case \"twap\":\n return {\n type: \"twap\" as const,\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n durationMs: Number(configuration.value.durationMs),\n sliceIntervalMs: Number(configuration.value.sliceIntervalMs),\n execution:\n configuration.value.execution.case === \"marketIoc\"\n ? ({\n type: \"market_ioc\",\n maxSlippage: formatMaxSlippage(\n configuration.value.execution.value.maxSlippage,\n scales,\n ),\n } as const)\n : configuration.value.execution.case === \"limitGtc\"\n ? ({\n type: \"limit_gtc\",\n price: scaledToDecimalOutput(\n configuration.value.execution.value.priceTicks,\n scales.price(),\n ),\n } as const)\n : ({ type: \"unspecified\" } as const),\n };\n case \"ladder\":\n return {\n type: \"ladder\" as const,\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n priceMin: scaledToDecimalOutput(configuration.value.priceMinTicks, scales.price()),\n priceMax: scaledToDecimalOutput(configuration.value.priceMaxTicks, scales.price()),\n levels: configuration.value.levels,\n postOnly: configuration.value.postOnly,\n };\n default:\n return { type: \"unspecified\" as const };\n }\n}\n\nfunction formatMaxSlippage(\n maxSlippage: v.InferOutput<typeof MaxSlippageRawSchema>,\n scales: SdkScales,\n) {\n return maxSlippage.case === \"maxSlippageTicks\"\n ? {\n kind: \"slippage\" as const,\n slippage: scaledToDecimalOutput(maxSlippage.value, scales.price()),\n }\n : maxSlippage.case === \"maxSlippageBps\"\n ? { kind: \"bps\" as const, bps: maxSlippage.value }\n : { kind: \"none\" as const };\n}\n\nconst TerminalReasonRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"cancelReason\"), value: v.number() }),\n v.object({ case: v.literal(\"failureReason\"), value: v.number() }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nfunction transformTerminalReason(reason: v.InferOutput<typeof TerminalReasonRawSchema>) {\n switch (reason.case) {\n case \"cancelReason\":\n return {\n cancelReason: enumLabel(TriggerCancelReasonCodec.protoToOutput, reason.value),\n failureReason: undefined,\n };\n case \"failureReason\":\n return {\n cancelReason: undefined,\n failureReason: enumLabel(TriggerFailureReasonCodec.protoToOutput, reason.value),\n };\n default:\n return { cancelReason: undefined, failureReason: undefined };\n }\n}\n\nconst StopDetailsRawSchema = v.object({\n triggerPriceTicks: v.bigint(),\n triggerPriceSource: v.number(),\n triggerDirection: v.number(),\n});\n\nconst TrailingDetailsRawSchema = v.object({\n trailingDistanceTicks: v.bigint(),\n activationPriceTicks: v.bigint(),\n peakPriceTicks: v.bigint(),\n troughPriceTicks: v.bigint(),\n trailingDistanceBps: v.number(),\n maxSlippageTicks: v.bigint(),\n maxSlippageBps: v.number(),\n triggerPriceSource: v.number(),\n triggerDirection: v.number(),\n triggerPriceTicks: v.optional(v.bigint()),\n});\n\nconst TwapDetailsRawSchema = v.object({\n twapDurationMs: v.bigint(),\n twapSliceIntervalMs: v.bigint(),\n sliceIdx: v.number(),\n sliceCount: v.number(),\n executedQtyScaled: v.bigint(),\n});\n\nconst LadderDetailsRawSchema = v.object({\n ladderPriceMinTicks: v.bigint(),\n ladderPriceMaxTicks: v.bigint(),\n ladderLevels: v.number(),\n ladderDistribution: v.number(),\n executedQtyScaled: v.bigint(),\n executedLevels: v.number(),\n});\n\nconst TriggerDetailsRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"stop\"), value: StopDetailsRawSchema }),\n v.object({ case: v.literal(\"trailing\"), value: TrailingDetailsRawSchema }),\n v.object({ case: v.literal(\"twapState\"), value: TwapDetailsRawSchema }),\n v.object({ case: v.literal(\"ladderState\"), value: LadderDetailsRawSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nexport type StopDetailsOutput = {\n case: \"stop\";\n triggerPrice: string;\n triggerPriceSource: TriggerPriceSourceLabel;\n triggerDirection: TriggerDirectionLabel;\n};\n\nexport type TrailingDetailsOutput = {\n case: \"trailing\";\n trailingDistance: string | undefined;\n trailingDistanceBps: number;\n activationPrice: string | undefined;\n peakPrice: string | undefined;\n troughPrice: string | undefined;\n maxSlippage: string | undefined;\n maxSlippageBps: number;\n triggerPriceSource: TriggerPriceSourceLabel;\n triggerDirection: TriggerDirectionLabel;\n /** Current trailing threshold; absent until the trigger is armed. Moves with the peak or trough. */\n triggerPrice: string | undefined;\n};\n\nexport type TwapDetailsOutput = {\n case: \"twap\";\n twapDurationMs: number;\n twapSliceIntervalMs: number;\n sliceIdx: number;\n sliceCount: number;\n /** Cumulative filled child-order base quantity. */\n executedQty: string;\n};\n\nexport type LadderDetailsOutput = {\n case: \"ladder\";\n ladderPriceMin: string;\n ladderPriceMax: string;\n ladderLevels: number;\n ladderDistribution: LadderDistributionLabel;\n /** Cumulative filled child-order base quantity. */\n executedQty: string;\n /** Number of ladder levels with at least one fill. */\n executedLevels: number;\n};\n\nexport type TriggerDetailsOutput =\n | StopDetailsOutput\n | TrailingDetailsOutput\n | TwapDetailsOutput\n | LadderDetailsOutput\n | { case: undefined };\n\nfunction transformTriggerDetails(\n details: v.InferOutput<typeof TriggerDetailsRawSchema>,\n scales: SdkScales,\n symbolId: number,\n): TriggerDetailsOutput {\n switch (details.case) {\n case \"stop\":\n return {\n case: \"stop\",\n triggerPrice: scaledToDecimalOutput(\n details.value.triggerPriceTicks,\n scales.price(),\n ),\n triggerPriceSource: enumLabel(\n TriggerPriceSourceCodec.protoToOutput,\n details.value.triggerPriceSource,\n ),\n triggerDirection: enumLabel(\n TriggerDirectionCodec.protoToOutput,\n details.value.triggerDirection,\n ),\n };\n case \"trailing\":\n return {\n case: \"trailing\",\n trailingDistance:\n details.value.trailingDistanceTicks > 0n\n ? scaledToDecimalOutput(details.value.trailingDistanceTicks, scales.price())\n : undefined,\n trailingDistanceBps: details.value.trailingDistanceBps,\n activationPrice:\n details.value.activationPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.activationPriceTicks, scales.price())\n : undefined,\n peakPrice:\n details.value.peakPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.peakPriceTicks, scales.price())\n : undefined,\n troughPrice:\n details.value.troughPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.troughPriceTicks, scales.price())\n : undefined,\n maxSlippage:\n details.value.maxSlippageTicks > 0n\n ? scaledToDecimalOutput(details.value.maxSlippageTicks, scales.price())\n : undefined,\n maxSlippageBps: details.value.maxSlippageBps,\n triggerPriceSource: enumLabel(\n TriggerPriceSourceCodec.protoToOutput,\n details.value.triggerPriceSource,\n ),\n triggerDirection: enumLabel(\n TriggerDirectionCodec.protoToOutput,\n details.value.triggerDirection,\n ),\n triggerPrice:\n details.value.triggerPriceTicks !== undefined &&\n details.value.triggerPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.triggerPriceTicks, scales.price())\n : undefined,\n };\n case \"twapState\":\n return {\n case: \"twap\",\n twapDurationMs: Number(details.value.twapDurationMs),\n twapSliceIntervalMs: Number(details.value.twapSliceIntervalMs),\n sliceIdx: details.value.sliceIdx,\n sliceCount: details.value.sliceCount,\n executedQty: scaledToDecimalOutput(\n details.value.executedQtyScaled,\n scales.baseQty(symbolId),\n ),\n };\n case \"ladderState\":\n return {\n case: \"ladder\",\n ladderPriceMin: scaledToDecimalOutput(\n details.value.ladderPriceMinTicks,\n scales.price(),\n ),\n ladderPriceMax: scaledToDecimalOutput(\n details.value.ladderPriceMaxTicks,\n scales.price(),\n ),\n ladderLevels: details.value.ladderLevels,\n ladderDistribution: enumLabel(\n LadderDistributionCodec.protoToOutput,\n details.value.ladderDistribution,\n ),\n executedQty: scaledToDecimalOutput(\n details.value.executedQtyScaled,\n scales.baseQty(symbolId),\n ),\n executedLevels: details.value.executedLevels,\n };\n default:\n return { case: undefined };\n }\n}\n\n/** Builds the public trigger output schema using each record's symbol ID for quantity scaling. */\nexport function createTriggerSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n triggerId: v.bigint(),\n subaccountId: v.bigint(),\n symbolId: v.number(),\n status: v.number(),\n parentOrderId: v.optional(v.bigint()),\n qtyScaled: v.bigint(),\n feeAsset: v.number(),\n selfTradePreventionMode: v.number(),\n configuration: TriggerConfigurationRawSchema,\n clientTriggerId: v.string(),\n createdAt: v.optional(TimestampSchema),\n updatedAt: v.optional(TimestampSchema),\n armedAt: v.optional(TimestampSchema),\n completedAt: v.optional(TimestampSchema),\n terminalReason: TerminalReasonRawSchema,\n runtimeDetails: TriggerDetailsRawSchema,\n version: v.pipe(v.number(), v.integer(), v.minValue(0)),\n }),\n v.transform((t) => ({\n triggerId: formatId(t.triggerId),\n subaccountId: formatId(t.subaccountId),\n symbolId: t.symbolId,\n status: enumLabel(TriggerStatusCodec.protoToOutput, t.status),\n parentOrderId: t.parentOrderId ? formatId(t.parentOrderId) : undefined,\n qty: scaledToDecimalOutput(t.qtyScaled, scales.baseQty(t.symbolId)),\n feeAsset: enumLabel(FeeAssetCodec.protoToOutput, t.feeAsset),\n selfTradePreventionMode: enumLabel(\n SelfTradePreventionModeCodec.protoToOutput,\n t.selfTradePreventionMode,\n ),\n configuration: transformTriggerConfiguration(t.configuration, scales),\n clientTriggerId: t.clientTriggerId,\n createdTs: t.createdAt ? tsObjToMs(t.createdAt) : undefined,\n updatedTs: t.updatedAt ? tsObjToMs(t.updatedAt) : undefined,\n armedTs: t.armedAt ? tsObjToMs(t.armedAt) : undefined,\n completedTs: t.completedAt ? tsObjToMs(t.completedAt) : undefined,\n ...transformTerminalReason(t.terminalReason),\n runtimeDetails: transformTriggerDetails(t.runtimeDetails, scales, t.symbolId),\n version: t.version,\n })),\n );\n}\n\n/** A normalized standalone trigger record. */\nexport type Trigger = v.InferOutput<ReturnType<typeof createTriggerSchema>>;\n\nexport function createTriggerEventSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n triggerId: v.bigint(),\n subaccountId: v.bigint(),\n symbolId: v.number(),\n triggerType: v.number(),\n eventType: v.number(),\n tsNs: v.bigint(),\n childSeq: v.number(),\n childOrderId: v.bigint(),\n firePriceTicks: v.optional(v.bigint()),\n terminalReason: TerminalReasonRawSchema,\n fireRefusalReason: v.optional(v.number()),\n }),\n v.transform((e) => ({\n triggerId: formatId(e.triggerId),\n subaccountId: formatId(e.subaccountId),\n symbolId: e.symbolId,\n triggerType: enumLabel(TriggerTypeCodec.protoToOutput, e.triggerType),\n eventType: enumLabel(TriggerEventTypeCodec.protoToOutput, e.eventType),\n ts: tsNsToMs(e.tsNs),\n tsNs: e.tsNs.toString(),\n childSeq: e.childSeq,\n childOrderId: e.childOrderId > 0n ? formatId(e.childOrderId) : undefined,\n firePrice:\n e.firePriceTicks !== undefined && e.firePriceTicks > 0n\n ? scaledToDecimalOutput(e.firePriceTicks, scales.price())\n : undefined,\n ...transformTerminalReason(e.terminalReason),\n /** Why a `fire_refused` attempt was refused; the trigger stayed live. */\n fireRefusalReason:\n e.fireRefusalReason === undefined\n ? undefined\n : enumLabel(TriggerFailureReasonCodec.protoToOutput, e.fireRefusalReason),\n })),\n );\n}\n\nexport type TriggerEvent = v.InferOutput<ReturnType<typeof createTriggerEventSchema>>;\n\nexport type ListTriggerEventsResult = {\n events: TriggerEvent[];\n nextPageToken: string;\n};\n"],"mappings":";;;;;;;;;AA+BA,MAAM,4BAA4B,gBAAgB,mBAAmB,aAAa;AAElF,MAAM,kCAAkC,EAAE,KACtC,EAAE,OAAO;CACL,WAAW;CACX,QAAQ;CACR,MAAM,EAAE,OAAO;AACnB,CAAC,GACD,EAAE,WAAW,EAAE,MAAM,GAAG,cAAc;CAClC,GAAG;CACH,IAAI,SAAS,IAAI;CACjB,MAAM,KAAK,SAAS;AACxB,EAAE,CACN;AAEA,MAAa,4BAA4B,EAAE,KACvC,EAAE,OAAO;CACL,WAAW;CACX,iBAAiB,EAAE,OAAO;CAC1B,YAAY;CACZ,gBAAgB;AACpB,CAAC,GACD,EAAE,WAAW,EAAE,YAAY,gBAAgB,GAAG,cAAc;CACxD,GAAG;CACH,YAAY,cAAc,SAAS,OAAO,cAAc,CAAC;CACzD,cAAc;AAClB,EAAE,CACN;AAIA,MAAa,4BAA4B;AAIzC,MAAa,4BAA4B;AAIzC,MAAa,2BAA2B;AAGxC,MAAa,4BAA4B;AAGzC,MAAM,uB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/services/triggers/triggers-output.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n BigIntStringSchema,\n OptionalTimestampMsSchema,\n TimestampSchema,\n PublicIdSchema,\n} from \"../../shared/schemas.js\";\nimport { enumLabel, enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { tsNsToMs, tsObjToMs } from \"../../utils/time.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport {\n TriggerTypeCodec,\n TriggerStatusCodec,\n FeeAssetCodec,\n SelfTradePreventionModeCodec,\n TriggerPriceSourceCodec,\n TriggerDirectionCodec,\n LadderDistributionCodec,\n TriggerSideCodec,\n TriggerEventTypeCodec,\n TriggerCancelReasonCodec,\n TriggerFailureReasonCodec,\n} from \"./triggers.codecs.js\";\n\ntype TriggerPriceSourceLabel = \"last\" | \"index\" | \"mark\" | \"unspecified\";\n\ntype TriggerDirectionLabel = \"above\" | \"below\" | \"unspecified\";\n\ntype LadderDistributionLabel = \"linear\" | \"geometric\" | \"weighted_favorable\" | \"unspecified\";\n\nconst TriggerResultStatusSchema = enumLabelSchema(TriggerStatusCodec.protoToOutput);\n\nconst TriggerMutationResultBaseSchema = v.pipe(\n v.object({\n triggerId: PublicIdSchema,\n status: TriggerResultStatusSchema,\n tsNs: v.bigint(),\n }),\n v.transform(({ tsNs, ...result }) => ({\n ...result,\n ts: tsNsToMs(tsNs),\n tsNs: tsNs.toString(),\n })),\n);\n\nexport const CreateTriggerResultSchema = v.pipe(\n v.object({\n triggerId: PublicIdSchema,\n clientTriggerId: v.string(),\n acceptedAt: OptionalTimestampMsSchema,\n acceptedAtTsNs: BigIntStringSchema,\n }),\n v.transform(({ acceptedAt, acceptedAtTsNs, ...result }) => ({\n ...result,\n acceptedAt: acceptedAt ?? tsNsToMs(BigInt(acceptedAtTsNs)),\n acceptedAtNs: acceptedAtTsNs,\n })),\n);\n\nexport type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;\n\nexport const CancelTriggerResultSchema = TriggerMutationResultBaseSchema;\n\nexport type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;\n\nexport const ModifyTriggerResultSchema = TriggerMutationResultBaseSchema;\n\nexport type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;\n\nexport const PauseTriggerResultSchema = TriggerMutationResultBaseSchema;\nexport type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;\n\nexport const ResumeTriggerResultSchema = TriggerMutationResultBaseSchema;\nexport type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;\n\nconst MaxSlippageRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"maxSlippageTicks\"), value: v.bigint() }),\n v.object({ case: v.literal(\"maxSlippageBps\"), value: v.number() }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst ConditionalExecutionRawSchema = v.variant(\"case\", [\n v.object({\n case: v.literal(\"marketIoc\"),\n value: v.object({ maxSlippage: v.optional(MaxSlippageRawSchema, { case: undefined }) }),\n }),\n v.object({\n case: v.literal(\"limitGtc\"),\n value: v.object({\n priceTicks: v.bigint(),\n postOnly: v.boolean(),\n }),\n }),\n v.object({\n case: v.literal(\"limitIoc\"),\n value: v.object({ priceTicks: v.bigint() }),\n }),\n v.object({\n case: v.literal(\"limitFok\"),\n value: v.object({ priceTicks: v.bigint() }),\n }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nconst ConditionalConfigurationRawSchema = v.object({\n triggerPriceTicks: v.bigint(),\n triggerPriceSource: v.optional(v.number(), 0),\n side: v.number(),\n child: v.optional(\n v.object({\n execution: ConditionalExecutionRawSchema,\n }),\n ),\n});\n\nconst TrailingConfigurationRawSchema = v.object({\n trailingDistance: v.variant(\"case\", [\n v.object({ case: v.literal(\"trailingDistanceTicks\"), value: v.bigint() }),\n v.object({ case: v.literal(\"trailingDistanceBps\"), value: v.number() }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n ]),\n activationPriceTicks: v.bigint(),\n maxSlippage: MaxSlippageRawSchema,\n side: v.number(),\n limitPriceTicks: v.optional(v.bigint(), 0n),\n triggerPriceSource: v.optional(v.number(), 0),\n});\n\nconst TwapConfigurationRawSchema = v.object({\n side: v.number(),\n durationMs: v.bigint(),\n sliceIntervalMs: v.bigint(),\n execution: v.variant(\"case\", [\n v.object({\n case: v.literal(\"marketIoc\"),\n value: v.object({ maxSlippage: MaxSlippageRawSchema }),\n }),\n v.object({\n case: v.literal(\"limitGtc\"),\n value: v.object({ priceTicks: v.bigint() }),\n }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n ]),\n});\n\nconst LadderConfigurationRawSchema = v.object({\n side: v.number(),\n priceMinTicks: v.bigint(),\n priceMaxTicks: v.bigint(),\n levels: v.number(),\n postOnly: v.boolean(),\n});\n\nconst TriggerConfigurationRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"stopLoss\"), value: ConditionalConfigurationRawSchema }),\n v.object({ case: v.literal(\"takeProfit\"), value: ConditionalConfigurationRawSchema }),\n v.object({ case: v.literal(\"trailingStop\"), value: TrailingConfigurationRawSchema }),\n v.object({ case: v.literal(\"twap\"), value: TwapConfigurationRawSchema }),\n v.object({ case: v.literal(\"ladder\"), value: LadderConfigurationRawSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nfunction transformConditionalExecution(\n execution: v.InferOutput<typeof ConditionalExecutionRawSchema>,\n scales: SdkScales,\n) {\n switch (execution.case) {\n case \"marketIoc\":\n return {\n type: \"market_ioc\",\n maxSlippage: formatMaxSlippage(execution.value.maxSlippage, scales),\n } as const;\n case \"limitGtc\":\n return {\n type: \"limit_gtc\",\n price: scaledToDecimalOutput(execution.value.priceTicks, scales.price()),\n postOnly: execution.value.postOnly,\n } as const;\n case \"limitIoc\":\n return {\n type: \"limit_ioc\",\n price: scaledToDecimalOutput(execution.value.priceTicks, scales.price()),\n } as const;\n case \"limitFok\":\n return {\n type: \"limit_fok\",\n price: scaledToDecimalOutput(execution.value.priceTicks, scales.price()),\n } as const;\n default:\n return { type: \"unspecified\" } as const;\n }\n}\n\nfunction transformTriggerConfiguration(\n configuration: v.InferOutput<typeof TriggerConfigurationRawSchema>,\n scales: SdkScales,\n) {\n switch (configuration.case) {\n case \"stopLoss\":\n case \"takeProfit\":\n return {\n type:\n configuration.case === \"stopLoss\"\n ? (\"stop_loss\" as const)\n : (\"take_profit\" as const),\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n triggerPrice: scaledToDecimalOutput(\n configuration.value.triggerPriceTicks,\n scales.price(),\n ),\n triggerPriceSource: enumLabel(\n TriggerPriceSourceCodec.protoToOutput,\n configuration.value.triggerPriceSource,\n ),\n execution: transformConditionalExecution(\n configuration.value.child?.execution ?? { case: undefined },\n scales,\n ),\n };\n case \"trailingStop\":\n return {\n type: \"trailing_stop\" as const,\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n trailingDistance:\n configuration.value.trailingDistance.case === \"trailingDistanceTicks\"\n ? {\n kind: \"distance\" as const,\n distance: scaledToDecimalOutput(\n configuration.value.trailingDistance.value,\n scales.price(),\n ),\n }\n : configuration.value.trailingDistance.case === \"trailingDistanceBps\"\n ? {\n kind: \"bps\" as const,\n bps: configuration.value.trailingDistance.value,\n }\n : { kind: \"unspecified\" as const },\n activationPrice:\n configuration.value.activationPriceTicks > 0n\n ? scaledToDecimalOutput(\n configuration.value.activationPriceTicks,\n scales.price(),\n )\n : undefined,\n maxSlippage: formatMaxSlippage(configuration.value.maxSlippage, scales),\n limitPrice:\n configuration.value.limitPriceTicks > 0n\n ? scaledToDecimalOutput(configuration.value.limitPriceTicks, scales.price())\n : undefined,\n triggerPriceSource: enumLabel(\n TriggerPriceSourceCodec.protoToOutput,\n configuration.value.triggerPriceSource,\n ),\n };\n case \"twap\":\n return {\n type: \"twap\" as const,\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n durationMs: Number(configuration.value.durationMs),\n sliceIntervalMs: Number(configuration.value.sliceIntervalMs),\n execution:\n configuration.value.execution.case === \"marketIoc\"\n ? ({\n type: \"market_ioc\",\n maxSlippage: formatMaxSlippage(\n configuration.value.execution.value.maxSlippage,\n scales,\n ),\n } as const)\n : configuration.value.execution.case === \"limitGtc\"\n ? ({\n type: \"limit_gtc\",\n price: scaledToDecimalOutput(\n configuration.value.execution.value.priceTicks,\n scales.price(),\n ),\n } as const)\n : ({ type: \"unspecified\" } as const),\n };\n case \"ladder\":\n return {\n type: \"ladder\" as const,\n side: enumLabel(TriggerSideCodec.protoToOutput, configuration.value.side),\n priceMin: scaledToDecimalOutput(configuration.value.priceMinTicks, scales.price()),\n priceMax: scaledToDecimalOutput(configuration.value.priceMaxTicks, scales.price()),\n levels: configuration.value.levels,\n postOnly: configuration.value.postOnly,\n };\n default:\n return { type: \"unspecified\" as const };\n }\n}\n\nfunction formatMaxSlippage(\n maxSlippage: v.InferOutput<typeof MaxSlippageRawSchema>,\n scales: SdkScales,\n) {\n return maxSlippage.case === \"maxSlippageTicks\"\n ? {\n kind: \"slippage\" as const,\n slippage: scaledToDecimalOutput(maxSlippage.value, scales.price()),\n }\n : maxSlippage.case === \"maxSlippageBps\"\n ? { kind: \"bps\" as const, bps: maxSlippage.value }\n : { kind: \"none\" as const };\n}\n\nconst TerminalReasonRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"cancelReason\"), value: v.number() }),\n v.object({ case: v.literal(\"failureReason\"), value: v.number() }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nfunction transformTerminalReason(reason: v.InferOutput<typeof TerminalReasonRawSchema>) {\n switch (reason.case) {\n case \"cancelReason\":\n return {\n cancelReason: enumLabel(TriggerCancelReasonCodec.protoToOutput, reason.value),\n failureReason: undefined,\n };\n case \"failureReason\":\n return {\n cancelReason: undefined,\n failureReason: enumLabel(TriggerFailureReasonCodec.protoToOutput, reason.value),\n };\n default:\n return { cancelReason: undefined, failureReason: undefined };\n }\n}\n\nconst StopDetailsRawSchema = v.object({\n triggerPriceTicks: v.bigint(),\n triggerPriceSource: v.number(),\n triggerDirection: v.number(),\n});\n\nconst TrailingDetailsRawSchema = v.object({\n trailingDistanceTicks: v.bigint(),\n activationPriceTicks: v.bigint(),\n peakPriceTicks: v.bigint(),\n troughPriceTicks: v.bigint(),\n trailingDistanceBps: v.number(),\n maxSlippageTicks: v.bigint(),\n maxSlippageBps: v.number(),\n triggerPriceSource: v.number(),\n triggerDirection: v.number(),\n triggerPriceTicks: v.optional(v.bigint()),\n});\n\nconst TwapDetailsRawSchema = v.object({\n twapDurationMs: v.bigint(),\n twapSliceIntervalMs: v.bigint(),\n sliceIdx: v.number(),\n sliceCount: v.number(),\n executedQtyScaled: v.bigint(),\n});\n\nconst LadderDetailsRawSchema = v.object({\n ladderPriceMinTicks: v.bigint(),\n ladderPriceMaxTicks: v.bigint(),\n ladderLevels: v.number(),\n ladderDistribution: v.number(),\n executedQtyScaled: v.bigint(),\n executedLevels: v.number(),\n});\n\nconst TriggerDetailsRawSchema = v.variant(\"case\", [\n v.object({ case: v.literal(\"stop\"), value: StopDetailsRawSchema }),\n v.object({ case: v.literal(\"trailing\"), value: TrailingDetailsRawSchema }),\n v.object({ case: v.literal(\"twapState\"), value: TwapDetailsRawSchema }),\n v.object({ case: v.literal(\"ladderState\"), value: LadderDetailsRawSchema }),\n v.object({ case: v.undefined(), value: v.optional(v.undefined()) }),\n]);\n\nexport type StopDetailsOutput = {\n case: \"stop\";\n triggerPrice: string;\n triggerPriceSource: TriggerPriceSourceLabel;\n triggerDirection: TriggerDirectionLabel;\n};\n\nexport type TrailingDetailsOutput = {\n case: \"trailing\";\n trailingDistance: string | undefined;\n trailingDistanceBps: number;\n activationPrice: string | undefined;\n peakPrice: string | undefined;\n troughPrice: string | undefined;\n maxSlippage: string | undefined;\n maxSlippageBps: number;\n triggerPriceSource: TriggerPriceSourceLabel;\n triggerDirection: TriggerDirectionLabel;\n /** Current trailing threshold; absent until the trigger is armed. Moves with the peak or trough. */\n triggerPrice: string | undefined;\n};\n\nexport type TwapDetailsOutput = {\n case: \"twap\";\n twapDurationMs: number;\n twapSliceIntervalMs: number;\n sliceIdx: number;\n sliceCount: number;\n /** Cumulative filled child-order base quantity. */\n executedQty: string;\n};\n\nexport type LadderDetailsOutput = {\n case: \"ladder\";\n ladderPriceMin: string;\n ladderPriceMax: string;\n ladderLevels: number;\n ladderDistribution: LadderDistributionLabel;\n /** Cumulative filled child-order base quantity. */\n executedQty: string;\n /** Number of ladder levels with at least one fill. */\n executedLevels: number;\n};\n\nexport type TriggerDetailsOutput =\n | StopDetailsOutput\n | TrailingDetailsOutput\n | TwapDetailsOutput\n | LadderDetailsOutput\n | { case: undefined };\n\nfunction transformTriggerDetails(\n details: v.InferOutput<typeof TriggerDetailsRawSchema>,\n scales: SdkScales,\n symbolId: number,\n): TriggerDetailsOutput {\n switch (details.case) {\n case \"stop\":\n return {\n case: \"stop\",\n triggerPrice: scaledToDecimalOutput(\n details.value.triggerPriceTicks,\n scales.price(),\n ),\n triggerPriceSource: enumLabel(\n TriggerPriceSourceCodec.protoToOutput,\n details.value.triggerPriceSource,\n ),\n triggerDirection: enumLabel(\n TriggerDirectionCodec.protoToOutput,\n details.value.triggerDirection,\n ),\n };\n case \"trailing\":\n return {\n case: \"trailing\",\n trailingDistance:\n details.value.trailingDistanceTicks > 0n\n ? scaledToDecimalOutput(details.value.trailingDistanceTicks, scales.price())\n : undefined,\n trailingDistanceBps: details.value.trailingDistanceBps,\n activationPrice:\n details.value.activationPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.activationPriceTicks, scales.price())\n : undefined,\n peakPrice:\n details.value.peakPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.peakPriceTicks, scales.price())\n : undefined,\n troughPrice:\n details.value.troughPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.troughPriceTicks, scales.price())\n : undefined,\n maxSlippage:\n details.value.maxSlippageTicks > 0n\n ? scaledToDecimalOutput(details.value.maxSlippageTicks, scales.price())\n : undefined,\n maxSlippageBps: details.value.maxSlippageBps,\n triggerPriceSource: enumLabel(\n TriggerPriceSourceCodec.protoToOutput,\n details.value.triggerPriceSource,\n ),\n triggerDirection: enumLabel(\n TriggerDirectionCodec.protoToOutput,\n details.value.triggerDirection,\n ),\n triggerPrice:\n details.value.triggerPriceTicks !== undefined &&\n details.value.triggerPriceTicks > 0n\n ? scaledToDecimalOutput(details.value.triggerPriceTicks, scales.price())\n : undefined,\n };\n case \"twapState\":\n return {\n case: \"twap\",\n twapDurationMs: Number(details.value.twapDurationMs),\n twapSliceIntervalMs: Number(details.value.twapSliceIntervalMs),\n sliceIdx: details.value.sliceIdx,\n sliceCount: details.value.sliceCount,\n executedQty: scaledToDecimalOutput(\n details.value.executedQtyScaled,\n scales.baseQty(symbolId),\n ),\n };\n case \"ladderState\":\n return {\n case: \"ladder\",\n ladderPriceMin: scaledToDecimalOutput(\n details.value.ladderPriceMinTicks,\n scales.price(),\n ),\n ladderPriceMax: scaledToDecimalOutput(\n details.value.ladderPriceMaxTicks,\n scales.price(),\n ),\n ladderLevels: details.value.ladderLevels,\n ladderDistribution: enumLabel(\n LadderDistributionCodec.protoToOutput,\n details.value.ladderDistribution,\n ),\n executedQty: scaledToDecimalOutput(\n details.value.executedQtyScaled,\n scales.baseQty(symbolId),\n ),\n executedLevels: details.value.executedLevels,\n };\n default:\n return { case: undefined };\n }\n}\n\n/** Builds the public trigger output schema using each record's symbol ID for quantity scaling. */\nexport function createTriggerSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n triggerId: v.bigint(),\n subaccountId: v.bigint(),\n symbolId: v.number(),\n status: v.number(),\n parentOrderId: v.optional(v.bigint()),\n qtyScaled: v.bigint(),\n feeAsset: v.number(),\n selfTradePreventionMode: v.number(),\n configuration: TriggerConfigurationRawSchema,\n clientTriggerId: v.string(),\n createdAt: v.optional(TimestampSchema),\n updatedAt: v.optional(TimestampSchema),\n armedAt: v.optional(TimestampSchema),\n completedAt: v.optional(TimestampSchema),\n terminalReason: TerminalReasonRawSchema,\n runtimeDetails: TriggerDetailsRawSchema,\n version: v.pipe(v.number(), v.integer(), v.minValue(0)),\n }),\n v.transform((t) => ({\n triggerId: formatId(t.triggerId),\n subaccountId: formatId(t.subaccountId),\n symbolId: t.symbolId,\n status: enumLabel(TriggerStatusCodec.protoToOutput, t.status),\n parentOrderId: t.parentOrderId ? formatId(t.parentOrderId) : undefined,\n qty: scaledToDecimalOutput(t.qtyScaled, scales.baseQty(t.symbolId)),\n feeAsset: enumLabel(FeeAssetCodec.protoToOutput, t.feeAsset),\n selfTradePreventionMode: enumLabel(\n SelfTradePreventionModeCodec.protoToOutput,\n t.selfTradePreventionMode,\n ),\n configuration: transformTriggerConfiguration(t.configuration, scales),\n clientTriggerId: t.clientTriggerId,\n createdTs: t.createdAt ? tsObjToMs(t.createdAt) : undefined,\n updatedTs: t.updatedAt ? tsObjToMs(t.updatedAt) : undefined,\n armedTs: t.armedAt ? tsObjToMs(t.armedAt) : undefined,\n completedTs: t.completedAt ? tsObjToMs(t.completedAt) : undefined,\n ...transformTerminalReason(t.terminalReason),\n runtimeDetails: transformTriggerDetails(t.runtimeDetails, scales, t.symbolId),\n version: t.version,\n })),\n );\n}\n\n/** A normalized standalone trigger record. */\nexport type Trigger = v.InferOutput<ReturnType<typeof createTriggerSchema>>;\n\nexport function createTriggerEventSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n triggerId: v.bigint(),\n subaccountId: v.bigint(),\n symbolId: v.number(),\n triggerType: v.number(),\n eventType: v.number(),\n tsNs: v.bigint(),\n childSeq: v.number(),\n childOrderId: v.bigint(),\n firePriceTicks: v.optional(v.bigint()),\n terminalReason: TerminalReasonRawSchema,\n fireRefusalReason: v.optional(v.number()),\n }),\n v.transform((e) => ({\n triggerId: formatId(e.triggerId),\n subaccountId: formatId(e.subaccountId),\n symbolId: e.symbolId,\n triggerType: enumLabel(TriggerTypeCodec.protoToOutput, e.triggerType),\n eventType: enumLabel(TriggerEventTypeCodec.protoToOutput, e.eventType),\n ts: tsNsToMs(e.tsNs),\n tsNs: e.tsNs.toString(),\n childSeq: e.childSeq,\n childOrderId: e.childOrderId > 0n ? formatId(e.childOrderId) : undefined,\n firePrice:\n e.firePriceTicks !== undefined && e.firePriceTicks > 0n\n ? scaledToDecimalOutput(e.firePriceTicks, scales.price())\n : undefined,\n ...transformTerminalReason(e.terminalReason),\n /** Why a `fire_refused` attempt was refused; the trigger stayed live. */\n fireRefusalReason:\n e.fireRefusalReason === undefined\n ? undefined\n : enumLabel(TriggerFailureReasonCodec.protoToOutput, e.fireRefusalReason),\n })),\n );\n}\n\nexport type TriggerEvent = v.InferOutput<ReturnType<typeof createTriggerEventSchema>>;\n\nexport type ListTriggerEventsResult = {\n events: TriggerEvent[];\n nextPageToken: string;\n};\n"],"mappings":";;;;;;;;;AA+BA,MAAM,4BAA4B,gBAAgB,mBAAmB,aAAa;AAElF,MAAM,kCAAkC,EAAE,KACtC,EAAE,OAAO;CACL,WAAW;CACX,QAAQ;CACR,MAAM,EAAE,OAAO;AACnB,CAAC,GACD,EAAE,WAAW,EAAE,MAAM,GAAG,cAAc;CAClC,GAAG;CACH,IAAI,SAAS,IAAI;CACjB,MAAM,KAAK,SAAS;AACxB,EAAE,CACN;AAEA,MAAa,4BAA4B,EAAE,KACvC,EAAE,OAAO;CACL,WAAW;CACX,iBAAiB,EAAE,OAAO;CAC1B,YAAY;CACZ,gBAAgB;AACpB,CAAC,GACD,EAAE,WAAW,EAAE,YAAY,gBAAgB,GAAG,cAAc;CACxD,GAAG;CACH,YAAY,cAAc,SAAS,OAAO,cAAc,CAAC;CACzD,cAAc;AAClB,EAAE,CACN;AAIA,MAAa,4BAA4B;AAIzC,MAAa,4BAA4B;AAIzC,MAAa,2BAA2B;AAGxC,MAAa,4BAA4B;AAGzC,MAAM,uBAAuB,EAAE,QAAQ,QAAQ;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EAAE,cAAc;;EAE3C,mBACI,EAAE,sBAAsB,KAAA,IAClB,KAAA,IACA,UAAU,0BAA0B,eAAe,EAAE,iBAAiB;CACpF,EAAE,CACN;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyester/sdk",
3
- "version": "0.35.0-devnet-20261110193018",
3
+ "version": "0.35.0-devnet-20261111024555",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK providing access to APIs on Polyester Exchange.",
6
6
  "homepage": "https://github.com/Fabric-Labs/polyester-sdk-typescript#readme",