@polyester/sdk 0.36.0-devnet-20261120040128 → 0.36.0-devnet-20261121035512
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/account-activity/account-activity.schemas.d.ts +4 -4
- package/dist/services/address-book/address-book.schemas.d.ts +2 -2
- package/dist/services/api-keys/api-keys.schemas.d.ts +6 -6
- package/dist/services/assistant/assistant-events.schemas.d.ts +35 -35
- package/dist/services/assistant/assistant.schemas.d.ts +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 +38 -38
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
- package/dist/services/claims/claims.schemas.d.ts +2 -2
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +8 -8
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +5 -5
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +94 -94
- package/dist/services/market-data/market-data.d.ts +20 -0
- package/dist/services/market-data/market-data.d.ts.map +1 -1
- package/dist/services/market-data/market-data.js +94 -2
- package/dist/services/market-data/market-data.js.map +1 -1
- package/dist/services/notifications/notifications.schemas.d.ts +5 -25
- package/dist/services/notifications/notifications.schemas.d.ts.map +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +6 -6
- package/dist/services/orders/orders-batch.schemas.d.ts +72 -72
- package/dist/services/orders/orders-input.schemas.d.ts +11 -11
- package/dist/services/orders/orders-output.schemas.d.ts +16 -16
- package/dist/services/price-alerts/price-alerts.schemas.d.ts +10 -10
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
- package/dist/services/strategies/strategies.schemas.d.ts +5 -5
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +17 -17
- package/dist/services/swap/swap.schemas.d.ts +1 -1
- package/dist/services/system/system.schemas.d.ts +6 -6
- package/dist/services/trades/trades.schemas.d.ts +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 +49 -49
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @polyester/sdk
|
|
2
2
|
|
|
3
|
-
## 0.36.0-devnet-
|
|
3
|
+
## 0.36.0-devnet-20261121035512
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
- Breaking: Lifecycle `zipperReason.code` is a label such as `"deposit_amount_below_minimum"` instead of a number, like every other enum. An uncataloged code reads `unknown_zipper_reason_${code}`. ([#255](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/255))
|
|
18
18
|
|
|
19
|
+
- `client.marketData.subscribePriceBand({ symbolId, onEvent })` streams a pair's live price band from `public:spot:market:price_band:{symbolId}:proto`, emitting the same `LivePriceBand` as `getPriceBand`. Each connection is seeded with `getPriceBand`, and only a newer band (by `epoch`, then `updateId`, then `asOfTsNs`) is emitted, so repeated, late and reconnect-replayed messages are dropped. An unknown band arrives as `state: "unknown"` with null prices, not as an error: when the seed is refused `PRICE_BAND_STALE` or `PRICE_BAND_UNKNOWN`, when the stream sends `UNKNOWN`, and when `validUntilMs` passes with no newer band, so a band other than `unknown` is current until the next event. ([#273](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/273))
|
|
20
|
+
|
|
19
21
|
- Breaking: a refusal caused by the API key's policy now reads `API_KEY_SPOT_TRADE_DENY` (no Spot Trading Write on the key) or `API_KEY_POLICY_REQUIRED` (no policy on the key) instead of `POLICY_SPOT_TRADE_DENY`, which now means only the sub-account's policy. All three still surface as `PermissionError`; handle them together. ([#251](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/251))
|
|
20
22
|
|
|
21
23
|
- Breaking: The order error code `MAX_QUOTE_DEBIT_TOO_SMALL` is renamed `QUOTE_SIZE_TOO_SMALL`, the refusal of either quote sizing, in `OrderErrorCode`, error details and `rejectReason`. ([#251](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/251))
|
|
@@ -27,8 +27,8 @@ declare const ListAccountActivityInputSchema: v.SchemaWithPipe<readonly [v.Stric
|
|
|
27
27
|
}, undefined>, v.TransformAction<{
|
|
28
28
|
subaccountIds?: bigint[] | undefined;
|
|
29
29
|
includeMainAccount?: boolean | undefined;
|
|
30
|
-
entityKinds?: ("api_key" | "account" | "subaccount" | "
|
|
31
|
-
eventActions?: ("disabled" | "removed" | "
|
|
30
|
+
entityKinds?: ("api_key" | "account" | "subaccount" | "policy" | "destination" | "session" | "member" | "invite" | "security")[] | undefined;
|
|
31
|
+
eventActions?: ("disabled" | "revoked" | "removed" | "applied" | "failed" | "created" | "enabled" | "updated" | "deleted" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released" | "requested")[] | undefined;
|
|
32
32
|
sources?: ("api" | "web" | "mobile")[] | undefined;
|
|
33
33
|
apiKeyId?: bigint | undefined;
|
|
34
34
|
startTime?: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
|
|
@@ -57,8 +57,8 @@ declare const ListAccountActivityResultSchema: v.ObjectSchema<{
|
|
|
57
57
|
seconds: bigint;
|
|
58
58
|
nanos: number;
|
|
59
59
|
} | undefined, number | undefined>]>;
|
|
60
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api_key" | "account" | "subaccount" | "
|
|
61
|
-
readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "removed" | "
|
|
60
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api_key" | "account" | "subaccount" | "policy" | "destination" | "session" | "member" | "invite" | "security">]>;
|
|
61
|
+
readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "revoked" | "removed" | "applied" | "failed" | "created" | "enabled" | "updated" | "deleted" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released" | "requested">]>;
|
|
62
62
|
readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api" | "web" | "mobile">]>;
|
|
63
63
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
64
64
|
readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -297,7 +297,7 @@ declare const AddressBookSchema: v.ObjectSchema<{
|
|
|
297
297
|
rootAccountId: string;
|
|
298
298
|
subaccountId: bigint;
|
|
299
299
|
}, AddressBookAccountScope>]>, undefined>;
|
|
300
|
-
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
300
|
+
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "admin" | "owner" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
301
301
|
readonly label: v.StringSchema<undefined>;
|
|
302
302
|
readonly ownerUsername: v.StringSchema<undefined>;
|
|
303
303
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
@@ -1102,7 +1102,7 @@ declare const AddressBookViewSchema: v.ObjectSchema<{
|
|
|
1102
1102
|
rootAccountId: string;
|
|
1103
1103
|
subaccountId: bigint;
|
|
1104
1104
|
}, AddressBookAccountScope>]>, undefined>;
|
|
1105
|
-
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
1105
|
+
readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "admin" | "owner" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
1106
1106
|
readonly label: v.StringSchema<undefined>;
|
|
1107
1107
|
readonly ownerUsername: v.StringSchema<undefined>;
|
|
1108
1108
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
@@ -42,7 +42,7 @@ declare const ApiKeysCreateInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
|
|
|
42
42
|
}, undefined>, v.TransformAction<{
|
|
43
43
|
ipWhitelist: string[];
|
|
44
44
|
publicKeyEd25519: Uint8Array<ArrayBufferLike>;
|
|
45
|
-
purpose?: "
|
|
45
|
+
purpose?: "standard" | "admin" | undefined;
|
|
46
46
|
account?: "active" | "main" | {
|
|
47
47
|
subaccountId: string;
|
|
48
48
|
} | undefined;
|
|
@@ -79,7 +79,7 @@ declare const ApiKeysUpdateInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
|
|
|
79
79
|
status?: "active" | "disabled" | undefined;
|
|
80
80
|
ipWhitelist?: string[] | undefined;
|
|
81
81
|
expiresAtIso?: string | null | undefined;
|
|
82
|
-
purpose?: "
|
|
82
|
+
purpose?: "standard" | "admin" | undefined;
|
|
83
83
|
}, "At least one API key field must be provided">, v.TransformAction<{
|
|
84
84
|
keyId: string;
|
|
85
85
|
expectedRevision: bigint;
|
|
@@ -89,7 +89,7 @@ declare const ApiKeysUpdateInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
|
|
|
89
89
|
status?: "active" | "disabled" | undefined;
|
|
90
90
|
ipWhitelist?: string[] | undefined;
|
|
91
91
|
expiresAtIso?: string | null | undefined;
|
|
92
|
-
purpose?: "
|
|
92
|
+
purpose?: "standard" | "admin" | undefined;
|
|
93
93
|
}, {
|
|
94
94
|
keyId: string;
|
|
95
95
|
apiKey: never;
|
|
@@ -144,7 +144,7 @@ declare const ApiKeySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
144
144
|
} | undefined, string | undefined>]>;
|
|
145
145
|
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "active" | "disabled" | "revoked">]>;
|
|
146
146
|
/** `"standard"`, `"assistant"`, or `"unspecified"` from older servers. */
|
|
147
|
-
readonly purpose: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
147
|
+
readonly purpose: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "standard" | "admin" | "assistant">]>, 0>;
|
|
148
148
|
readonly createdByActor: v.StringSchema<undefined>;
|
|
149
149
|
readonly revision: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
150
150
|
}, undefined>, v.TransformAction<{
|
|
@@ -164,7 +164,7 @@ declare const ApiKeySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
164
164
|
publicKeyEd25519: Uint8Array<ArrayBufferLike>;
|
|
165
165
|
expiresAt?: string | undefined;
|
|
166
166
|
status: "unspecified" | "active" | "disabled" | "revoked";
|
|
167
|
-
purpose: "unspecified" | "
|
|
167
|
+
purpose: "unspecified" | "standard" | "admin" | "assistant";
|
|
168
168
|
createdByActor: string;
|
|
169
169
|
revision: string;
|
|
170
170
|
}, {
|
|
@@ -183,7 +183,7 @@ declare const ApiKeySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
183
183
|
publicKeyEd25519: Uint8Array<ArrayBufferLike>;
|
|
184
184
|
expiresAt?: string | undefined;
|
|
185
185
|
status: "unspecified" | "active" | "disabled" | "revoked";
|
|
186
|
-
purpose: "unspecified" | "
|
|
186
|
+
purpose: "unspecified" | "standard" | "admin" | "assistant";
|
|
187
187
|
createdByActor: string;
|
|
188
188
|
revision: string;
|
|
189
189
|
}>]>;
|
|
@@ -1077,9 +1077,9 @@ declare function formatApprovalPreview(p: ApprovalRequested["preview"]): {
|
|
|
1077
1077
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
1078
1078
|
side: "unspecified" | "buy" | "sell";
|
|
1079
1079
|
quantity: string;
|
|
1080
|
-
action: "unspecified" | "
|
|
1080
|
+
action: "unspecified" | "modify" | "pause" | "resume";
|
|
1081
1081
|
before: {
|
|
1082
|
-
status: "unspecified" | "
|
|
1082
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
1083
1083
|
triggerPrice: string | undefined;
|
|
1084
1084
|
trailingDistance: {
|
|
1085
1085
|
kind: "distance";
|
|
@@ -1103,7 +1103,7 @@ declare function formatApprovalPreview(p: ApprovalRequested["preview"]): {
|
|
|
1103
1103
|
limitPrice: string | undefined;
|
|
1104
1104
|
} | undefined;
|
|
1105
1105
|
after: {
|
|
1106
|
-
status: "unspecified" | "
|
|
1106
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
1107
1107
|
triggerPrice: string | undefined;
|
|
1108
1108
|
trailingDistance: {
|
|
1109
1109
|
kind: "distance";
|
|
@@ -1311,7 +1311,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1311
1311
|
attachedRisk: {
|
|
1312
1312
|
takeProfit: {
|
|
1313
1313
|
state: {
|
|
1314
|
-
status: "unspecified" | "
|
|
1314
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed" | "not_configured";
|
|
1315
1315
|
armedTs: number | undefined;
|
|
1316
1316
|
armedTsNs: string | undefined;
|
|
1317
1317
|
terminalTs: number | undefined;
|
|
@@ -1331,7 +1331,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1331
1331
|
} | undefined;
|
|
1332
1332
|
stopLoss: {
|
|
1333
1333
|
state: {
|
|
1334
|
-
status: "unspecified" | "
|
|
1334
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed" | "not_configured";
|
|
1335
1335
|
armedTs: number | undefined;
|
|
1336
1336
|
armedTsNs: string | undefined;
|
|
1337
1337
|
terminalTs: number | undefined;
|
|
@@ -1351,7 +1351,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1351
1351
|
} | undefined;
|
|
1352
1352
|
trailingStop: {
|
|
1353
1353
|
state: {
|
|
1354
|
-
status: "unspecified" | "
|
|
1354
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed" | "not_configured";
|
|
1355
1355
|
armedTs: number | undefined;
|
|
1356
1356
|
armedTsNs: string | undefined;
|
|
1357
1357
|
terminalTs: number | undefined;
|
|
@@ -1382,7 +1382,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1382
1382
|
oco: boolean;
|
|
1383
1383
|
} | undefined;
|
|
1384
1384
|
cancelReason?: "unspecified" | "system" | "user_request" | "ioc_remainder" | "market_remainder" | "stp_expire_maker" | "stp_expire_taker" | "stp_expire_both" | "replaced" | "gtd_expired" | "qty_at_or_below_filled" | "pair_drain" | "attached_risk_refused" | "cancel_all_after" | "account_repair" | "twap_rollover" | "strategy_cancel" | "market_halted" | "attached_exit_fired" | "stp_decrement" | "price_band" | "cancel_on_disconnect" | undefined;
|
|
1385
|
-
rejectReason?: "STALE_QUOTE" | "UNSPECIFIED" | "
|
|
1385
|
+
rejectReason?: "STALE_QUOTE" | "UNSPECIFIED" | "BAD_REQUEST" | "INVALID_ARGUMENT" | "INSUFFICIENT_FUNDS" | "UNKNOWN_SYMBOL" | "BAD_PRICE" | "BAD_QTY" | "MIN_NOTIONAL" | "QTY_STEP_SIZE" | "CONFLICT_DUPLICATE_CLIENT_ORDER_ID" | "UNAVAILABLE" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "NOT_FOUND" | "UPSTREAM_ERROR" | "FEE_ASSET_NOT_ALLOWED" | "PAIR_DISABLED" | "ORDER_UNKNOWN" | "INTERNAL_ERROR" | "SUBACCOUNT_INACTIVE" | "POLICY_MARKET_DENY" | "POLICY_MAX_NOTIONAL" | "POLICY_TRADING_HALTED" | "POLICY_SPOT_TRADE_DENY" | "API_KEY_ROOT_SCOPE_ONLY" | "API_KEY_SUB_SCOPE_ONLY" | "API_KEY_SUBACCOUNT_MISMATCH" | "API_KEY_POLICY_REQUIRED" | "API_KEY_UNKNOWN" | "API_KEY_MARKET_DENY" | "API_KEY_SPOT_TRADE_DENY" | "PRICE_TICK_SIZE" | "MIN_QTY" | "POST_ONLY_LIMIT_ONLY" | "BATCH_TOO_LARGE" | "POLICY_MAX_OPEN_ORDERS" | "MODIFICATION_REQUIRES_REPLACE" | "CONFLICT_IDEMPOTENCY_KEY_REUSE" | "MARKET_PRICE_UNAVAILABLE" | "PAIR_NOT_LISTED_YET" | "PAIR_DELISTED" | "PAIR_CANCEL_ONLY" | "PAIR_POST_ONLY" | "PAIR_REDUCE_ONLY" | "RISK_LIMIT" | "MARKET_HALTED" | "ACCOUNT_UNKNOWN" | "POST_ONLY_CROSS" | "REDUCE_ONLY_BLOCKED" | "PRICE_BAND_VIOLATION" | "MARKET_CAP_VIOLATION" | "EMPTY_BOOK" | "FOK_INSUFFICIENT_LIQUIDITY" | "ORDER_ALREADY_TERMINAL" | "TRIGGER_PRICE_INVALID" | "TRIGGER_PRICE_SOURCE_UNSUPPORTED" | "TRAILING_DISTANCE_INVALID" | "TRIGGER_NOT_FOUND" | "TRIGGER_STATUS_INVALID" | "TRIGGER_NOT_MODIFIABLE" | "CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID" | "MAX_SLIPPAGE_INVALID" | "VALIDATION_ERROR" | "OVERLOADED" | "QUOTE_SIZE_TOO_SMALL" | "RATE_LIMIT_EXCEEDED" | "SUBACCOUNT_READ_FORBIDDEN" | "POLICY_SPOT_READ_DENY" | "API_KEY_SPOT_READ_DENY" | "CANCEL_REQUEST_EXPIRED" | "MAX_QTY" | "MAX_NOTIONAL" | "QTY_AT_OR_BELOW_FILLED" | "GATEWAY_MISCONFIGURED" | "INVALID_ORDER_ID" | "CHILD_QTY_RAISE_NOT_ALLOWED" | "ATTACHED_RISK_NOT_SUPPORTED" | "SETTLEMENT_BACKLOGGED" | "PRICE_LEVEL_QUANTITY_LIMIT" | "MARKET_QUOTE_STALE" | "MARKET_QUOTE_UNHEALTHY" | "INVALID_TIME_IN_FORCE" | "QUICKSWAP_NOT_PERMITTED" | "DUPLICATE_ORDER_ID" | "MAX_OPEN_ORDERS_TOTAL" | "STP_MODE_NOT_ALLOWED" | "PAIR_BACKLOGGED" | "PRICE_LEVELS_EXHAUSTED" | "CLIENT_ORDER_IDS_EXHAUSTED" | "ORDER_ID_CONFLICT" | "INVALID_SIDE" | "INVALID_ORDER_TYPE" | "INVALID_STP_MODE" | "INVALID_ORDER_FLAGS" | "BATCH_OTHER_ITEM_INVALID" | "REPLACE_ONTO_OWN_ID" | "INVALID_CLIENT_ORDER_ID" | "ORDER_SEQUENCE_EXHAUSTED" | "INVALID_HANDLING_MODE" | "FEE_SCHEDULE_UNAVAILABLE" | "POLICY_UNAVAILABLE" | "CANCEL_ALL_AFTER_TIMEOUT_INVALID" | "CANCEL_SCOPE_TOO_LARGE" | "RATE_LIMIT_POLICY_UNAVAILABLE" | "SYSTEM_RATE_LIMITED" | "ORDER_MODIFY_IN_PROGRESS" | "ORDER_PLACEMENT_PENDING" | "INVALID_MODIFY_BEHAVIOR" | "BATCH_REPLACE_ONLY_REQUIRED" | "BATCH_SINGLE_SYMBOL_REQUIRED" | "REQUEST_RECEIPTS_EXHAUSTED" | "INTENT_ID_INVALID" | "DRY_RUN_INVALID" | "CANCEL_ALL_AFTER_SCOPE_CONFLICT" | "NEW_ACCOUNT_CAPACITY_REACHED" | "TRIGGER_CHILD_PRICE_NOT_MODIFIABLE" | "TRIGGER_GENERATIONS_EXHAUSTED" | "TRIGGER_CONTROL_SHARE_EXHAUSTED" | "TRIGGER_CONTROLS_BUSY" | "TRIGGER_TYPE_NOT_SUPPORTED" | "INVALID_TRIGGER_TYPE" | "TRIGGER_DIRECTION_INVALID" | "TRIGGER_QTY_INVALID" | "TRIGGER_BUY_REQUIRES_LIMIT" | "ACCOUNT_ROUTING_INVALID" | "TRIGGER_LIMIT_EXCEEDED" | "TRIGGER_CONTROL_IN_PROGRESS" | "TRIGGER_PATCH_EMPTY" | "CLIENT_TRIGGER_ID_INVALID" | "TRIGGER_ACTIVATION_PRICE_INVALID" | "SLIPPAGE_TICKS_INVALID" | "SLIPPAGE_BPS_INVALID" | "TRIGGER_CONTROL_OUTCOME_UNKNOWN" | "TRIGGER_CAPACITY_REACHED" | "RESERVATION_CAPACITY_REACHED" | "CLIENT_ORDER_ID_CAPACITY_REACHED" | "ACCOUNT_RESERVATION_LIMIT_REACHED" | "INVALID_TRIGGER_CONTROL" | "TRIGGER_PATCH_NOT_ALLOWED" | "TRIGGER_PATCH_FIELD_UNKNOWN" | "TRIGGER_PATCH_VALUE_UNMASKED" | "TRIGGER_PATCH_PRICE_MODE_INVALID" | "ACCOUNT_ORDERS_SUSPENDED" | "TRAILING_SIDE_NOT_SUPPORTED" | "TRAILING_CHILD_NOT_MARKET" | "TWAP_DURATION_INVALID" | "LIMIT_CHILD_SLIPPAGE_SET" | "SLIPPAGE_BOUNDS_CONFLICT" | "TWAP_INTERVAL_INVALID" | "LADDER_LEVEL_REJECTED" | "LADDER_RANGE_TOO_NARROW" | "LADDER_LEVELS_INVALID" | "ORDER_LIMITS_UNAVAILABLE" | "ORDER_TYPE_NOT_ALLOWED_IN_AUCTION" | "POST_ONLY_NOT_ALLOWED_IN_AUCTION" | "QUICKSWAP_FEE_DETAILS_INCOMPLETE" | "QUICKSWAP_MARKET_NOT_PRICED" | "QUICKSWAP_BROKER_FEE_TERMS_MISMATCH" | "QUICKSWAP_FEE_RECIPIENT_IS_PAYER" | "QUICKSWAP_BROKER_FEE_TERMS_UNAVAILABLE" | "QUICKSWAP_BROKER_ACCOUNT_UNAVAILABLE" | "QUICKSWAP_ACCOUNT_OWNER_UNKNOWN" | "QUICKSWAP_DISABLED" | "QUICKSWAP_ATTACHED_RISK_NOT_ALLOWED" | "QUICKSWAP_ORDER_NOT_MODIFIABLE" | "QUICKSWAP_FEE_TOTAL_TOO_HIGH" | "QUICKSWAP_BROKER_FEE_TERMS_INVALID" | "QUICKSWAP_BROKER_INVALID" | "QUICKSWAP_FEE_SCHEDULE_INVALID" | "QUICKSWAP_MARKET_FEE_INVALID" | "QUICKSWAP_SETUP_INVALID" | "QUICKSWAP_CAPACITY_REACHED" | "ATTACHED_EXIT_WORKING" | "MARKET_TRIGGER_LIMIT_EXCEEDED" | "MARKET_TWAP_LIMIT_EXCEEDED" | "MARKET_LADDER_LIMIT_EXCEEDED" | "CHILD_QTY_EXCEEDS_REMAINING" | "ORDER_CANCEL_OUTCOME_UNKNOWN" | "ORDER_MODIFY_OUTCOME_UNKNOWN" | "ORDER_REPAIRING" | "ACCOUNT_REPAIRING" | "TRIGGER_WOULD_TRIGGER_IMMEDIATELY" | "ORDER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_SYMBOL_MISMATCH" | "MAX_OPEN_ORDERS_PER_PAIR" | "SELF_TRADE_PREVENTED" | "ATTACHED_LEGS_EXCEEDED" | "FEE_ASSET_INVALID" | "FEE_CEILING_INVALID" | "UNSUPPORTED_FIELD_SET" | "TRIGGER_FIRE_LIMIT_REACHED" | "CONDITION_FLAGS_INVALID" | "CONDITION_PARAMETER_SET" | "TWAP_CAPACITY_REACHED" | "CHILD_ORDER_INCONSISTENT" | "PATH_BODY_ID_MISMATCH" | "REQUEST_DEADLINE_EXCEEDED" | "ICEBERG_NOT_ALLOWED" | "ICEBERG_DISPLAY_TOO_SMALL" | "ICEBERG_DISPLAY_INVALID" | "PEG_LIMIT_VIOLATION" | "PEG_REFERENCE_UNAVAILABLE" | "INVALID_PEG" | "TRIGGER_ACTIVATION_PRICE_NOT_MODIFIABLE" | "CLIENT_LIST_ID_INVALID" | "MODIFY_APPLY_EXPIRED" | undefined;
|
|
1386
1386
|
price: string;
|
|
1387
1387
|
createdTs: number;
|
|
1388
1388
|
terminalTs: number;
|
|
@@ -1397,7 +1397,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1397
1397
|
hiddenQty?: string | undefined;
|
|
1398
1398
|
symbolId: number;
|
|
1399
1399
|
clientOrderId: string;
|
|
1400
|
-
status: "unspecified" | "
|
|
1400
|
+
status: "unspecified" | "canceled" | "rejected" | "pending" | "pending_cancel" | "working" | "filled" | "partial";
|
|
1401
1401
|
side: "unspecified" | "buy" | "sell";
|
|
1402
1402
|
orderType: "unspecified" | "limit" | "market";
|
|
1403
1403
|
timeInForce: "unspecified" | "gtc" | "ioc" | "fok" | "gtd";
|
|
@@ -1441,7 +1441,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1441
1441
|
triggerId: string;
|
|
1442
1442
|
subaccountId: string;
|
|
1443
1443
|
symbolId: number;
|
|
1444
|
-
status: "unspecified" | "
|
|
1444
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
1445
1445
|
parentOrderId: string | undefined;
|
|
1446
1446
|
orderListId: string | undefined;
|
|
1447
1447
|
qty: string;
|
|
@@ -1623,11 +1623,11 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1623
1623
|
runtimeDetails: TriggerDetailsOutput;
|
|
1624
1624
|
version: number;
|
|
1625
1625
|
cancelReason: undefined;
|
|
1626
|
-
failureReason: "unspecified" | "
|
|
1626
|
+
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" | "quote_size_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" | "trigger_stopping";
|
|
1627
1627
|
triggerId: string;
|
|
1628
1628
|
subaccountId: string;
|
|
1629
1629
|
symbolId: number;
|
|
1630
|
-
status: "unspecified" | "
|
|
1630
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
1631
1631
|
parentOrderId: string | undefined;
|
|
1632
1632
|
orderListId: string | undefined;
|
|
1633
1633
|
qty: string;
|
|
@@ -1813,7 +1813,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
1813
1813
|
triggerId: string;
|
|
1814
1814
|
subaccountId: string;
|
|
1815
1815
|
symbolId: number;
|
|
1816
|
-
status: "unspecified" | "
|
|
1816
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
1817
1817
|
parentOrderId: string | undefined;
|
|
1818
1818
|
orderListId: string | undefined;
|
|
1819
1819
|
qty: string;
|
|
@@ -2037,10 +2037,10 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
2037
2037
|
} | {
|
|
2038
2038
|
type: "price_chart";
|
|
2039
2039
|
symbolId: number;
|
|
2040
|
-
timeframe: "unspecified" | "
|
|
2040
|
+
timeframe: "unspecified" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1mo";
|
|
2041
2041
|
candles: {
|
|
2042
2042
|
symbolId: number;
|
|
2043
|
-
timeframe: DecodedEnum<"
|
|
2043
|
+
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1mo">;
|
|
2044
2044
|
time: number;
|
|
2045
2045
|
open: string;
|
|
2046
2046
|
high: string;
|
|
@@ -2093,7 +2093,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
2093
2093
|
price: string;
|
|
2094
2094
|
referencePrice: string;
|
|
2095
2095
|
armed: boolean;
|
|
2096
|
-
status: "unspecified" | "active" | "
|
|
2096
|
+
status: "unspecified" | "active" | "triggered" | "canceled";
|
|
2097
2097
|
channels: ("unspecified" | "in_app" | "telegram")[];
|
|
2098
2098
|
revision: string;
|
|
2099
2099
|
createdAt: number | null;
|
|
@@ -2149,7 +2149,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
2149
2149
|
points: number;
|
|
2150
2150
|
series: {
|
|
2151
2151
|
assetId: number;
|
|
2152
|
-
accountCode: "unspecified" | "
|
|
2152
|
+
accountCode: "unspecified" | "funding" | "trading";
|
|
2153
2153
|
balance: string[];
|
|
2154
2154
|
}[];
|
|
2155
2155
|
} | undefined;
|
|
@@ -2220,7 +2220,7 @@ declare function formatView(view: View, scales: SdkScales): {
|
|
|
2220
2220
|
amount: string;
|
|
2221
2221
|
balanceAfter: string | undefined;
|
|
2222
2222
|
type: "unspecified" | "internal_transfer" | "deposit" | "withdraw" | "maker_fee" | "taker_fee" | "trade_base" | "trade_quote" | "rebate" | "funding_to_trading" | "trading_to_funding" | "trading_withdraw_reserve" | "funding_user_transfer" | "trading_withdraw_request_fee" | "trading_withdraw_fee_leg" | "quickswap_polyester_fee" | "quickswap_broker_fee" | "quickswap_affiliate_fee" | "fee_sweep" | "fee_refill" | "system_adjustment" | "withdraw_failed" | "internal_batch";
|
|
2223
|
-
accountCode: "unspecified" | "
|
|
2223
|
+
accountCode: "unspecified" | "funding" | "trading";
|
|
2224
2224
|
timestamp: number;
|
|
2225
2225
|
isDebit: boolean;
|
|
2226
2226
|
linkId: string | undefined;
|
|
@@ -3415,9 +3415,9 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3415
3415
|
triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
|
|
3416
3416
|
side: "unspecified" | "buy" | "sell";
|
|
3417
3417
|
quantity: string;
|
|
3418
|
-
action: "unspecified" | "
|
|
3418
|
+
action: "unspecified" | "modify" | "pause" | "resume";
|
|
3419
3419
|
before: {
|
|
3420
|
-
status: "unspecified" | "
|
|
3420
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
3421
3421
|
triggerPrice: string | undefined;
|
|
3422
3422
|
trailingDistance: {
|
|
3423
3423
|
kind: "distance";
|
|
@@ -3441,7 +3441,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3441
3441
|
limitPrice: string | undefined;
|
|
3442
3442
|
} | undefined;
|
|
3443
3443
|
after: {
|
|
3444
|
-
status: "unspecified" | "
|
|
3444
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
3445
3445
|
triggerPrice: string | undefined;
|
|
3446
3446
|
trailingDistance: {
|
|
3447
3447
|
kind: "distance";
|
|
@@ -3657,7 +3657,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3657
3657
|
} | {
|
|
3658
3658
|
type: "approval_resolved";
|
|
3659
3659
|
approvalId: string;
|
|
3660
|
-
status: "unspecified" | "
|
|
3660
|
+
status: "unspecified" | "expired" | "rejected" | "pending" | "approved";
|
|
3661
3661
|
text?: undefined;
|
|
3662
3662
|
fromSeq?: undefined;
|
|
3663
3663
|
toolCallId?: undefined;
|
|
@@ -3712,7 +3712,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3712
3712
|
attachedRisk: {
|
|
3713
3713
|
takeProfit: {
|
|
3714
3714
|
state: {
|
|
3715
|
-
status: "unspecified" | "
|
|
3715
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed" | "not_configured";
|
|
3716
3716
|
armedTs: number | undefined;
|
|
3717
3717
|
armedTsNs: string | undefined;
|
|
3718
3718
|
terminalTs: number | undefined;
|
|
@@ -3732,7 +3732,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3732
3732
|
} | undefined;
|
|
3733
3733
|
stopLoss: {
|
|
3734
3734
|
state: {
|
|
3735
|
-
status: "unspecified" | "
|
|
3735
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed" | "not_configured";
|
|
3736
3736
|
armedTs: number | undefined;
|
|
3737
3737
|
armedTsNs: string | undefined;
|
|
3738
3738
|
terminalTs: number | undefined;
|
|
@@ -3752,7 +3752,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3752
3752
|
} | undefined;
|
|
3753
3753
|
trailingStop: {
|
|
3754
3754
|
state: {
|
|
3755
|
-
status: "unspecified" | "
|
|
3755
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed" | "not_configured";
|
|
3756
3756
|
armedTs: number | undefined;
|
|
3757
3757
|
armedTsNs: string | undefined;
|
|
3758
3758
|
terminalTs: number | undefined;
|
|
@@ -3783,7 +3783,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3783
3783
|
oco: boolean;
|
|
3784
3784
|
} | undefined;
|
|
3785
3785
|
cancelReason?: "unspecified" | "system" | "user_request" | "ioc_remainder" | "market_remainder" | "stp_expire_maker" | "stp_expire_taker" | "stp_expire_both" | "replaced" | "gtd_expired" | "qty_at_or_below_filled" | "pair_drain" | "attached_risk_refused" | "cancel_all_after" | "account_repair" | "twap_rollover" | "strategy_cancel" | "market_halted" | "attached_exit_fired" | "stp_decrement" | "price_band" | "cancel_on_disconnect" | undefined;
|
|
3786
|
-
rejectReason?: "STALE_QUOTE" | "UNSPECIFIED" | "
|
|
3786
|
+
rejectReason?: "STALE_QUOTE" | "UNSPECIFIED" | "BAD_REQUEST" | "INVALID_ARGUMENT" | "INSUFFICIENT_FUNDS" | "UNKNOWN_SYMBOL" | "BAD_PRICE" | "BAD_QTY" | "MIN_NOTIONAL" | "QTY_STEP_SIZE" | "CONFLICT_DUPLICATE_CLIENT_ORDER_ID" | "UNAVAILABLE" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "NOT_FOUND" | "UPSTREAM_ERROR" | "FEE_ASSET_NOT_ALLOWED" | "PAIR_DISABLED" | "ORDER_UNKNOWN" | "INTERNAL_ERROR" | "SUBACCOUNT_INACTIVE" | "POLICY_MARKET_DENY" | "POLICY_MAX_NOTIONAL" | "POLICY_TRADING_HALTED" | "POLICY_SPOT_TRADE_DENY" | "API_KEY_ROOT_SCOPE_ONLY" | "API_KEY_SUB_SCOPE_ONLY" | "API_KEY_SUBACCOUNT_MISMATCH" | "API_KEY_POLICY_REQUIRED" | "API_KEY_UNKNOWN" | "API_KEY_MARKET_DENY" | "API_KEY_SPOT_TRADE_DENY" | "PRICE_TICK_SIZE" | "MIN_QTY" | "POST_ONLY_LIMIT_ONLY" | "BATCH_TOO_LARGE" | "POLICY_MAX_OPEN_ORDERS" | "MODIFICATION_REQUIRES_REPLACE" | "CONFLICT_IDEMPOTENCY_KEY_REUSE" | "MARKET_PRICE_UNAVAILABLE" | "PAIR_NOT_LISTED_YET" | "PAIR_DELISTED" | "PAIR_CANCEL_ONLY" | "PAIR_POST_ONLY" | "PAIR_REDUCE_ONLY" | "RISK_LIMIT" | "MARKET_HALTED" | "ACCOUNT_UNKNOWN" | "POST_ONLY_CROSS" | "REDUCE_ONLY_BLOCKED" | "PRICE_BAND_VIOLATION" | "MARKET_CAP_VIOLATION" | "EMPTY_BOOK" | "FOK_INSUFFICIENT_LIQUIDITY" | "ORDER_ALREADY_TERMINAL" | "TRIGGER_PRICE_INVALID" | "TRIGGER_PRICE_SOURCE_UNSUPPORTED" | "TRAILING_DISTANCE_INVALID" | "TRIGGER_NOT_FOUND" | "TRIGGER_STATUS_INVALID" | "TRIGGER_NOT_MODIFIABLE" | "CONFLICT_DUPLICATE_CLIENT_TRIGGER_ID" | "MAX_SLIPPAGE_INVALID" | "VALIDATION_ERROR" | "OVERLOADED" | "QUOTE_SIZE_TOO_SMALL" | "RATE_LIMIT_EXCEEDED" | "SUBACCOUNT_READ_FORBIDDEN" | "POLICY_SPOT_READ_DENY" | "API_KEY_SPOT_READ_DENY" | "CANCEL_REQUEST_EXPIRED" | "MAX_QTY" | "MAX_NOTIONAL" | "QTY_AT_OR_BELOW_FILLED" | "GATEWAY_MISCONFIGURED" | "INVALID_ORDER_ID" | "CHILD_QTY_RAISE_NOT_ALLOWED" | "ATTACHED_RISK_NOT_SUPPORTED" | "SETTLEMENT_BACKLOGGED" | "PRICE_LEVEL_QUANTITY_LIMIT" | "MARKET_QUOTE_STALE" | "MARKET_QUOTE_UNHEALTHY" | "INVALID_TIME_IN_FORCE" | "QUICKSWAP_NOT_PERMITTED" | "DUPLICATE_ORDER_ID" | "MAX_OPEN_ORDERS_TOTAL" | "STP_MODE_NOT_ALLOWED" | "PAIR_BACKLOGGED" | "PRICE_LEVELS_EXHAUSTED" | "CLIENT_ORDER_IDS_EXHAUSTED" | "ORDER_ID_CONFLICT" | "INVALID_SIDE" | "INVALID_ORDER_TYPE" | "INVALID_STP_MODE" | "INVALID_ORDER_FLAGS" | "BATCH_OTHER_ITEM_INVALID" | "REPLACE_ONTO_OWN_ID" | "INVALID_CLIENT_ORDER_ID" | "ORDER_SEQUENCE_EXHAUSTED" | "INVALID_HANDLING_MODE" | "FEE_SCHEDULE_UNAVAILABLE" | "POLICY_UNAVAILABLE" | "CANCEL_ALL_AFTER_TIMEOUT_INVALID" | "CANCEL_SCOPE_TOO_LARGE" | "RATE_LIMIT_POLICY_UNAVAILABLE" | "SYSTEM_RATE_LIMITED" | "ORDER_MODIFY_IN_PROGRESS" | "ORDER_PLACEMENT_PENDING" | "INVALID_MODIFY_BEHAVIOR" | "BATCH_REPLACE_ONLY_REQUIRED" | "BATCH_SINGLE_SYMBOL_REQUIRED" | "REQUEST_RECEIPTS_EXHAUSTED" | "INTENT_ID_INVALID" | "DRY_RUN_INVALID" | "CANCEL_ALL_AFTER_SCOPE_CONFLICT" | "NEW_ACCOUNT_CAPACITY_REACHED" | "TRIGGER_CHILD_PRICE_NOT_MODIFIABLE" | "TRIGGER_GENERATIONS_EXHAUSTED" | "TRIGGER_CONTROL_SHARE_EXHAUSTED" | "TRIGGER_CONTROLS_BUSY" | "TRIGGER_TYPE_NOT_SUPPORTED" | "INVALID_TRIGGER_TYPE" | "TRIGGER_DIRECTION_INVALID" | "TRIGGER_QTY_INVALID" | "TRIGGER_BUY_REQUIRES_LIMIT" | "ACCOUNT_ROUTING_INVALID" | "TRIGGER_LIMIT_EXCEEDED" | "TRIGGER_CONTROL_IN_PROGRESS" | "TRIGGER_PATCH_EMPTY" | "CLIENT_TRIGGER_ID_INVALID" | "TRIGGER_ACTIVATION_PRICE_INVALID" | "SLIPPAGE_TICKS_INVALID" | "SLIPPAGE_BPS_INVALID" | "TRIGGER_CONTROL_OUTCOME_UNKNOWN" | "TRIGGER_CAPACITY_REACHED" | "RESERVATION_CAPACITY_REACHED" | "CLIENT_ORDER_ID_CAPACITY_REACHED" | "ACCOUNT_RESERVATION_LIMIT_REACHED" | "INVALID_TRIGGER_CONTROL" | "TRIGGER_PATCH_NOT_ALLOWED" | "TRIGGER_PATCH_FIELD_UNKNOWN" | "TRIGGER_PATCH_VALUE_UNMASKED" | "TRIGGER_PATCH_PRICE_MODE_INVALID" | "ACCOUNT_ORDERS_SUSPENDED" | "TRAILING_SIDE_NOT_SUPPORTED" | "TRAILING_CHILD_NOT_MARKET" | "TWAP_DURATION_INVALID" | "LIMIT_CHILD_SLIPPAGE_SET" | "SLIPPAGE_BOUNDS_CONFLICT" | "TWAP_INTERVAL_INVALID" | "LADDER_LEVEL_REJECTED" | "LADDER_RANGE_TOO_NARROW" | "LADDER_LEVELS_INVALID" | "ORDER_LIMITS_UNAVAILABLE" | "ORDER_TYPE_NOT_ALLOWED_IN_AUCTION" | "POST_ONLY_NOT_ALLOWED_IN_AUCTION" | "QUICKSWAP_FEE_DETAILS_INCOMPLETE" | "QUICKSWAP_MARKET_NOT_PRICED" | "QUICKSWAP_BROKER_FEE_TERMS_MISMATCH" | "QUICKSWAP_FEE_RECIPIENT_IS_PAYER" | "QUICKSWAP_BROKER_FEE_TERMS_UNAVAILABLE" | "QUICKSWAP_BROKER_ACCOUNT_UNAVAILABLE" | "QUICKSWAP_ACCOUNT_OWNER_UNKNOWN" | "QUICKSWAP_DISABLED" | "QUICKSWAP_ATTACHED_RISK_NOT_ALLOWED" | "QUICKSWAP_ORDER_NOT_MODIFIABLE" | "QUICKSWAP_FEE_TOTAL_TOO_HIGH" | "QUICKSWAP_BROKER_FEE_TERMS_INVALID" | "QUICKSWAP_BROKER_INVALID" | "QUICKSWAP_FEE_SCHEDULE_INVALID" | "QUICKSWAP_MARKET_FEE_INVALID" | "QUICKSWAP_SETUP_INVALID" | "QUICKSWAP_CAPACITY_REACHED" | "ATTACHED_EXIT_WORKING" | "MARKET_TRIGGER_LIMIT_EXCEEDED" | "MARKET_TWAP_LIMIT_EXCEEDED" | "MARKET_LADDER_LIMIT_EXCEEDED" | "CHILD_QTY_EXCEEDS_REMAINING" | "ORDER_CANCEL_OUTCOME_UNKNOWN" | "ORDER_MODIFY_OUTCOME_UNKNOWN" | "ORDER_REPAIRING" | "ACCOUNT_REPAIRING" | "TRIGGER_WOULD_TRIGGER_IMMEDIATELY" | "ORDER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_CREATE_OUTCOME_UNKNOWN" | "TRIGGER_SYMBOL_MISMATCH" | "MAX_OPEN_ORDERS_PER_PAIR" | "SELF_TRADE_PREVENTED" | "ATTACHED_LEGS_EXCEEDED" | "FEE_ASSET_INVALID" | "FEE_CEILING_INVALID" | "UNSUPPORTED_FIELD_SET" | "TRIGGER_FIRE_LIMIT_REACHED" | "CONDITION_FLAGS_INVALID" | "CONDITION_PARAMETER_SET" | "TWAP_CAPACITY_REACHED" | "CHILD_ORDER_INCONSISTENT" | "PATH_BODY_ID_MISMATCH" | "REQUEST_DEADLINE_EXCEEDED" | "ICEBERG_NOT_ALLOWED" | "ICEBERG_DISPLAY_TOO_SMALL" | "ICEBERG_DISPLAY_INVALID" | "PEG_LIMIT_VIOLATION" | "PEG_REFERENCE_UNAVAILABLE" | "INVALID_PEG" | "TRIGGER_ACTIVATION_PRICE_NOT_MODIFIABLE" | "CLIENT_LIST_ID_INVALID" | "MODIFY_APPLY_EXPIRED" | undefined;
|
|
3787
3787
|
price: string;
|
|
3788
3788
|
createdTs: number;
|
|
3789
3789
|
terminalTs: number;
|
|
@@ -3798,7 +3798,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3798
3798
|
hiddenQty?: string | undefined;
|
|
3799
3799
|
symbolId: number;
|
|
3800
3800
|
clientOrderId: string;
|
|
3801
|
-
status: "unspecified" | "
|
|
3801
|
+
status: "unspecified" | "canceled" | "rejected" | "pending" | "pending_cancel" | "working" | "filled" | "partial";
|
|
3802
3802
|
side: "unspecified" | "buy" | "sell";
|
|
3803
3803
|
orderType: "unspecified" | "limit" | "market";
|
|
3804
3804
|
timeInForce: "unspecified" | "gtc" | "ioc" | "fok" | "gtd";
|
|
@@ -3842,7 +3842,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
3842
3842
|
triggerId: string;
|
|
3843
3843
|
subaccountId: string;
|
|
3844
3844
|
symbolId: number;
|
|
3845
|
-
status: "unspecified" | "
|
|
3845
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
3846
3846
|
parentOrderId: string | undefined;
|
|
3847
3847
|
orderListId: string | undefined;
|
|
3848
3848
|
qty: string;
|
|
@@ -4024,11 +4024,11 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
4024
4024
|
runtimeDetails: TriggerDetailsOutput;
|
|
4025
4025
|
version: number;
|
|
4026
4026
|
cancelReason: undefined;
|
|
4027
|
-
failureReason: "unspecified" | "
|
|
4027
|
+
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" | "quote_size_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" | "trigger_stopping";
|
|
4028
4028
|
triggerId: string;
|
|
4029
4029
|
subaccountId: string;
|
|
4030
4030
|
symbolId: number;
|
|
4031
|
-
status: "unspecified" | "
|
|
4031
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
4032
4032
|
parentOrderId: string | undefined;
|
|
4033
4033
|
orderListId: string | undefined;
|
|
4034
4034
|
qty: string;
|
|
@@ -4214,7 +4214,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
4214
4214
|
triggerId: string;
|
|
4215
4215
|
subaccountId: string;
|
|
4216
4216
|
symbolId: number;
|
|
4217
|
-
status: "unspecified" | "
|
|
4217
|
+
status: "unspecified" | "canceled" | "armed" | "running" | "failed" | "paused" | "created" | "completed";
|
|
4218
4218
|
parentOrderId: string | undefined;
|
|
4219
4219
|
orderListId: string | undefined;
|
|
4220
4220
|
qty: string;
|
|
@@ -4438,10 +4438,10 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
4438
4438
|
} | {
|
|
4439
4439
|
type: "price_chart";
|
|
4440
4440
|
symbolId: number;
|
|
4441
|
-
timeframe: "unspecified" | "
|
|
4441
|
+
timeframe: "unspecified" | "1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1mo";
|
|
4442
4442
|
candles: {
|
|
4443
4443
|
symbolId: number;
|
|
4444
|
-
timeframe: DecodedEnum<"
|
|
4444
|
+
timeframe: DecodedEnum<"1s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1mo">;
|
|
4445
4445
|
time: number;
|
|
4446
4446
|
open: string;
|
|
4447
4447
|
high: string;
|
|
@@ -4494,7 +4494,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
4494
4494
|
price: string;
|
|
4495
4495
|
referencePrice: string;
|
|
4496
4496
|
armed: boolean;
|
|
4497
|
-
status: "unspecified" | "active" | "
|
|
4497
|
+
status: "unspecified" | "active" | "triggered" | "canceled";
|
|
4498
4498
|
channels: ("unspecified" | "in_app" | "telegram")[];
|
|
4499
4499
|
revision: string;
|
|
4500
4500
|
createdAt: number | null;
|
|
@@ -4550,7 +4550,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
4550
4550
|
points: number;
|
|
4551
4551
|
series: {
|
|
4552
4552
|
assetId: number;
|
|
4553
|
-
accountCode: "unspecified" | "
|
|
4553
|
+
accountCode: "unspecified" | "funding" | "trading";
|
|
4554
4554
|
balance: string[];
|
|
4555
4555
|
}[];
|
|
4556
4556
|
} | undefined;
|
|
@@ -4621,7 +4621,7 @@ declare function formatRunEvent(event: RunEvent, scales: SdkScales): {
|
|
|
4621
4621
|
amount: string;
|
|
4622
4622
|
balanceAfter: string | undefined;
|
|
4623
4623
|
type: "unspecified" | "internal_transfer" | "deposit" | "withdraw" | "maker_fee" | "taker_fee" | "trade_base" | "trade_quote" | "rebate" | "funding_to_trading" | "trading_to_funding" | "trading_withdraw_reserve" | "funding_user_transfer" | "trading_withdraw_request_fee" | "trading_withdraw_fee_leg" | "quickswap_polyester_fee" | "quickswap_broker_fee" | "quickswap_affiliate_fee" | "fee_sweep" | "fee_refill" | "system_adjustment" | "withdraw_failed" | "internal_batch";
|
|
4624
|
-
accountCode: "unspecified" | "
|
|
4624
|
+
accountCode: "unspecified" | "funding" | "trading";
|
|
4625
4625
|
timestamp: number;
|
|
4626
4626
|
isDebit: boolean;
|
|
4627
4627
|
linkId: string | undefined;
|
|
@@ -302,7 +302,7 @@ declare function formatModelKey(k: ModelKey | undefined): {
|
|
|
302
302
|
suffix: string;
|
|
303
303
|
addedAt: number | undefined;
|
|
304
304
|
/** The last check with OpenAI: on save, when OpenAI refused it in a run, and on recovery. */
|
|
305
|
-
lastCheck: "unspecified" | "
|
|
305
|
+
lastCheck: "unspecified" | "valid" | "rejected" | "no_quota" | "model_unavailable";
|
|
306
306
|
checkedAt: number | undefined;
|
|
307
307
|
};
|
|
308
308
|
type AssistantModelKey = ReturnType<typeof formatModelKey>;
|
|
@@ -57,7 +57,7 @@ type EquityGroupBy = v.InferOutput<typeof EquityGroupBySchema>;
|
|
|
57
57
|
declare const BalanceHistoryInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
58
58
|
readonly range: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1d", "7d", "30d", "90d", "180d", "365d"], undefined>, v.TransformAction<"1d" | "7d" | "30d" | "90d" | "180d" | "365d", BalanceRange$1.DAY_1 | BalanceRange$1.DAY_7 | BalanceRange$1.DAY_30 | BalanceRange$1.DAY_90 | BalanceRange$1.DAY_180 | BalanceRange$1.DAY_365>]>;
|
|
59
59
|
readonly ledger: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, 0>;
|
|
60
|
-
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"
|
|
60
|
+
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"funding" | "trading", AccountCode.FUNDING | AccountCode.TRADING>]>, undefined>, readonly []>;
|
|
61
61
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
62
62
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
63
63
|
}, undefined>], undefined>, undefined>;
|
|
@@ -112,14 +112,14 @@ declare function createBalanceHistoryResponseSchema(): v.SchemaWithPipe<readonly
|
|
|
112
112
|
points: number;
|
|
113
113
|
series: {
|
|
114
114
|
assetId: number;
|
|
115
|
-
accountCode: "unspecified" | "
|
|
115
|
+
accountCode: "unspecified" | "funding" | "trading";
|
|
116
116
|
balance: string[];
|
|
117
117
|
}[];
|
|
118
118
|
}>]>;
|
|
119
119
|
type BalanceHistoryResponse = v.InferOutput<ReturnType<typeof createBalanceHistoryResponseSchema>>;
|
|
120
120
|
declare const EquityHistoryInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
121
121
|
readonly range: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1d", "7d", "30d", "90d", "180d", "365d"], undefined>, v.TransformAction<"1d" | "7d" | "30d" | "90d" | "180d" | "365d", BalanceRange$1.DAY_1 | BalanceRange$1.DAY_7 | BalanceRange$1.DAY_30 | BalanceRange$1.DAY_90 | BalanceRange$1.DAY_180 | BalanceRange$1.DAY_365>]>;
|
|
122
|
-
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"
|
|
122
|
+
readonly accountCodes: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["funding", "trading"], undefined>, v.TransformAction<"funding" | "trading", AccountCode.FUNDING | AccountCode.TRADING>]>, undefined>, readonly []>;
|
|
123
123
|
readonly groupBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["account", "asset"], undefined>, "account">, v.TransformAction<"account" | "asset", EquityGroupBy$1.GROUP_BY_ACCOUNT | EquityGroupBy$1.GROUP_BY_ASSET>]>;
|
|
124
124
|
readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
|
|
125
125
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|