@polyester/sdk 0.35.0-devnet-20261111024555 → 0.35.0-devnet-20261111025029
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 +5 -1
- package/dist/realtime/private-orders.d.ts.map +1 -1
- package/dist/realtime/private-orders.js +24 -3
- package/dist/realtime/private-orders.js.map +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +2 -2
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +2 -2
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +52 -52
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/order-enums.codecs.js +4 -4
- package/dist/services/orders/order-enums.codecs.js.map +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +24 -24
- package/dist/services/orders/orders-input.schemas.d.ts +1 -1
- package/dist/services/orders/orders-modify.schemas.d.ts +5 -5
- package/dist/services/orders/orders-output.schemas.d.ts +17 -17
- package/dist/services/orders/orders.codecs.js +14 -14
- package/dist/services/orders/orders.codecs.js.map +1 -1
- package/dist/services/rewards/rewards.schemas.d.ts +3 -3
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +14 -14
- package/dist/services/trades/trades.schemas.d.ts +2 -2
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +22 -22
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ declare const SubaccountPermissionDefinitionSchema: v.ObjectSchema<{
|
|
|
13
13
|
}, undefined>;
|
|
14
14
|
type SubaccountPermissionDefinition = v.InferOutput<typeof SubaccountPermissionDefinitionSchema>;
|
|
15
15
|
declare const SubaccountRoleDefinitionSchema: v.ObjectSchema<{
|
|
16
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "
|
|
16
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
|
|
17
17
|
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
18
18
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
19
19
|
readonly assignable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -28,7 +28,7 @@ declare const SubaccountRoleCatalogSchema: v.ObjectSchema<{
|
|
|
28
28
|
readonly policyAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw">]>;
|
|
29
29
|
}, undefined>, undefined>, readonly []>;
|
|
30
30
|
readonly roles: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
31
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "
|
|
31
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
|
|
32
32
|
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
33
33
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
34
34
|
readonly assignable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -37,7 +37,7 @@ declare const SubaccountRoleCatalogSchema: v.ObjectSchema<{
|
|
|
37
37
|
}, undefined>;
|
|
38
38
|
type SubaccountRoleCatalog = v.InferOutput<typeof SubaccountRoleCatalogSchema>;
|
|
39
39
|
declare const EffectiveSubaccountPermissionsSchema: v.ObjectSchema<{
|
|
40
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "
|
|
40
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
|
|
41
41
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "internal_transfer" | "read_subaccount" | "update_subaccount" | "read_balances" | "read_spot" | "trade_spot" | "read_internal_transfers" | "external_withdraw" | "read_address_book" | "manage_address_book" | "read_members" | "manage_members" | "read_invites" | "manage_invites" | "read_api_keys" | "manage_api_keys" | "read_subaccount_policy" | "manage_subaccount_policy" | "read_activity" | "read_activity_security_details" | "manage_member_mfa_requirement" | "create_deposit_address" | "read_deposit_addresses" | "read_guard_signer_status" | "manage_guard_signer" | "read_auto_withdraw" | "manage_auto_withdraw" | "swap">]>, undefined>, readonly []>;
|
|
42
42
|
readonly subaccountPolicyId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
43
43
|
}, undefined>;
|
|
@@ -163,7 +163,7 @@ declare const ProtoSubaccountStatusSchema: v.SchemaWithPipe<readonly [v.NumberSc
|
|
|
163
163
|
type SubaccountStatus = v.InferOutput<typeof ProtoSubaccountStatusSchema>;
|
|
164
164
|
declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
165
165
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
166
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "
|
|
166
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
|
|
167
167
|
readonly label: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
168
168
|
readonly icon: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
169
169
|
readonly color: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
@@ -189,7 +189,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
189
189
|
readonly removed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
190
190
|
}, undefined>, v.TransformAction<{
|
|
191
191
|
id: string;
|
|
192
|
-
role: "
|
|
192
|
+
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
|
|
193
193
|
label: string;
|
|
194
194
|
icon: string;
|
|
195
195
|
color: string;
|
|
@@ -211,7 +211,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
211
211
|
updatedAt: number | undefined;
|
|
212
212
|
updatedAtNs: string | undefined;
|
|
213
213
|
id: string;
|
|
214
|
-
role: "
|
|
214
|
+
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
|
|
215
215
|
label: string;
|
|
216
216
|
icon: string;
|
|
217
217
|
color: string;
|
|
@@ -229,7 +229,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
229
229
|
type Subaccount = v.InferOutput<typeof SubaccountSchema>;
|
|
230
230
|
declare const SubaccountMemberSchema: v.ObjectSchema<{
|
|
231
231
|
readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
232
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "
|
|
232
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
|
|
233
233
|
readonly username: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
234
234
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
235
235
|
readonly avatarUrl: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
@@ -241,8 +241,8 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
241
241
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
242
242
|
readonly granteeAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
243
243
|
readonly inviterAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
244
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "
|
|
245
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
244
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
|
|
245
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "canceled" | "accepted" | "pending" | "declined">]>;
|
|
246
246
|
readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
247
247
|
readonly seconds: v.BigintSchema<undefined>;
|
|
248
248
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -268,8 +268,8 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
268
268
|
subaccountId: string;
|
|
269
269
|
granteeAccountId: string;
|
|
270
270
|
inviterAccountId: string;
|
|
271
|
-
role: "
|
|
272
|
-
status: "unspecified" | "
|
|
271
|
+
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
|
|
272
|
+
status: "unspecified" | "canceled" | "accepted" | "pending" | "declined";
|
|
273
273
|
createdAt?: number | undefined;
|
|
274
274
|
respondedAt?: number | undefined;
|
|
275
275
|
granteeUsername: string;
|
|
@@ -286,8 +286,8 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
286
286
|
id: string;
|
|
287
287
|
granteeAccountId: string;
|
|
288
288
|
inviterAccountId: string;
|
|
289
|
-
role: "
|
|
290
|
-
status: "unspecified" | "
|
|
289
|
+
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
|
|
290
|
+
status: "unspecified" | "canceled" | "accepted" | "pending" | "declined";
|
|
291
291
|
createdAt?: number | undefined;
|
|
292
292
|
respondedAt?: number | undefined;
|
|
293
293
|
granteeUsername: string;
|
|
@@ -309,7 +309,7 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
309
309
|
seconds: bigint;
|
|
310
310
|
nanos: number;
|
|
311
311
|
} | undefined, number | undefined>]>;
|
|
312
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "
|
|
312
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "destination" | "session" | "member" | "policy" | "invite" | "security">]>;
|
|
313
313
|
readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "removed" | "revoked" | "failed" | "enabled" | "created" | "updated" | "deleted" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
314
314
|
readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api" | "web" | "mobile">]>;
|
|
315
315
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -63,7 +63,7 @@ declare function createUserTradeSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
63
63
|
referralShare?: string | undefined;
|
|
64
64
|
orderId: string;
|
|
65
65
|
symbolId: number;
|
|
66
|
-
sideLabel: "
|
|
66
|
+
sideLabel: "unspecified" | "buy" | "sell";
|
|
67
67
|
liquidityLabel: "maker" | "taker";
|
|
68
68
|
feeAsset: "unspecified" | "quote" | "base";
|
|
69
69
|
qty: string;
|
|
@@ -169,7 +169,7 @@ declare const GetUserTradesInputSchema: v.SchemaWithPipe<readonly [v.UnionSchema
|
|
|
169
169
|
readonly orderId: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
170
170
|
readonly lineageId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>, v.CheckAction<bigint, `${string} must be greater than zero`>]>;
|
|
171
171
|
readonly throughGeneration: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
|
|
172
|
-
}, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.
|
|
172
|
+
}, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.MinLengthIssue<string, 1> | v.CheckIssue<bigint> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.GtValueIssue<number, 0> | v.NeverIssue | v.MaxValueIssue<number, 1000> | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.MinLengthIssue<string, 1> | v.CheckIssue<bigint> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.GtValueIssue<number, 0> | v.NeverIssue | v.MaxValueIssue<number, 1000>>>) => "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId" | "symbolId is required when afterMatchId is set" | "Invalid trade filters">, v.TransformAction<{
|
|
173
173
|
symbolId?: number | undefined;
|
|
174
174
|
afterMatchId?: undefined;
|
|
175
175
|
side?: Side.BUY | Side.SELL | undefined;
|
|
@@ -1334,7 +1334,7 @@ declare const ListTriggerEventsInputSchema: v.SchemaWithPipe<readonly [v.StrictO
|
|
|
1334
1334
|
readonly triggerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
|
|
1335
1335
|
}, undefined>, v.TransformAction<{
|
|
1336
1336
|
limit?: number | undefined;
|
|
1337
|
-
eventType?: "failed" | "canceled" | "
|
|
1337
|
+
eventType?: "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused" | undefined;
|
|
1338
1338
|
pageToken: string;
|
|
1339
1339
|
account?: "active" | "main" | {
|
|
1340
1340
|
subaccountId: string;
|
|
@@ -614,7 +614,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
614
614
|
}, {
|
|
615
615
|
runtimeDetails: TriggerDetailsOutput;
|
|
616
616
|
version: number;
|
|
617
|
-
cancelReason: "unspecified" | "
|
|
617
|
+
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";
|
|
618
618
|
failureReason: undefined;
|
|
619
619
|
triggerId: string;
|
|
620
620
|
subaccountId: string;
|
|
@@ -626,7 +626,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
626
626
|
selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
|
|
627
627
|
configuration: {
|
|
628
628
|
type: "stop_loss" | "take_profit";
|
|
629
|
-
side: "
|
|
629
|
+
side: "unspecified" | "buy" | "sell";
|
|
630
630
|
triggerPrice: string;
|
|
631
631
|
triggerPriceSource: "unspecified" | "last" | "index" | "mark";
|
|
632
632
|
execution: {
|
|
@@ -679,7 +679,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
679
679
|
readonly postOnly?: undefined;
|
|
680
680
|
} | {
|
|
681
681
|
type: "trailing_stop";
|
|
682
|
-
side: "
|
|
682
|
+
side: "unspecified" | "buy" | "sell";
|
|
683
683
|
trailingDistance: {
|
|
684
684
|
kind: "distance";
|
|
685
685
|
distance: string;
|
|
@@ -719,7 +719,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
719
719
|
readonly postOnly?: undefined;
|
|
720
720
|
} | {
|
|
721
721
|
type: "twap";
|
|
722
|
-
side: "
|
|
722
|
+
side: "unspecified" | "buy" | "sell";
|
|
723
723
|
durationMs: number;
|
|
724
724
|
sliceIntervalMs: number;
|
|
725
725
|
execution: {
|
|
@@ -759,7 +759,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
759
759
|
readonly postOnly?: undefined;
|
|
760
760
|
} | {
|
|
761
761
|
type: "ladder";
|
|
762
|
-
side: "
|
|
762
|
+
side: "unspecified" | "buy" | "sell";
|
|
763
763
|
priceMin: string;
|
|
764
764
|
priceMax: string;
|
|
765
765
|
levels: number;
|
|
@@ -799,7 +799,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
799
799
|
runtimeDetails: TriggerDetailsOutput;
|
|
800
800
|
version: number;
|
|
801
801
|
cancelReason: undefined;
|
|
802
|
-
failureReason: "unspecified" | "
|
|
802
|
+
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";
|
|
803
803
|
triggerId: string;
|
|
804
804
|
subaccountId: string;
|
|
805
805
|
symbolId: number;
|
|
@@ -810,7 +810,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
810
810
|
selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
|
|
811
811
|
configuration: {
|
|
812
812
|
type: "stop_loss" | "take_profit";
|
|
813
|
-
side: "
|
|
813
|
+
side: "unspecified" | "buy" | "sell";
|
|
814
814
|
triggerPrice: string;
|
|
815
815
|
triggerPriceSource: "unspecified" | "last" | "index" | "mark";
|
|
816
816
|
execution: {
|
|
@@ -863,7 +863,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
863
863
|
readonly postOnly?: undefined;
|
|
864
864
|
} | {
|
|
865
865
|
type: "trailing_stop";
|
|
866
|
-
side: "
|
|
866
|
+
side: "unspecified" | "buy" | "sell";
|
|
867
867
|
trailingDistance: {
|
|
868
868
|
kind: "distance";
|
|
869
869
|
distance: string;
|
|
@@ -903,7 +903,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
903
903
|
readonly postOnly?: undefined;
|
|
904
904
|
} | {
|
|
905
905
|
type: "twap";
|
|
906
|
-
side: "
|
|
906
|
+
side: "unspecified" | "buy" | "sell";
|
|
907
907
|
durationMs: number;
|
|
908
908
|
sliceIntervalMs: number;
|
|
909
909
|
execution: {
|
|
@@ -943,7 +943,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
943
943
|
readonly postOnly?: undefined;
|
|
944
944
|
} | {
|
|
945
945
|
type: "ladder";
|
|
946
|
-
side: "
|
|
946
|
+
side: "unspecified" | "buy" | "sell";
|
|
947
947
|
priceMin: string;
|
|
948
948
|
priceMax: string;
|
|
949
949
|
levels: number;
|
|
@@ -994,7 +994,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
994
994
|
selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
|
|
995
995
|
configuration: {
|
|
996
996
|
type: "stop_loss" | "take_profit";
|
|
997
|
-
side: "
|
|
997
|
+
side: "unspecified" | "buy" | "sell";
|
|
998
998
|
triggerPrice: string;
|
|
999
999
|
triggerPriceSource: "unspecified" | "last" | "index" | "mark";
|
|
1000
1000
|
execution: {
|
|
@@ -1047,7 +1047,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1047
1047
|
readonly postOnly?: undefined;
|
|
1048
1048
|
} | {
|
|
1049
1049
|
type: "trailing_stop";
|
|
1050
|
-
side: "
|
|
1050
|
+
side: "unspecified" | "buy" | "sell";
|
|
1051
1051
|
trailingDistance: {
|
|
1052
1052
|
kind: "distance";
|
|
1053
1053
|
distance: string;
|
|
@@ -1087,7 +1087,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1087
1087
|
readonly postOnly?: undefined;
|
|
1088
1088
|
} | {
|
|
1089
1089
|
type: "twap";
|
|
1090
|
-
side: "
|
|
1090
|
+
side: "unspecified" | "buy" | "sell";
|
|
1091
1091
|
durationMs: number;
|
|
1092
1092
|
sliceIntervalMs: number;
|
|
1093
1093
|
execution: {
|
|
@@ -1127,7 +1127,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
1127
1127
|
readonly postOnly?: undefined;
|
|
1128
1128
|
} | {
|
|
1129
1129
|
type: "ladder";
|
|
1130
|
-
side: "
|
|
1130
|
+
side: "unspecified" | "buy" | "sell";
|
|
1131
1131
|
priceMin: string;
|
|
1132
1132
|
priceMax: string;
|
|
1133
1133
|
levels: number;
|
|
@@ -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" | "
|
|
1214
|
-
cancelReason: "unspecified" | "
|
|
1213
|
+
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;
|
|
1214
|
+
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";
|
|
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" | "failed" | "canceled" | "
|
|
1220
|
+
eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "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" | "
|
|
1228
|
+
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;
|
|
1229
1229
|
cancelReason: undefined;
|
|
1230
|
-
failureReason: "unspecified" | "
|
|
1230
|
+
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";
|
|
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" | "failed" | "canceled" | "
|
|
1235
|
+
eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "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" | "
|
|
1243
|
+
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;
|
|
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" | "failed" | "canceled" | "
|
|
1250
|
+
eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
|
|
1251
1251
|
ts: number;
|
|
1252
1252
|
tsNs: string;
|
|
1253
1253
|
childSeq: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polyester/sdk",
|
|
3
|
-
"version": "0.35.0-devnet-
|
|
3
|
+
"version": "0.35.0-devnet-20261111025029",
|
|
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",
|