@polyester/sdk 0.0.1 → 0.1.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 +8 -0
- package/README.md +121 -36
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +2 -0
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +14 -13
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +14 -14
- package/dist/services/orders/orders-output.schemas.d.ts +30 -18
- package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +5 -5
- package/dist/services/trades/trades.schemas.d.ts +28 -12
- package/dist/services/trades/trades.schemas.d.ts.map +1 -1
- package/dist/services/trades/trades.schemas.js +13 -7
- package/dist/services/trades/trades.schemas.js.map +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +13 -13
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
9
9
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
10
10
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
11
11
|
readonly side: v.EnumSchema<typeof Side, undefined>;
|
|
12
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "
|
|
12
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "pending_cancel" | "working" | "filled" | "rejected">]>;
|
|
13
13
|
readonly orderType: v.NumberSchema<undefined>;
|
|
14
14
|
readonly timeInForce: v.NumberSchema<undefined>;
|
|
15
15
|
readonly selfTradePreventionMode: v.NumberSchema<undefined>;
|
|
@@ -90,7 +90,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
90
90
|
symbolId: number;
|
|
91
91
|
clientOrderId: string;
|
|
92
92
|
side: Side;
|
|
93
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
93
|
+
status: "pending" | "unspecified" | "canceled" | "pending_cancel" | "working" | "filled" | "rejected";
|
|
94
94
|
orderType: number;
|
|
95
95
|
timeInForce: number;
|
|
96
96
|
selfTradePreventionMode: number;
|
|
@@ -182,7 +182,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
182
182
|
orderId: string;
|
|
183
183
|
symbolId: number;
|
|
184
184
|
clientOrderId: string;
|
|
185
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
185
|
+
status: "pending" | "unspecified" | "canceled" | "pending_cancel" | "working" | "filled" | "rejected" | "partial";
|
|
186
186
|
side: "unspecified" | "buy" | "sell";
|
|
187
187
|
orderType: "unspecified" | "limit" | "market";
|
|
188
188
|
timeInForce: "unspecified" | "GTC" | "IOC" | "FOK";
|
|
@@ -283,7 +283,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
283
283
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
284
284
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
285
285
|
readonly side: v.EnumSchema<typeof Side, undefined>;
|
|
286
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "
|
|
286
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "pending_cancel" | "working" | "filled" | "rejected">]>;
|
|
287
287
|
readonly orderType: v.NumberSchema<undefined>;
|
|
288
288
|
readonly timeInForce: v.NumberSchema<undefined>;
|
|
289
289
|
readonly selfTradePreventionMode: v.NumberSchema<undefined>;
|
|
@@ -364,7 +364,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
364
364
|
symbolId: number;
|
|
365
365
|
clientOrderId: string;
|
|
366
366
|
side: Side;
|
|
367
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
367
|
+
status: "pending" | "unspecified" | "canceled" | "pending_cancel" | "working" | "filled" | "rejected";
|
|
368
368
|
orderType: number;
|
|
369
369
|
timeInForce: number;
|
|
370
370
|
selfTradePreventionMode: number;
|
|
@@ -456,7 +456,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
456
456
|
orderId: string;
|
|
457
457
|
symbolId: number;
|
|
458
458
|
clientOrderId: string;
|
|
459
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
459
|
+
status: "pending" | "unspecified" | "canceled" | "pending_cancel" | "working" | "filled" | "rejected" | "partial";
|
|
460
460
|
side: "unspecified" | "buy" | "sell";
|
|
461
461
|
orderType: "unspecified" | "limit" | "market";
|
|
462
462
|
timeInForce: "unspecified" | "GTC" | "IOC" | "FOK";
|
|
@@ -516,35 +516,51 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
516
516
|
} | undefined;
|
|
517
517
|
}>]>;
|
|
518
518
|
readonly trades: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
519
|
-
readonly tradeId: v.OptionalSchema<v.BigintSchema<undefined>, undefined>;
|
|
520
519
|
readonly orderId: v.BigintSchema<undefined>;
|
|
521
|
-
readonly subaccountId: v.OptionalSchema<v.BigintSchema<undefined>, undefined>;
|
|
522
520
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
523
521
|
readonly side: v.NumberSchema<undefined>;
|
|
524
522
|
readonly isMaker: v.BooleanSchema<undefined>;
|
|
525
523
|
readonly feeAsset: v.NumberSchema<undefined>;
|
|
526
524
|
readonly qtyScaled: v.BigintSchema<undefined>;
|
|
527
525
|
readonly priceTicks: v.BigintSchema<undefined>;
|
|
528
|
-
readonly
|
|
526
|
+
readonly feeAmountE18: v.OptionalSchema<v.ObjectSchema<{
|
|
527
|
+
readonly hi: v.BigintSchema<undefined>;
|
|
528
|
+
readonly lo: v.BigintSchema<undefined>;
|
|
529
|
+
}, undefined>, undefined>;
|
|
530
|
+
readonly referralShareAmountE18: v.OptionalSchema<v.ObjectSchema<{
|
|
531
|
+
readonly hi: v.BigintSchema<undefined>;
|
|
532
|
+
readonly lo: v.BigintSchema<undefined>;
|
|
533
|
+
}, undefined>, undefined>;
|
|
534
|
+
readonly feeIsRebate: v.BooleanSchema<undefined>;
|
|
529
535
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
530
536
|
readonly matchId: v.BigintSchema<undefined>;
|
|
531
537
|
}, undefined>, v.TransformAction<{
|
|
532
|
-
tradeId?: bigint | undefined;
|
|
533
538
|
orderId: bigint;
|
|
534
|
-
subaccountId?: bigint | undefined;
|
|
535
539
|
symbolId: number;
|
|
536
540
|
side: number;
|
|
537
541
|
isMaker: boolean;
|
|
538
542
|
feeAsset: number;
|
|
539
543
|
qtyScaled: bigint;
|
|
540
544
|
priceTicks: bigint;
|
|
541
|
-
|
|
545
|
+
feeAmountE18?: {
|
|
546
|
+
hi: bigint;
|
|
547
|
+
lo: bigint;
|
|
548
|
+
} | undefined;
|
|
549
|
+
referralShareAmountE18?: {
|
|
550
|
+
hi: bigint;
|
|
551
|
+
lo: bigint;
|
|
552
|
+
} | undefined;
|
|
553
|
+
feeIsRebate: boolean;
|
|
542
554
|
tsNs: bigint;
|
|
543
555
|
matchId: bigint;
|
|
544
556
|
}, {
|
|
545
|
-
|
|
557
|
+
feeIsRebate: boolean;
|
|
558
|
+
tsNs: string;
|
|
559
|
+
tsIso: string;
|
|
560
|
+
tsMs: number;
|
|
561
|
+
matchId: string;
|
|
562
|
+
referralShare?: string | undefined;
|
|
546
563
|
orderId: string;
|
|
547
|
-
subaccountId: string | undefined;
|
|
548
564
|
symbolId: number;
|
|
549
565
|
sideLabel: "unspecified" | "buy" | "sell";
|
|
550
566
|
liquidityLabel: "maker" | "taker";
|
|
@@ -552,10 +568,6 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
552
568
|
qty: string;
|
|
553
569
|
price: string;
|
|
554
570
|
fee: string;
|
|
555
|
-
tsNs: string;
|
|
556
|
-
tsIso: string;
|
|
557
|
-
tsMs: number;
|
|
558
|
-
matchId: string;
|
|
559
571
|
}>]>, undefined>, readonly []>;
|
|
560
572
|
readonly transfers: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
561
573
|
readonly txId: v.StringSchema<undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orders-output.schemas.d.ts","names":[],"sources":["../../../src/services/orders/orders-output.schemas.ts"],"mappings":";;;;;;iBAmEgB,kBAAkB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2HvC,QAAQ,EAAE,YAAY,kBAAkB;iBAEpC,6BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2C7B,gBAAgB,EAAE,YAAY,kBAAkB;iBAE5C,yBAAyB,QAAQ,YAAS,EAAA
|
|
1
|
+
{"version":3,"file":"orders-output.schemas.d.ts","names":[],"sources":["../../../src/services/orders/orders-output.schemas.ts"],"mappings":";;;;;;iBAmEgB,kBAAkB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2HvC,QAAQ,EAAE,YAAY,kBAAkB;iBAEpC,6BAAyB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2C7B,gBAAgB,EAAE,YAAY,kBAAkB;iBAE5C,yBAAyB,QAAQ,YAAS,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQ9C,eAAe,EAAE,YAAY,kBAAkB"}
|
|
@@ -176,7 +176,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
176
176
|
readonly granteeAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
177
177
|
readonly inviterAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
178
178
|
readonly role: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountRole$1, undefined>, v.TransformAction<SubaccountRole$1, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
179
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountInviteStatus$1, undefined>, v.TransformAction<SubaccountInviteStatus$1, "pending" | "unspecified" | "
|
|
179
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof SubaccountInviteStatus$1, undefined>, v.TransformAction<SubaccountInviteStatus$1, "pending" | "unspecified" | "accepted" | "declined" | "cancelled">]>;
|
|
180
180
|
readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
181
181
|
readonly seconds: v.BigintSchema<undefined>;
|
|
182
182
|
readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
|
|
@@ -203,7 +203,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
203
203
|
granteeAccountId: string;
|
|
204
204
|
inviterAccountId: string;
|
|
205
205
|
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
206
|
-
status: "pending" | "unspecified" | "
|
|
206
|
+
status: "pending" | "unspecified" | "accepted" | "declined" | "cancelled";
|
|
207
207
|
createdAt?: number | undefined;
|
|
208
208
|
respondedAt?: number | undefined;
|
|
209
209
|
granteeUsername: string;
|
|
@@ -221,7 +221,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
221
221
|
granteeAccountId: string;
|
|
222
222
|
inviterAccountId: string;
|
|
223
223
|
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
224
|
-
status: "pending" | "unspecified" | "
|
|
224
|
+
status: "pending" | "unspecified" | "accepted" | "declined" | "cancelled";
|
|
225
225
|
createdAt?: number | undefined;
|
|
226
226
|
respondedAt?: number | undefined;
|
|
227
227
|
granteeUsername: string;
|
|
@@ -243,8 +243,8 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
243
243
|
seconds: bigint;
|
|
244
244
|
nanos: number;
|
|
245
245
|
} | undefined, number | undefined>]>;
|
|
246
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "account" | "unspecified" | "subaccount" | "destination" | "session" | "
|
|
247
|
-
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "enabled" | "disabled" | "unspecified" | "
|
|
246
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "account" | "unspecified" | "subaccount" | "destination" | "session" | "api_key" | "member" | "policy" | "invite" | "security">]>;
|
|
247
|
+
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "enabled" | "disabled" | "unspecified" | "deleted" | "created" | "updated" | "removed" | "role_set" | "received" | "replied" | "failed" | "revoked" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
248
248
|
readonly source: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventSource, undefined>, v.TransformAction<ActivityEventSource, "unspecified" | "web" | "mobile" | "api">]>;
|
|
249
249
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
250
250
|
readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -2,36 +2,53 @@ import { Side } from "../../gen/orders/v1/orders_pb.js";
|
|
|
2
2
|
import { SdkScales } from "../../shared/decimal-surface.js";
|
|
3
3
|
import * as v from "valibot";
|
|
4
4
|
//#region src/services/trades/trades.schemas.d.ts
|
|
5
|
+
/** Parses a generated user-trade fill into the SDK's JSON-safe public shape. */
|
|
5
6
|
declare function createUserTradeSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
6
|
-
readonly tradeId: v.OptionalSchema<v.BigintSchema<undefined>, undefined>;
|
|
7
7
|
readonly orderId: v.BigintSchema<undefined>;
|
|
8
|
-
readonly subaccountId: v.OptionalSchema<v.BigintSchema<undefined>, undefined>;
|
|
9
8
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
10
9
|
readonly side: v.NumberSchema<undefined>;
|
|
11
10
|
readonly isMaker: v.BooleanSchema<undefined>;
|
|
12
11
|
readonly feeAsset: v.NumberSchema<undefined>;
|
|
13
12
|
readonly qtyScaled: v.BigintSchema<undefined>;
|
|
14
13
|
readonly priceTicks: v.BigintSchema<undefined>;
|
|
15
|
-
readonly
|
|
14
|
+
readonly feeAmountE18: v.OptionalSchema<v.ObjectSchema<{
|
|
15
|
+
readonly hi: v.BigintSchema<undefined>;
|
|
16
|
+
readonly lo: v.BigintSchema<undefined>;
|
|
17
|
+
}, undefined>, undefined>;
|
|
18
|
+
readonly referralShareAmountE18: v.OptionalSchema<v.ObjectSchema<{
|
|
19
|
+
readonly hi: v.BigintSchema<undefined>;
|
|
20
|
+
readonly lo: v.BigintSchema<undefined>;
|
|
21
|
+
}, undefined>, undefined>;
|
|
22
|
+
readonly feeIsRebate: v.BooleanSchema<undefined>;
|
|
16
23
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
17
24
|
readonly matchId: v.BigintSchema<undefined>;
|
|
18
25
|
}, undefined>, v.TransformAction<{
|
|
19
|
-
tradeId?: bigint | undefined;
|
|
20
26
|
orderId: bigint;
|
|
21
|
-
subaccountId?: bigint | undefined;
|
|
22
27
|
symbolId: number;
|
|
23
28
|
side: number;
|
|
24
29
|
isMaker: boolean;
|
|
25
30
|
feeAsset: number;
|
|
26
31
|
qtyScaled: bigint;
|
|
27
32
|
priceTicks: bigint;
|
|
28
|
-
|
|
33
|
+
feeAmountE18?: {
|
|
34
|
+
hi: bigint;
|
|
35
|
+
lo: bigint;
|
|
36
|
+
} | undefined;
|
|
37
|
+
referralShareAmountE18?: {
|
|
38
|
+
hi: bigint;
|
|
39
|
+
lo: bigint;
|
|
40
|
+
} | undefined;
|
|
41
|
+
feeIsRebate: boolean;
|
|
29
42
|
tsNs: bigint;
|
|
30
43
|
matchId: bigint;
|
|
31
44
|
}, {
|
|
32
|
-
|
|
45
|
+
feeIsRebate: boolean;
|
|
46
|
+
tsNs: string;
|
|
47
|
+
tsIso: string;
|
|
48
|
+
tsMs: number;
|
|
49
|
+
matchId: string;
|
|
50
|
+
referralShare?: string | undefined;
|
|
33
51
|
orderId: string;
|
|
34
|
-
subaccountId: string | undefined;
|
|
35
52
|
symbolId: number;
|
|
36
53
|
sideLabel: "unspecified" | "buy" | "sell";
|
|
37
54
|
liquidityLabel: "maker" | "taker";
|
|
@@ -39,12 +56,10 @@ declare function createUserTradeSchema(scales: SdkScales): v.SchemaWithPipe<read
|
|
|
39
56
|
qty: string;
|
|
40
57
|
price: string;
|
|
41
58
|
fee: string;
|
|
42
|
-
tsNs: string;
|
|
43
|
-
tsIso: string;
|
|
44
|
-
tsMs: number;
|
|
45
|
-
matchId: string;
|
|
46
59
|
}>]>;
|
|
60
|
+
/** A JSON-safe authenticated trade fill returned by the SDK. */
|
|
47
61
|
type Trade = v.InferOutput<ReturnType<typeof createUserTradeSchema>>;
|
|
62
|
+
/** Validates filters accepted by {@link TradesService.list}. */
|
|
48
63
|
declare const GetUserTradesInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
49
64
|
readonly symbolId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, number | undefined>]>;
|
|
50
65
|
readonly side: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["buy", "sell"], undefined>, undefined>, v.TransformAction<"buy" | "sell" | undefined, Side.BUY | Side.SELL | undefined>]>;
|
|
@@ -74,6 +89,7 @@ declare const GetUserTradesInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
|
|
|
74
89
|
limit?: number | undefined;
|
|
75
90
|
pageToken?: string | undefined;
|
|
76
91
|
}>]>;
|
|
92
|
+
/** Filters accepted by {@link TradesService.list}. */
|
|
77
93
|
type GetUserTradesInput = v.InferInput<typeof GetUserTradesInputSchema>;
|
|
78
94
|
//#endregion
|
|
79
95
|
export { GetUserTradesInput, GetUserTradesInputSchema, Trade, createUserTradeSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.schemas.d.ts","names":[],"sources":["../../../src/services/trades/trades.schemas.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"trades.schemas.d.ts","names":[],"sources":["../../../src/services/trades/trades.schemas.ts"],"mappings":";;;;;iBAqBgB,sBAAsB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwD3C,QAAQ,EAAE,YAAY,kBAAkB;;cAGvC,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BzB,qBAAqB,EAAE,kBAAkB"}
|
|
@@ -5,38 +5,43 @@ import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
|
5
5
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
6
6
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
7
7
|
import { SideSchema } from "../shared.js";
|
|
8
|
+
import { fromU128 } from "../../utils/u128.js";
|
|
8
9
|
import { FeeAssetCodec, OrderSideCodec } from "../orders/order-enums.codecs.js";
|
|
9
10
|
import { TradeSideCodec } from "./trades.codecs.js";
|
|
10
11
|
import * as v from "valibot";
|
|
11
12
|
//#region src/services/trades/trades.schemas.ts
|
|
13
|
+
const U128Schema = v.object({
|
|
14
|
+
hi: v.bigint(),
|
|
15
|
+
lo: v.bigint()
|
|
16
|
+
});
|
|
17
|
+
/** Parses a generated user-trade fill into the SDK's JSON-safe public shape. */
|
|
12
18
|
function createUserTradeSchema(scales) {
|
|
13
19
|
return v.pipe(v.object({
|
|
14
|
-
tradeId: v.optional(v.bigint()),
|
|
15
20
|
orderId: v.bigint(),
|
|
16
|
-
subaccountId: v.optional(v.bigint()),
|
|
17
21
|
symbolId: v.number(),
|
|
18
22
|
side: v.number(),
|
|
19
23
|
isMaker: v.boolean(),
|
|
20
24
|
feeAsset: v.number(),
|
|
21
25
|
qtyScaled: v.bigint(),
|
|
22
26
|
priceTicks: v.bigint(),
|
|
23
|
-
|
|
27
|
+
feeAmountE18: v.optional(U128Schema),
|
|
28
|
+
referralShareAmountE18: v.optional(U128Schema),
|
|
29
|
+
feeIsRebate: v.boolean(),
|
|
24
30
|
tsNs: v.bigint(),
|
|
25
31
|
matchId: v.bigint()
|
|
26
32
|
}), v.transform((t) => {
|
|
27
33
|
const feeAsset = requiredEnumLabel(FeeAssetCodec.protoToOutput, t.feeAsset, "UserTradeSchema", "fee asset");
|
|
28
|
-
const feeScale = feeAsset === "base" ? scales.baseQty(t.symbolId) : scales.quoteAmount(t.symbolId);
|
|
29
34
|
return {
|
|
30
|
-
tradeId: t.tradeId ? formatId(t.tradeId) : void 0,
|
|
31
35
|
orderId: formatId(t.orderId),
|
|
32
|
-
subaccountId: t.subaccountId ? formatId(t.subaccountId) : void 0,
|
|
33
36
|
symbolId: t.symbolId,
|
|
34
37
|
sideLabel: requiredEnumLabel(OrderSideCodec.protoToOutput, t.side, "UserTradeSchema", "side"),
|
|
35
38
|
liquidityLabel: t.isMaker ? "maker" : "taker",
|
|
36
39
|
feeAsset,
|
|
37
40
|
qty: scaledToDecimalOutput(t.qtyScaled, scales.baseQty(t.symbolId)),
|
|
38
41
|
price: scaledToDecimalOutput(t.priceTicks, scales.price()),
|
|
39
|
-
fee: scaledToDecimalOutput(t.
|
|
42
|
+
fee: scaledToDecimalOutput(fromU128(t.feeAmountE18), 18),
|
|
43
|
+
...t.referralShareAmountE18 === void 0 ? {} : { referralShare: scaledToDecimalOutput(fromU128(t.referralShareAmountE18), 18) },
|
|
44
|
+
feeIsRebate: t.feeIsRebate,
|
|
40
45
|
tsNs: t.tsNs.toString(),
|
|
41
46
|
tsIso: tsNsToISO(t.tsNs),
|
|
42
47
|
tsMs: tsNsToMs(t.tsNs),
|
|
@@ -44,6 +49,7 @@ function createUserTradeSchema(scales) {
|
|
|
44
49
|
};
|
|
45
50
|
}));
|
|
46
51
|
}
|
|
52
|
+
/** Validates filters accepted by {@link TradesService.list}. */
|
|
47
53
|
const GetUserTradesInputSchema = v.pipe(v.strictObject({
|
|
48
54
|
...AccountScopeInputEntries,
|
|
49
55
|
symbolId: v.pipe(v.optional(v.pipe(v.string(), v.trim())), v.transform((v) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trades.schemas.js","names":[],"sources":["../../../src/services/trades/trades.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { tsNsToISO, tsNsToMs } from \"../../utils/time.js\";\nimport { SideSchema } from \"../shared.js\";\nimport { FeeAssetCodec, OrderSideCodec } from \"../orders/orders.codecs.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport { optionalUint64DecimalFilterSchema } from \"../../shared/schemas.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { TradeSideCodec } from \"./trades.codecs.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\n\nexport function createUserTradeSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n
|
|
1
|
+
{"version":3,"file":"trades.schemas.js","names":[],"sources":["../../../src/services/trades/trades.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { tsNsToISO, tsNsToMs } from \"../../utils/time.js\";\nimport { SideSchema } from \"../shared.js\";\nimport { FeeAssetCodec, OrderSideCodec } from \"../orders/orders.codecs.js\";\nimport { formatId } from \"../../utils/base58-id.js\";\nimport { optionalUint64DecimalFilterSchema } from \"../../shared/schemas.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { TradeSideCodec } from \"./trades.codecs.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { E18_SCALE, scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { fromU128 } from \"../../utils/u128.js\";\n\nconst U128Schema = v.object({\n hi: v.bigint(),\n lo: v.bigint(),\n});\n\n/** Parses a generated user-trade fill into the SDK's JSON-safe public shape. */\nexport function createUserTradeSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n orderId: v.bigint(),\n symbolId: v.number(),\n side: v.number(),\n isMaker: v.boolean(),\n feeAsset: v.number(),\n qtyScaled: v.bigint(),\n priceTicks: v.bigint(),\n feeAmountE18: v.optional(U128Schema),\n referralShareAmountE18: v.optional(U128Schema),\n feeIsRebate: v.boolean(),\n tsNs: v.bigint(),\n matchId: v.bigint(),\n }),\n v.transform((t) => {\n const feeAsset = requiredEnumLabel(\n FeeAssetCodec.protoToOutput,\n t.feeAsset,\n \"UserTradeSchema\",\n \"fee asset\",\n );\n return {\n orderId: formatId(t.orderId),\n symbolId: t.symbolId,\n sideLabel: requiredEnumLabel(\n OrderSideCodec.protoToOutput,\n t.side,\n \"UserTradeSchema\",\n \"side\",\n ),\n liquidityLabel: t.isMaker ? (\"maker\" as const) : (\"taker\" as const),\n feeAsset,\n qty: scaledToDecimalOutput(t.qtyScaled, scales.baseQty(t.symbolId)),\n price: scaledToDecimalOutput(t.priceTicks, scales.price()),\n fee: scaledToDecimalOutput(fromU128(t.feeAmountE18), E18_SCALE),\n ...(t.referralShareAmountE18 === undefined\n ? {}\n : {\n referralShare: scaledToDecimalOutput(\n fromU128(t.referralShareAmountE18),\n E18_SCALE,\n ),\n }),\n feeIsRebate: t.feeIsRebate,\n tsNs: t.tsNs.toString(),\n tsIso: tsNsToISO(t.tsNs),\n tsMs: tsNsToMs(t.tsNs),\n matchId: t.matchId.toString(),\n };\n }),\n );\n}\n\n/** A JSON-safe authenticated trade fill returned by the SDK. */\nexport type Trade = v.InferOutput<ReturnType<typeof createUserTradeSchema>>;\n\n/** Validates filters accepted by {@link TradesService.list}. */\nexport const GetUserTradesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolId: v.pipe(\n v.optional(v.pipe(v.string(), v.trim())),\n v.transform((v) => {\n if (!v) return undefined;\n const sid = Number(v);\n return Number.isFinite(sid) && sid > 0 ? sid : undefined;\n }),\n ),\n side: v.pipe(\n v.optional(SideSchema),\n v.transform((v) => (v ? TradeSideCodec.inputToProto[v] : undefined)),\n ),\n startTsNs: optionalUint64DecimalFilterSchema(\"startTsNs\"),\n endTsNs: optionalUint64DecimalFilterSchema(\"endTsNs\"),\n limit: v.optional(v.number()),\n pageToken: v.optional(v.pipe(v.string(), v.trim())),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\n/** Filters accepted by {@link TradesService.list}. */\nexport type GetUserTradesInput = v.InferInput<typeof GetUserTradesInputSchema>;\n"],"mappings":";;;;;;;;;;;;AAeA,MAAM,aAAa,EAAE,OAAO;CACxB,IAAI,EAAE,OAAO;CACb,IAAI,EAAE,OAAO;AACjB,CAAC;;AAGD,SAAgB,sBAAsB,QAAmB;CACrD,OAAO,EAAE,KACL,EAAE,OAAO;EACL,SAAS,EAAE,OAAO;EAClB,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,OAAO;EACf,SAAS,EAAE,QAAQ;EACnB,UAAU,EAAE,OAAO;EACnB,WAAW,EAAE,OAAO;EACpB,YAAY,EAAE,OAAO;EACrB,cAAc,EAAE,SAAS,UAAU;EACnC,wBAAwB,EAAE,SAAS,UAAU;EAC7C,aAAa,EAAE,QAAQ;EACvB,MAAM,EAAE,OAAO;EACf,SAAS,EAAE,OAAO;CACtB,CAAC,GACD,EAAE,WAAW,MAAM;EACf,MAAM,WAAW,kBACb,cAAc,eACd,EAAE,UACF,mBACA,WACJ;EACA,OAAO;GACH,SAAS,SAAS,EAAE,OAAO;GAC3B,UAAU,EAAE;GACZ,WAAW,kBACP,eAAe,eACf,EAAE,MACF,mBACA,MACJ;GACA,gBAAgB,EAAE,UAAW,UAAqB;GAClD;GACA,KAAK,sBAAsB,EAAE,WAAW,OAAO,QAAQ,EAAE,QAAQ,CAAC;GAClE,OAAO,sBAAsB,EAAE,YAAY,OAAO,MAAM,CAAC;GACzD,KAAK,sBAAsB,SAAS,EAAE,YAAY,GAAA,EAAY;GAC9D,GAAI,EAAE,2BAA2B,KAAA,IAC3B,CAAC,IACD,EACI,eAAe,sBACX,SAAS,EAAE,sBAAsB,GAAA,EAErC,EACJ;GACN,aAAa,EAAE;GACf,MAAM,EAAE,KAAK,SAAS;GACtB,OAAO,UAAU,EAAE,IAAI;GACvB,MAAM,SAAS,EAAE,IAAI;GACrB,SAAS,EAAE,QAAQ,SAAS;EAChC;CACJ,CAAC,CACL;AACJ;;AAMA,MAAa,2BAA2B,EAAE,KACtC,EAAE,aAAa;CACX,GAAG;CACH,UAAU,EAAE,KACR,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,CAAC,GACvC,EAAE,WAAW,MAAM;EACf,IAAI,CAAC,GAAG,OAAO,KAAA;EACf,MAAM,MAAM,OAAO,CAAC;EACpB,OAAO,OAAO,SAAS,GAAG,KAAK,MAAM,IAAI,MAAM,KAAA;CACnD,CAAC,CACL;CACA,MAAM,EAAE,KACJ,EAAE,SAAS,UAAU,GACrB,EAAE,WAAW,MAAO,IAAI,eAAe,aAAa,KAAK,KAAA,CAAU,CACvE;CACA,WAAW,kCAAkC,WAAW;CACxD,SAAS,kCAAkC,SAAS;CACpD,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;CAC5B,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,GAAG,aAAa;CACpC,GAAG;CACH,cAAc,2BAA2B,OAAO;AACpD,EAAE,CACN"}
|
|
@@ -787,7 +787,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
|
|
|
787
787
|
declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
788
788
|
readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
|
|
789
789
|
readonly symbol: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
|
|
790
|
-
readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("
|
|
790
|
+
readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
|
|
791
791
|
readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop" | undefined, TriggerType>]>;
|
|
792
792
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
|
|
793
793
|
readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
|
|
@@ -31,62 +31,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
|
|
|
31
31
|
type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
|
|
32
32
|
declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
33
33
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
34
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
34
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused">]>;
|
|
35
35
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
36
36
|
}, undefined>, v.TransformAction<{
|
|
37
37
|
triggerId: string;
|
|
38
|
-
status: "unspecified" | "
|
|
38
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
39
39
|
tsNs: bigint;
|
|
40
40
|
}, {
|
|
41
41
|
ts: number;
|
|
42
42
|
tsNs: string;
|
|
43
43
|
triggerId: string;
|
|
44
|
-
status: "unspecified" | "
|
|
44
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
45
45
|
}>]>;
|
|
46
46
|
type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
|
|
47
47
|
declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
48
48
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
49
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
49
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused">]>;
|
|
50
50
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
51
51
|
}, undefined>, v.TransformAction<{
|
|
52
52
|
triggerId: string;
|
|
53
|
-
status: "unspecified" | "
|
|
53
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
54
54
|
tsNs: bigint;
|
|
55
55
|
}, {
|
|
56
56
|
ts: number;
|
|
57
57
|
tsNs: string;
|
|
58
58
|
triggerId: string;
|
|
59
|
-
status: "unspecified" | "
|
|
59
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
60
60
|
}>]>;
|
|
61
61
|
type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
|
|
62
62
|
declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
63
63
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
64
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
64
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused">]>;
|
|
65
65
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
66
66
|
}, undefined>, v.TransformAction<{
|
|
67
67
|
triggerId: string;
|
|
68
|
-
status: "unspecified" | "
|
|
68
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
69
69
|
tsNs: bigint;
|
|
70
70
|
}, {
|
|
71
71
|
ts: number;
|
|
72
72
|
tsNs: string;
|
|
73
73
|
triggerId: string;
|
|
74
|
-
status: "unspecified" | "
|
|
74
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
75
75
|
}>]>;
|
|
76
76
|
type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
|
|
77
77
|
declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
78
78
|
readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
79
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "
|
|
79
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof TriggerStatus, undefined>, v.TransformAction<TriggerStatus, "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused">]>;
|
|
80
80
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
81
81
|
}, undefined>, v.TransformAction<{
|
|
82
82
|
triggerId: string;
|
|
83
|
-
status: "unspecified" | "
|
|
83
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
84
84
|
tsNs: bigint;
|
|
85
85
|
}, {
|
|
86
86
|
ts: number;
|
|
87
87
|
tsNs: string;
|
|
88
88
|
triggerId: string;
|
|
89
|
-
status: "unspecified" | "
|
|
89
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
90
90
|
}>]>;
|
|
91
91
|
type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
|
|
92
92
|
type StopDetailsOutput = {
|
|
@@ -507,7 +507,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
|
|
|
507
507
|
subaccountId: string;
|
|
508
508
|
symbolId: number;
|
|
509
509
|
symbol: string;
|
|
510
|
-
status: "unspecified" | "
|
|
510
|
+
status: "unspecified" | "cancelled" | "created" | "failed" | "completed" | "armed" | "running" | "paused";
|
|
511
511
|
parentOrderId: string | undefined;
|
|
512
512
|
qty: string;
|
|
513
513
|
feeAsset: "unspecified" | "quote" | "base";
|
package/package.json
CHANGED