@polyester/sdk 0.35.0-devnet-20261111161451 → 0.35.0
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.
- package/CHANGELOG.md +3 -1
- package/dist/services/accounts/accounts.d.ts +1 -1
- package/dist/services/accounts/accounts.js +1 -1
- package/dist/services/accounts/accounts.js.map +1 -1
- package/dist/services/api-keys/api-keys.d.ts +2 -2
- package/dist/services/api-keys/api-keys.js +2 -2
- package/dist/services/api-keys/api-keys.js.map +1 -1
- package/dist/services/assistant/assistant-events.schemas.d.ts +129 -101
- package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
- package/dist/services/auth/profile/profile.d.ts +2 -2
- package/dist/services/auth/profile/profile.js +2 -2
- package/dist/services/auth/profile/profile.js.map +1 -1
- package/dist/services/balances/balances.schemas.d.ts +3 -3
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- package/dist/services/checkpoints/checkpoints.d.ts +2 -2
- package/dist/services/checkpoints/checkpoints.js +2 -2
- package/dist/services/checkpoints/checkpoints.js.map +1 -1
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
- package/dist/services/deposit/deposit.d.ts +2 -2
- package/dist/services/deposit/deposit.js +2 -2
- package/dist/services/deposit/deposit.js.map +1 -1
- package/dist/services/guard-signer/guard-signer.d.ts +1 -1
- package/dist/services/guard-signer/guard-signer.js +1 -1
- package/dist/services/guard-signer/guard-signer.js.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +13 -13
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +148 -148
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +19 -19
- package/dist/services/orders/orders-input.schemas.d.ts +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +22 -22
- package/dist/services/policies/api-key-policies/api-key-policies.d.ts +2 -2
- package/dist/services/policies/api-key-policies/api-key-policies.js +2 -2
- package/dist/services/policies/api-key-policies/api-key-policies.js.map +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.d.ts +2 -2
- package/dist/services/policies/subaccount-policies/subaccount-policies.js +2 -2
- package/dist/services/policies/subaccount-policies/subaccount-policies.js.map +1 -1
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/social-verification/social-verification.d.ts +1 -1
- package/dist/services/social-verification/social-verification.js +1 -1
- package/dist/services/social-verification/social-verification.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.js +6 -6
- package/dist/services/subaccounts/subaccounts.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +12 -12
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
- package/dist/services/transfers/transfers.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +37 -37
- package/dist/services/vip/vip.d.ts +1 -1
- package/dist/services/vip/vip.js +1 -1
- package/dist/services/vip/vip.js.map +1 -1
- package/dist/services/vip/vip.schemas.d.ts +3 -3
- package/package.json +1 -1
|
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
29
29
|
type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
|
|
30
30
|
declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
31
31
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
32
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
32
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused">]>;
|
|
33
33
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
34
34
|
}, undefined>, v.TransformAction<{
|
|
35
35
|
triggerId: string;
|
|
36
|
-
status: "unspecified" | "
|
|
36
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
37
37
|
tsNs: bigint;
|
|
38
38
|
}, {
|
|
39
39
|
ts: number;
|
|
40
40
|
tsNs: string;
|
|
41
41
|
triggerId: string;
|
|
42
|
-
status: "unspecified" | "
|
|
42
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
43
43
|
}>]>;
|
|
44
44
|
type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
|
|
45
45
|
declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
46
46
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
47
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
47
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused">]>;
|
|
48
48
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
49
49
|
}, undefined>, v.TransformAction<{
|
|
50
50
|
triggerId: string;
|
|
51
|
-
status: "unspecified" | "
|
|
51
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
52
52
|
tsNs: bigint;
|
|
53
53
|
}, {
|
|
54
54
|
ts: number;
|
|
55
55
|
tsNs: string;
|
|
56
56
|
triggerId: string;
|
|
57
|
-
status: "unspecified" | "
|
|
57
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
58
58
|
}>]>;
|
|
59
59
|
type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
|
|
60
60
|
declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
61
61
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
62
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
62
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused">]>;
|
|
63
63
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
64
64
|
}, undefined>, v.TransformAction<{
|
|
65
65
|
triggerId: string;
|
|
66
|
-
status: "unspecified" | "
|
|
66
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
67
67
|
tsNs: bigint;
|
|
68
68
|
}, {
|
|
69
69
|
ts: number;
|
|
70
70
|
tsNs: string;
|
|
71
71
|
triggerId: string;
|
|
72
|
-
status: "unspecified" | "
|
|
72
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
73
73
|
}>]>;
|
|
74
74
|
type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
|
|
75
75
|
declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
76
76
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
77
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
77
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused">]>;
|
|
78
78
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
79
79
|
}, undefined>, v.TransformAction<{
|
|
80
80
|
triggerId: string;
|
|
81
|
-
status: "unspecified" | "
|
|
81
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
82
82
|
tsNs: bigint;
|
|
83
83
|
}, {
|
|
84
84
|
ts: number;
|
|
85
85
|
tsNs: string;
|
|
86
86
|
triggerId: string;
|
|
87
|
-
status: "unspecified" | "
|
|
87
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
88
88
|
}>]>;
|
|
89
89
|
type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
|
|
90
90
|
type StopDetailsOutput = {
|
|
@@ -614,12 +614,12 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
614
614
|
}, {
|
|
615
615
|
runtimeDetails: TriggerDetailsOutput;
|
|
616
616
|
version: number;
|
|
617
|
-
cancelReason: "unspecified" | "oco" | "user_request" | "account_repair" | "market_halted" | "
|
|
617
|
+
cancelReason: "unspecified" | "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" | "internal_error";
|
|
618
618
|
failureReason: undefined;
|
|
619
619
|
triggerId: string;
|
|
620
620
|
subaccountId: string;
|
|
621
621
|
symbolId: number;
|
|
622
|
-
status: "unspecified" | "
|
|
622
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
623
623
|
parentOrderId: string | undefined;
|
|
624
624
|
qty: string;
|
|
625
625
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -644,7 +644,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
644
644
|
slippage?: undefined;
|
|
645
645
|
bps?: undefined;
|
|
646
646
|
};
|
|
647
|
-
|
|
647
|
+
price?: undefined;
|
|
648
648
|
postOnly?: undefined;
|
|
649
649
|
} | {
|
|
650
650
|
readonly type: "limit_gtc";
|
|
@@ -664,7 +664,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
664
664
|
} | {
|
|
665
665
|
readonly type: "unspecified";
|
|
666
666
|
readonly maxSlippage?: undefined;
|
|
667
|
-
|
|
667
|
+
price?: undefined;
|
|
668
668
|
postOnly?: undefined;
|
|
669
669
|
};
|
|
670
670
|
trailingDistance?: undefined;
|
|
@@ -737,7 +737,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
737
737
|
slippage?: undefined;
|
|
738
738
|
bps?: undefined;
|
|
739
739
|
};
|
|
740
|
-
|
|
740
|
+
price?: undefined;
|
|
741
741
|
} | {
|
|
742
742
|
readonly type: "limit_gtc";
|
|
743
743
|
readonly price: string;
|
|
@@ -745,7 +745,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
745
745
|
} | {
|
|
746
746
|
readonly type: "unspecified";
|
|
747
747
|
readonly maxSlippage?: undefined;
|
|
748
|
-
|
|
748
|
+
price?: undefined;
|
|
749
749
|
};
|
|
750
750
|
triggerPrice?: undefined;
|
|
751
751
|
triggerPriceSource?: undefined;
|
|
@@ -799,11 +799,11 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
799
799
|
runtimeDetails: TriggerDetailsOutput;
|
|
800
800
|
version: number;
|
|
801
801
|
cancelReason: undefined;
|
|
802
|
-
failureReason: "unspecified" | "market_halted" | "
|
|
802
|
+
failureReason: "unspecified" | "market_halted" | "missing_reason_code" | "internal_error" | "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";
|
|
803
803
|
triggerId: string;
|
|
804
804
|
subaccountId: string;
|
|
805
805
|
symbolId: number;
|
|
806
|
-
status: "unspecified" | "
|
|
806
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
807
807
|
parentOrderId: string | undefined;
|
|
808
808
|
qty: string;
|
|
809
809
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -828,7 +828,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
828
828
|
slippage?: undefined;
|
|
829
829
|
bps?: undefined;
|
|
830
830
|
};
|
|
831
|
-
|
|
831
|
+
price?: undefined;
|
|
832
832
|
postOnly?: undefined;
|
|
833
833
|
} | {
|
|
834
834
|
readonly type: "limit_gtc";
|
|
@@ -848,7 +848,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
848
848
|
} | {
|
|
849
849
|
readonly type: "unspecified";
|
|
850
850
|
readonly maxSlippage?: undefined;
|
|
851
|
-
|
|
851
|
+
price?: undefined;
|
|
852
852
|
postOnly?: undefined;
|
|
853
853
|
};
|
|
854
854
|
trailingDistance?: undefined;
|
|
@@ -921,7 +921,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
921
921
|
slippage?: undefined;
|
|
922
922
|
bps?: undefined;
|
|
923
923
|
};
|
|
924
|
-
|
|
924
|
+
price?: undefined;
|
|
925
925
|
} | {
|
|
926
926
|
readonly type: "limit_gtc";
|
|
927
927
|
readonly price: string;
|
|
@@ -929,7 +929,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
929
929
|
} | {
|
|
930
930
|
readonly type: "unspecified";
|
|
931
931
|
readonly maxSlippage?: undefined;
|
|
932
|
-
|
|
932
|
+
price?: undefined;
|
|
933
933
|
};
|
|
934
934
|
triggerPrice?: undefined;
|
|
935
935
|
triggerPriceSource?: undefined;
|
|
@@ -987,7 +987,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
987
987
|
triggerId: string;
|
|
988
988
|
subaccountId: string;
|
|
989
989
|
symbolId: number;
|
|
990
|
-
status: "unspecified" | "
|
|
990
|
+
status: "unspecified" | "armed" | "failed" | "canceled" | "created" | "running" | "completed" | "paused";
|
|
991
991
|
parentOrderId: string | undefined;
|
|
992
992
|
qty: string;
|
|
993
993
|
feeAsset: "unspecified" | "quote" | "base";
|
|
@@ -1012,7 +1012,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1012
1012
|
slippage?: undefined;
|
|
1013
1013
|
bps?: undefined;
|
|
1014
1014
|
};
|
|
1015
|
-
|
|
1015
|
+
price?: undefined;
|
|
1016
1016
|
postOnly?: undefined;
|
|
1017
1017
|
} | {
|
|
1018
1018
|
readonly type: "limit_gtc";
|
|
@@ -1032,7 +1032,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1032
1032
|
} | {
|
|
1033
1033
|
readonly type: "unspecified";
|
|
1034
1034
|
readonly maxSlippage?: undefined;
|
|
1035
|
-
|
|
1035
|
+
price?: undefined;
|
|
1036
1036
|
postOnly?: undefined;
|
|
1037
1037
|
};
|
|
1038
1038
|
trailingDistance?: undefined;
|
|
@@ -1105,7 +1105,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1105
1105
|
slippage?: undefined;
|
|
1106
1106
|
bps?: undefined;
|
|
1107
1107
|
};
|
|
1108
|
-
|
|
1108
|
+
price?: undefined;
|
|
1109
1109
|
} | {
|
|
1110
1110
|
readonly type: "limit_gtc";
|
|
1111
1111
|
readonly price: string;
|
|
@@ -1113,7 +1113,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1113
1113
|
} | {
|
|
1114
1114
|
readonly type: "unspecified";
|
|
1115
1115
|
readonly maxSlippage?: undefined;
|
|
1116
|
-
|
|
1116
|
+
price?: undefined;
|
|
1117
1117
|
};
|
|
1118
1118
|
triggerPrice?: undefined;
|
|
1119
1119
|
triggerPriceSource?: undefined;
|
|
@@ -1210,14 +1210,14 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1210
1210
|
fireRefusalReason?: number | undefined;
|
|
1211
1211
|
}, {
|
|
1212
1212
|
/** Why a `fire_refused` attempt was refused; the trigger stayed live. */
|
|
1213
|
-
fireRefusalReason: "unspecified" | "market_halted" | "
|
|
1214
|
-
cancelReason: "unspecified" | "oco" | "user_request" | "account_repair" | "market_halted" | "
|
|
1213
|
+
fireRefusalReason: "unspecified" | "market_halted" | "missing_reason_code" | "internal_error" | "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" | "parent_canceled_no_fill" | "self_trade_prevention" | "pair_drain_trigger" | "pair_drain_twap" | "pair_drain_ladder" | "pair_drain_attached_leg" | "missing_reason_code" | "internal_error";
|
|
1215
1215
|
failureReason: undefined;
|
|
1216
1216
|
triggerId: string;
|
|
1217
1217
|
subaccountId: string;
|
|
1218
1218
|
symbolId: number;
|
|
1219
1219
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1220
|
-
eventType: "unspecified" | "
|
|
1220
|
+
eventType: "unspecified" | "armed" | "failed" | "canceled" | "updated" | "fired" | "activated" | "fire_refused";
|
|
1221
1221
|
ts: number;
|
|
1222
1222
|
tsNs: string;
|
|
1223
1223
|
childSeq: number;
|
|
@@ -1225,14 +1225,14 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1225
1225
|
firePrice: string | undefined;
|
|
1226
1226
|
} | {
|
|
1227
1227
|
/** Why a `fire_refused` attempt was refused; the trigger stayed live. */
|
|
1228
|
-
fireRefusalReason: "unspecified" | "market_halted" | "
|
|
1228
|
+
fireRefusalReason: "unspecified" | "market_halted" | "missing_reason_code" | "internal_error" | "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;
|
|
1229
1229
|
cancelReason: undefined;
|
|
1230
|
-
failureReason: "unspecified" | "market_halted" | "
|
|
1230
|
+
failureReason: "unspecified" | "market_halted" | "missing_reason_code" | "internal_error" | "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";
|
|
1231
1231
|
triggerId: string;
|
|
1232
1232
|
subaccountId: string;
|
|
1233
1233
|
symbolId: number;
|
|
1234
1234
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1235
|
-
eventType: "unspecified" | "
|
|
1235
|
+
eventType: "unspecified" | "armed" | "failed" | "canceled" | "updated" | "fired" | "activated" | "fire_refused";
|
|
1236
1236
|
ts: number;
|
|
1237
1237
|
tsNs: string;
|
|
1238
1238
|
childSeq: number;
|
|
@@ -1240,14 +1240,14 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
|
|
|
1240
1240
|
firePrice: string | undefined;
|
|
1241
1241
|
} | {
|
|
1242
1242
|
/** Why a `fire_refused` attempt was refused; the trigger stayed live. */
|
|
1243
|
-
fireRefusalReason: "unspecified" | "market_halted" | "
|
|
1243
|
+
fireRefusalReason: "unspecified" | "market_halted" | "missing_reason_code" | "internal_error" | "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;
|
|
1244
1244
|
cancelReason: undefined;
|
|
1245
1245
|
failureReason: undefined;
|
|
1246
1246
|
triggerId: string;
|
|
1247
1247
|
subaccountId: string;
|
|
1248
1248
|
symbolId: number;
|
|
1249
1249
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1250
|
-
eventType: "unspecified" | "
|
|
1250
|
+
eventType: "unspecified" | "armed" | "failed" | "canceled" | "updated" | "fired" | "activated" | "fire_refused";
|
|
1251
1251
|
ts: number;
|
|
1252
1252
|
tsNs: string;
|
|
1253
1253
|
childSeq: number;
|
|
@@ -13,7 +13,7 @@ declare class VipService {
|
|
|
13
13
|
*/
|
|
14
14
|
listTiers(options?: PolyesterRequestOptions): Promise<VipTierCatalog>;
|
|
15
15
|
/**
|
|
16
|
-
* Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds.
|
|
16
|
+
* Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds. API keys need `read-vip-status` and must be scoped to the main account.
|
|
17
17
|
*/
|
|
18
18
|
getStatus(options?: PolyesterRequestOptions): Promise<VipStatus>;
|
|
19
19
|
}
|
package/dist/services/vip/vip.js
CHANGED
|
@@ -22,7 +22,7 @@ var VipService = class {
|
|
|
22
22
|
return parse(VipTierCatalogSchema, res);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds.
|
|
25
|
+
* Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds. API keys need `read-vip-status` and must be scoped to the main account.
|
|
26
26
|
*/
|
|
27
27
|
async getStatus(options) {
|
|
28
28
|
const res = await this.#authClient.getVIPStatus({}, toConnectCallOptions(options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vip.js","names":["#publicClient","Proto.VIPService","#authClient"],"sources":["../../../src/services/vip/vip.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/vip/v1/vip_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { AuthAndPublicApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n VipStatusSchema,\n VipTierCatalogSchema,\n type VipStatus,\n type VipTierCatalog,\n} from \"./vip.schemas.js\";\n\n/**\n * Reads public VIP policy catalogs and authenticated caller-root VIP status.\n */\nexport class VipService {\n #publicClient: Client<typeof Proto.VIPService>;\n #authClient: Client<typeof Proto.VIPService>;\n\n constructor(transports: AuthAndPublicApiTransports) {\n this.#publicClient = createClient(Proto.VIPService, transports.publicApi);\n this.#authClient = createClient(Proto.VIPService, transports.authApi);\n }\n\n /**\n * Returns the complete active VIP0+ tier catalog, including policy version, effective time, retention threshold, and per-tier volume/AOP thresholds and fee rates.\n */\n async listTiers(options?: PolyesterRequestOptions): Promise<VipTierCatalog> {\n const res = await this.#publicClient.listVIPTiers({}, toConnectCallOptions(options));\n return parse(VipTierCatalogSchema, res);\n }\n\n /**\n * Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds.\n */\n async getStatus(options?: PolyesterRequestOptions): Promise<VipStatus> {\n const res = await this.#authClient.getVIPStatus({}, toConnectCallOptions(options));\n return parse(VipStatusSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAa,aAAb,MAAwB;CACpB;CACA;CAEA,YAAY,YAAwC;EAChD,KAAKA,gBAAgB,aAAaC,YAAkB,WAAW,SAAS;EACxE,KAAKC,cAAc,aAAaD,YAAkB,WAAW,OAAO;CACxE;;;;CAKA,MAAM,UAAU,SAA4D;EACxE,MAAM,MAAM,MAAM,KAAKD,cAAc,aAAa,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACnF,OAAO,MAAM,sBAAsB,GAAG;CAC1C;;;;CAKA,MAAM,UAAU,SAAuD;EACnE,MAAM,MAAM,MAAM,KAAKE,YAAY,aAAa,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACjF,OAAO,MAAM,iBAAiB,GAAG;CACrC;AACJ"}
|
|
1
|
+
{"version":3,"file":"vip.js","names":["#publicClient","Proto.VIPService","#authClient"],"sources":["../../../src/services/vip/vip.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/vip/v1/vip_pb.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { AuthAndPublicApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n VipStatusSchema,\n VipTierCatalogSchema,\n type VipStatus,\n type VipTierCatalog,\n} from \"./vip.schemas.js\";\n\n/**\n * Reads public VIP policy catalogs and authenticated caller-root VIP status.\n */\nexport class VipService {\n #publicClient: Client<typeof Proto.VIPService>;\n #authClient: Client<typeof Proto.VIPService>;\n\n constructor(transports: AuthAndPublicApiTransports) {\n this.#publicClient = createClient(Proto.VIPService, transports.publicApi);\n this.#authClient = createClient(Proto.VIPService, transports.authApi);\n }\n\n /**\n * Returns the complete active VIP0+ tier catalog, including policy version, effective time, retention threshold, and per-tier volume/AOP thresholds and fee rates.\n */\n async listTiers(options?: PolyesterRequestOptions): Promise<VipTierCatalog> {\n const res = await this.#publicClient.listVIPTiers({}, toConnectCallOptions(options));\n return parse(VipTierCatalogSchema, res);\n }\n\n /**\n * Returns VIP qualification status for the authenticated caller's root account, including effective/volume/AOP tiers, optional rolling metrics, and next-tier thresholds. API keys need `read-vip-status` and must be scoped to the main account.\n */\n async getStatus(options?: PolyesterRequestOptions): Promise<VipStatus> {\n const res = await this.#authClient.getVIPStatus({}, toConnectCallOptions(options));\n return parse(VipStatusSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAa,aAAb,MAAwB;CACpB;CACA;CAEA,YAAY,YAAwC;EAChD,KAAKA,gBAAgB,aAAaC,YAAkB,WAAW,SAAS;EACxE,KAAKC,cAAc,aAAaD,YAAkB,WAAW,OAAO;CACxE;;;;CAKA,MAAM,UAAU,SAA4D;EACxE,MAAM,MAAM,MAAM,KAAKD,cAAc,aAAa,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACnF,OAAO,MAAM,sBAAsB,GAAG;CAC1C;;;;CAKA,MAAM,UAAU,SAAuD;EACnE,MAAM,MAAM,MAAM,KAAKE,YAAY,aAAa,CAAC,GAAG,qBAAqB,OAAO,CAAC;EACjF,OAAO,MAAM,iBAAiB,GAAG;CACrC;AACJ"}
|
|
@@ -50,7 +50,7 @@ type VipMetricStatus = (typeof VIP_METRIC_STATUS_VALUES)[number];
|
|
|
50
50
|
* `settledVolume30dUsd` is a lower bound that leaves out executions without a USD price.
|
|
51
51
|
*/
|
|
52
52
|
declare const VipMetricQualitySchema: v.ObjectSchema<{
|
|
53
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
53
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "price_unavailable" | "complete" | "incomplete_history">]>;
|
|
54
54
|
/** Hourly buckets of the 720-hour window that are missing or incomplete. */
|
|
55
55
|
readonly incompleteHours: v.NumberSchema<undefined>;
|
|
56
56
|
}, undefined>;
|
|
@@ -96,12 +96,12 @@ declare const VipStatusSchema: v.ObjectSchema<{
|
|
|
96
96
|
readonly aopThresholdUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
97
97
|
}, undefined>, undefined>;
|
|
98
98
|
readonly settledVolumeQuality: v.OptionalSchema<v.ObjectSchema<{
|
|
99
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
99
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "price_unavailable" | "complete" | "incomplete_history">]>;
|
|
100
100
|
/** Hourly buckets of the 720-hour window that are missing or incomplete. */
|
|
101
101
|
readonly incompleteHours: v.NumberSchema<undefined>;
|
|
102
102
|
}, undefined>, undefined>;
|
|
103
103
|
readonly averageAopQuality: v.OptionalSchema<v.ObjectSchema<{
|
|
104
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
104
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "price_unavailable" | "complete" | "incomplete_history">]>;
|
|
105
105
|
/** Hourly buckets of the 720-hour window that are missing or incomplete. */
|
|
106
106
|
readonly incompleteHours: v.NumberSchema<undefined>;
|
|
107
107
|
}, undefined>, undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polyester/sdk",
|
|
3
|
-
"version": "0.35.0
|
|
3
|
+
"version": "0.35.0",
|
|
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",
|