@pear-protocol/types 2.7.0 → 2.10.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/dist/bundle.d.ts +1 -0
- package/dist/bundle.js +1 -0
- package/dist/common/address.d.ts +8 -2
- package/dist/common/trade-legs.d.ts +33 -0
- package/dist/common/trade-legs.js +12 -1
- package/dist/execution/entities.d.ts +107 -0
- package/dist/execution/entities.js +25 -2
- package/dist/execution/responses.d.ts +62 -0
- package/dist/ladder/entities.d.ts +10 -10
- package/dist/ladder/responses.d.ts +30 -30
- package/dist/position/responses.d.ts +3 -2
- package/dist/sync/payloads.d.ts +11 -0
- package/dist/sync/payloads.js +6 -2
- package/dist/sync/responses.d.ts +1 -0
- package/dist/sync/responses.js +8 -1
- package/dist/trade/payloads.d.ts +28 -74
- package/dist/trade/payloads.js +17 -21
- package/dist/trade/responses.d.ts +155 -9
- package/dist/trade/responses.js +1 -9
- package/dist/trade-accounts/payloads.d.ts +14 -13
- package/dist/trigger/common/index.d.ts +1 -1
- package/dist/trigger/entities/index.d.ts +32 -32
- package/dist/trigger/payloads/index.d.ts +6 -6
- package/dist/trigger/responses.d.ts +20 -20
- package/dist/users/entities.d.ts +5 -4
- package/dist/users/response.d.ts +2 -2
- package/dist/vaults/entities.d.ts +111 -0
- package/dist/vaults/entities.js +96 -0
- package/dist/vaults/index.d.ts +4 -0
- package/dist/vaults/index.js +4 -0
- package/dist/vaults/payloads.d.ts +140 -0
- package/dist/vaults/payloads.js +65 -0
- package/dist/vaults/queries.d.ts +96 -0
- package/dist/vaults/queries.js +66 -0
- package/dist/vaults/responses.d.ts +574 -0
- package/dist/vaults/responses.js +359 -0
- package/package.json +1 -1
|
@@ -166,14 +166,14 @@ export declare const Ladder: z.ZodObject<{
|
|
|
166
166
|
}, z.core.$strip>>;
|
|
167
167
|
}, z.core.$strip>>>;
|
|
168
168
|
bracketType: z.ZodEnum<{
|
|
169
|
+
NONE: "NONE";
|
|
169
170
|
STOP_LOSS: "STOP_LOSS";
|
|
170
171
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
171
|
-
NONE: "NONE";
|
|
172
172
|
}>;
|
|
173
173
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
174
|
+
NONE: "NONE";
|
|
174
175
|
STOP_LOSS: "STOP_LOSS";
|
|
175
176
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
176
|
-
NONE: "NONE";
|
|
177
177
|
}>>;
|
|
178
178
|
createdAt: z.ZodString;
|
|
179
179
|
updatedAt: z.ZodString;
|
|
@@ -377,14 +377,14 @@ export declare const Ladder: z.ZodObject<{
|
|
|
377
377
|
}, z.core.$strip>>;
|
|
378
378
|
}, z.core.$strip>>>;
|
|
379
379
|
bracketType: z.ZodEnum<{
|
|
380
|
+
NONE: "NONE";
|
|
380
381
|
STOP_LOSS: "STOP_LOSS";
|
|
381
382
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
382
|
-
NONE: "NONE";
|
|
383
383
|
}>;
|
|
384
384
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
385
|
+
NONE: "NONE";
|
|
385
386
|
STOP_LOSS: "STOP_LOSS";
|
|
386
387
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
387
|
-
NONE: "NONE";
|
|
388
388
|
}>>;
|
|
389
389
|
createdAt: z.ZodString;
|
|
390
390
|
updatedAt: z.ZodString;
|
|
@@ -634,14 +634,14 @@ export declare const Ladder: z.ZodObject<{
|
|
|
634
634
|
}, z.core.$strip>>;
|
|
635
635
|
}, z.core.$strip>>>;
|
|
636
636
|
bracketType: z.ZodEnum<{
|
|
637
|
+
NONE: "NONE";
|
|
637
638
|
STOP_LOSS: "STOP_LOSS";
|
|
638
639
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
639
|
-
NONE: "NONE";
|
|
640
640
|
}>;
|
|
641
641
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
642
|
+
NONE: "NONE";
|
|
642
643
|
STOP_LOSS: "STOP_LOSS";
|
|
643
644
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
644
|
-
NONE: "NONE";
|
|
645
645
|
}>>;
|
|
646
646
|
createdAt: z.ZodString;
|
|
647
647
|
updatedAt: z.ZodString;
|
|
@@ -923,14 +923,14 @@ export declare const Ladder: z.ZodObject<{
|
|
|
923
923
|
}, z.core.$strip>>;
|
|
924
924
|
}, z.core.$strip>>>;
|
|
925
925
|
bracketType: z.ZodEnum<{
|
|
926
|
+
NONE: "NONE";
|
|
926
927
|
STOP_LOSS: "STOP_LOSS";
|
|
927
928
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
928
|
-
NONE: "NONE";
|
|
929
929
|
}>;
|
|
930
930
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
931
|
+
NONE: "NONE";
|
|
931
932
|
STOP_LOSS: "STOP_LOSS";
|
|
932
933
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
933
|
-
NONE: "NONE";
|
|
934
934
|
}>>;
|
|
935
935
|
createdAt: z.ZodString;
|
|
936
936
|
updatedAt: z.ZodString;
|
|
@@ -1178,14 +1178,14 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1178
1178
|
}, z.core.$strip>>;
|
|
1179
1179
|
}, z.core.$strip>>>;
|
|
1180
1180
|
bracketType: z.ZodEnum<{
|
|
1181
|
+
NONE: "NONE";
|
|
1181
1182
|
STOP_LOSS: "STOP_LOSS";
|
|
1182
1183
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1183
|
-
NONE: "NONE";
|
|
1184
1184
|
}>;
|
|
1185
1185
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1186
|
+
NONE: "NONE";
|
|
1186
1187
|
STOP_LOSS: "STOP_LOSS";
|
|
1187
1188
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1188
|
-
NONE: "NONE";
|
|
1189
1189
|
}>>;
|
|
1190
1190
|
createdAt: z.ZodString;
|
|
1191
1191
|
updatedAt: z.ZodString;
|
|
@@ -161,14 +161,14 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
161
161
|
}, z.core.$strip>>;
|
|
162
162
|
}, z.core.$strip>>>;
|
|
163
163
|
bracketType: z.ZodEnum<{
|
|
164
|
+
NONE: "NONE";
|
|
164
165
|
STOP_LOSS: "STOP_LOSS";
|
|
165
166
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
166
|
-
NONE: "NONE";
|
|
167
167
|
}>;
|
|
168
168
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
169
|
+
NONE: "NONE";
|
|
169
170
|
STOP_LOSS: "STOP_LOSS";
|
|
170
171
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
171
|
-
NONE: "NONE";
|
|
172
172
|
}>>;
|
|
173
173
|
createdAt: z.ZodString;
|
|
174
174
|
updatedAt: z.ZodString;
|
|
@@ -372,14 +372,14 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
372
372
|
}, z.core.$strip>>;
|
|
373
373
|
}, z.core.$strip>>>;
|
|
374
374
|
bracketType: z.ZodEnum<{
|
|
375
|
+
NONE: "NONE";
|
|
375
376
|
STOP_LOSS: "STOP_LOSS";
|
|
376
377
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
377
|
-
NONE: "NONE";
|
|
378
378
|
}>;
|
|
379
379
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
380
|
+
NONE: "NONE";
|
|
380
381
|
STOP_LOSS: "STOP_LOSS";
|
|
381
382
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
382
|
-
NONE: "NONE";
|
|
383
383
|
}>>;
|
|
384
384
|
createdAt: z.ZodString;
|
|
385
385
|
updatedAt: z.ZodString;
|
|
@@ -629,14 +629,14 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
629
629
|
}, z.core.$strip>>;
|
|
630
630
|
}, z.core.$strip>>>;
|
|
631
631
|
bracketType: z.ZodEnum<{
|
|
632
|
+
NONE: "NONE";
|
|
632
633
|
STOP_LOSS: "STOP_LOSS";
|
|
633
634
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
634
|
-
NONE: "NONE";
|
|
635
635
|
}>;
|
|
636
636
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
637
|
+
NONE: "NONE";
|
|
637
638
|
STOP_LOSS: "STOP_LOSS";
|
|
638
639
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
639
|
-
NONE: "NONE";
|
|
640
640
|
}>>;
|
|
641
641
|
createdAt: z.ZodString;
|
|
642
642
|
updatedAt: z.ZodString;
|
|
@@ -918,14 +918,14 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
918
918
|
}, z.core.$strip>>;
|
|
919
919
|
}, z.core.$strip>>>;
|
|
920
920
|
bracketType: z.ZodEnum<{
|
|
921
|
+
NONE: "NONE";
|
|
921
922
|
STOP_LOSS: "STOP_LOSS";
|
|
922
923
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
923
|
-
NONE: "NONE";
|
|
924
924
|
}>;
|
|
925
925
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
926
|
+
NONE: "NONE";
|
|
926
927
|
STOP_LOSS: "STOP_LOSS";
|
|
927
928
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
928
|
-
NONE: "NONE";
|
|
929
929
|
}>>;
|
|
930
930
|
createdAt: z.ZodString;
|
|
931
931
|
updatedAt: z.ZodString;
|
|
@@ -1173,14 +1173,14 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
1173
1173
|
}, z.core.$strip>>;
|
|
1174
1174
|
}, z.core.$strip>>>;
|
|
1175
1175
|
bracketType: z.ZodEnum<{
|
|
1176
|
+
NONE: "NONE";
|
|
1176
1177
|
STOP_LOSS: "STOP_LOSS";
|
|
1177
1178
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1178
|
-
NONE: "NONE";
|
|
1179
1179
|
}>;
|
|
1180
1180
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1181
|
+
NONE: "NONE";
|
|
1181
1182
|
STOP_LOSS: "STOP_LOSS";
|
|
1182
1183
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1183
|
-
NONE: "NONE";
|
|
1184
1184
|
}>>;
|
|
1185
1185
|
createdAt: z.ZodString;
|
|
1186
1186
|
updatedAt: z.ZodString;
|
|
@@ -1570,14 +1570,14 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
1570
1570
|
}, z.core.$strip>>;
|
|
1571
1571
|
}, z.core.$strip>>>;
|
|
1572
1572
|
bracketType: z.ZodEnum<{
|
|
1573
|
+
NONE: "NONE";
|
|
1573
1574
|
STOP_LOSS: "STOP_LOSS";
|
|
1574
1575
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1575
|
-
NONE: "NONE";
|
|
1576
1576
|
}>;
|
|
1577
1577
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1578
|
+
NONE: "NONE";
|
|
1578
1579
|
STOP_LOSS: "STOP_LOSS";
|
|
1579
1580
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1580
|
-
NONE: "NONE";
|
|
1581
1581
|
}>>;
|
|
1582
1582
|
createdAt: z.ZodString;
|
|
1583
1583
|
updatedAt: z.ZodString;
|
|
@@ -1781,14 +1781,14 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
1781
1781
|
}, z.core.$strip>>;
|
|
1782
1782
|
}, z.core.$strip>>>;
|
|
1783
1783
|
bracketType: z.ZodEnum<{
|
|
1784
|
+
NONE: "NONE";
|
|
1784
1785
|
STOP_LOSS: "STOP_LOSS";
|
|
1785
1786
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1786
|
-
NONE: "NONE";
|
|
1787
1787
|
}>;
|
|
1788
1788
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1789
|
+
NONE: "NONE";
|
|
1789
1790
|
STOP_LOSS: "STOP_LOSS";
|
|
1790
1791
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1791
|
-
NONE: "NONE";
|
|
1792
1792
|
}>>;
|
|
1793
1793
|
createdAt: z.ZodString;
|
|
1794
1794
|
updatedAt: z.ZodString;
|
|
@@ -2038,14 +2038,14 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
2038
2038
|
}, z.core.$strip>>;
|
|
2039
2039
|
}, z.core.$strip>>>;
|
|
2040
2040
|
bracketType: z.ZodEnum<{
|
|
2041
|
+
NONE: "NONE";
|
|
2041
2042
|
STOP_LOSS: "STOP_LOSS";
|
|
2042
2043
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2043
|
-
NONE: "NONE";
|
|
2044
2044
|
}>;
|
|
2045
2045
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
2046
|
+
NONE: "NONE";
|
|
2046
2047
|
STOP_LOSS: "STOP_LOSS";
|
|
2047
2048
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2048
|
-
NONE: "NONE";
|
|
2049
2049
|
}>>;
|
|
2050
2050
|
createdAt: z.ZodString;
|
|
2051
2051
|
updatedAt: z.ZodString;
|
|
@@ -2327,14 +2327,14 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
2327
2327
|
}, z.core.$strip>>;
|
|
2328
2328
|
}, z.core.$strip>>>;
|
|
2329
2329
|
bracketType: z.ZodEnum<{
|
|
2330
|
+
NONE: "NONE";
|
|
2330
2331
|
STOP_LOSS: "STOP_LOSS";
|
|
2331
2332
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2332
|
-
NONE: "NONE";
|
|
2333
2333
|
}>;
|
|
2334
2334
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
2335
|
+
NONE: "NONE";
|
|
2335
2336
|
STOP_LOSS: "STOP_LOSS";
|
|
2336
2337
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2337
|
-
NONE: "NONE";
|
|
2338
2338
|
}>>;
|
|
2339
2339
|
createdAt: z.ZodString;
|
|
2340
2340
|
updatedAt: z.ZodString;
|
|
@@ -2582,14 +2582,14 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
2582
2582
|
}, z.core.$strip>>;
|
|
2583
2583
|
}, z.core.$strip>>>;
|
|
2584
2584
|
bracketType: z.ZodEnum<{
|
|
2585
|
+
NONE: "NONE";
|
|
2585
2586
|
STOP_LOSS: "STOP_LOSS";
|
|
2586
2587
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2587
|
-
NONE: "NONE";
|
|
2588
2588
|
}>;
|
|
2589
2589
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
2590
|
+
NONE: "NONE";
|
|
2590
2591
|
STOP_LOSS: "STOP_LOSS";
|
|
2591
2592
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2592
|
-
NONE: "NONE";
|
|
2593
2593
|
}>>;
|
|
2594
2594
|
createdAt: z.ZodString;
|
|
2595
2595
|
updatedAt: z.ZodString;
|
|
@@ -2981,14 +2981,14 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
2981
2981
|
}, z.core.$strip>>;
|
|
2982
2982
|
}, z.core.$strip>>>;
|
|
2983
2983
|
bracketType: z.ZodEnum<{
|
|
2984
|
+
NONE: "NONE";
|
|
2984
2985
|
STOP_LOSS: "STOP_LOSS";
|
|
2985
2986
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2986
|
-
NONE: "NONE";
|
|
2987
2987
|
}>;
|
|
2988
2988
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
2989
|
+
NONE: "NONE";
|
|
2989
2990
|
STOP_LOSS: "STOP_LOSS";
|
|
2990
2991
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2991
|
-
NONE: "NONE";
|
|
2992
2992
|
}>>;
|
|
2993
2993
|
createdAt: z.ZodString;
|
|
2994
2994
|
updatedAt: z.ZodString;
|
|
@@ -3192,14 +3192,14 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
3192
3192
|
}, z.core.$strip>>;
|
|
3193
3193
|
}, z.core.$strip>>>;
|
|
3194
3194
|
bracketType: z.ZodEnum<{
|
|
3195
|
+
NONE: "NONE";
|
|
3195
3196
|
STOP_LOSS: "STOP_LOSS";
|
|
3196
3197
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3197
|
-
NONE: "NONE";
|
|
3198
3198
|
}>;
|
|
3199
3199
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
3200
|
+
NONE: "NONE";
|
|
3200
3201
|
STOP_LOSS: "STOP_LOSS";
|
|
3201
3202
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3202
|
-
NONE: "NONE";
|
|
3203
3203
|
}>>;
|
|
3204
3204
|
createdAt: z.ZodString;
|
|
3205
3205
|
updatedAt: z.ZodString;
|
|
@@ -3449,14 +3449,14 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
3449
3449
|
}, z.core.$strip>>;
|
|
3450
3450
|
}, z.core.$strip>>>;
|
|
3451
3451
|
bracketType: z.ZodEnum<{
|
|
3452
|
+
NONE: "NONE";
|
|
3452
3453
|
STOP_LOSS: "STOP_LOSS";
|
|
3453
3454
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3454
|
-
NONE: "NONE";
|
|
3455
3455
|
}>;
|
|
3456
3456
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
3457
|
+
NONE: "NONE";
|
|
3457
3458
|
STOP_LOSS: "STOP_LOSS";
|
|
3458
3459
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3459
|
-
NONE: "NONE";
|
|
3460
3460
|
}>>;
|
|
3461
3461
|
createdAt: z.ZodString;
|
|
3462
3462
|
updatedAt: z.ZodString;
|
|
@@ -3738,14 +3738,14 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
3738
3738
|
}, z.core.$strip>>;
|
|
3739
3739
|
}, z.core.$strip>>>;
|
|
3740
3740
|
bracketType: z.ZodEnum<{
|
|
3741
|
+
NONE: "NONE";
|
|
3741
3742
|
STOP_LOSS: "STOP_LOSS";
|
|
3742
3743
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3743
|
-
NONE: "NONE";
|
|
3744
3744
|
}>;
|
|
3745
3745
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
3746
|
+
NONE: "NONE";
|
|
3746
3747
|
STOP_LOSS: "STOP_LOSS";
|
|
3747
3748
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3748
|
-
NONE: "NONE";
|
|
3749
3749
|
}>>;
|
|
3750
3750
|
createdAt: z.ZodString;
|
|
3751
3751
|
updatedAt: z.ZodString;
|
|
@@ -3993,14 +3993,14 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
3993
3993
|
}, z.core.$strip>>;
|
|
3994
3994
|
}, z.core.$strip>>>;
|
|
3995
3995
|
bracketType: z.ZodEnum<{
|
|
3996
|
+
NONE: "NONE";
|
|
3996
3997
|
STOP_LOSS: "STOP_LOSS";
|
|
3997
3998
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
3998
|
-
NONE: "NONE";
|
|
3999
3999
|
}>;
|
|
4000
4000
|
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
4001
|
+
NONE: "NONE";
|
|
4001
4002
|
STOP_LOSS: "STOP_LOSS";
|
|
4002
4003
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
4003
|
-
NONE: "NONE";
|
|
4004
4004
|
}>>;
|
|
4005
4005
|
createdAt: z.ZodString;
|
|
4006
4006
|
updatedAt: z.ZodString;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { EthereumAddress } from '../common/address';
|
|
2
3
|
export declare const PositionListResponse: z.ZodObject<{
|
|
3
4
|
limit: z.ZodNumber;
|
|
4
5
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
@@ -305,7 +306,7 @@ export type OpenPositionListResponse = z.output<typeof OpenPositionListResponse>
|
|
|
305
306
|
export declare const VaultOpenPositionListResponse: z.ZodObject<{
|
|
306
307
|
limit: z.ZodNumber;
|
|
307
308
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
308
|
-
vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform
|
|
309
|
+
vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
309
310
|
positions: z.ZodArray<z.ZodObject<{
|
|
310
311
|
status: z.ZodLiteral<"OPEN">;
|
|
311
312
|
connector: z.ZodEnum<{
|
|
@@ -351,7 +352,7 @@ export type VaultOpenPositionListResponse = z.output<typeof VaultOpenPositionLis
|
|
|
351
352
|
export declare const VaultClosedPositionListResponse: z.ZodObject<{
|
|
352
353
|
limit: z.ZodNumber;
|
|
353
354
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
354
|
-
vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform
|
|
355
|
+
vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
355
356
|
positions: z.ZodArray<z.ZodObject<{
|
|
356
357
|
status: z.ZodLiteral<"CLOSED">;
|
|
357
358
|
connector: z.ZodEnum<{
|
package/dist/sync/payloads.d.ts
CHANGED
|
@@ -359,8 +359,18 @@ export declare const CreateApplicablesMeta: z.ZodObject<{
|
|
|
359
359
|
externalMaxTs: z.ZodNullable<z.ZodNumber>;
|
|
360
360
|
firstSyncStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
361
361
|
newestFillTs: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
executionsUpdatedAtEpochMs: z.ZodNumber;
|
|
362
363
|
}, z.core.$strip>;
|
|
363
364
|
export type CreateApplicablesMeta = z.output<typeof CreateApplicablesMeta>;
|
|
365
|
+
/**
|
|
366
|
+
* Plain multipart fields posted beside the gzipped create payload on the bulk route.
|
|
367
|
+
* Core forwards the gzip unread, so any meta its own admission gates need must travel
|
|
368
|
+
* outside it; multipart fields arrive as strings.
|
|
369
|
+
*/
|
|
370
|
+
export declare const CreateApplicablesBulkFields: z.ZodObject<{
|
|
371
|
+
executionsUpdatedAtEpochMs: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
export type CreateApplicablesBulkFields = z.output<typeof CreateApplicablesBulkFields>;
|
|
364
374
|
/**
|
|
365
375
|
* POST /sync/create request — the discover+apply phase of the cycle.
|
|
366
376
|
* - applicables: baskets keyed by positionKey, find-or-created during apply.
|
|
@@ -442,6 +452,7 @@ export declare const CreateApplicablesRequest: z.ZodObject<{
|
|
|
442
452
|
externalMaxTs: z.ZodNullable<z.ZodNumber>;
|
|
443
453
|
firstSyncStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
444
454
|
newestFillTs: z.ZodOptional<z.ZodNumber>;
|
|
455
|
+
executionsUpdatedAtEpochMs: z.ZodNumber;
|
|
445
456
|
}, z.core.$strip>;
|
|
446
457
|
}, z.core.$strip>;
|
|
447
458
|
export type CreateApplicablesRequest = z.output<typeof CreateApplicablesRequest>;
|
package/dist/sync/payloads.js
CHANGED
|
@@ -114,7 +114,11 @@ const SyncMeta = z.object({
|
|
|
114
114
|
});
|
|
115
115
|
const CreateApplicablesMeta = SyncMeta.extend({
|
|
116
116
|
firstSyncStartedAt: z.number().int().nonnegative().optional().describe("backend-issued timestamp returned before the first fill-history fetch"),
|
|
117
|
-
newestFillTs: z.number().int().nonnegative().refine((timestamp) => timestamp <= Date.now() + WATERMARK_FUTURE_SKEW_MS, "newestFillTs must not be ahead of server time").optional().describe("raw newest fetched fill \u2014 settle-gate source, never trim-advanced")
|
|
117
|
+
newestFillTs: z.number().int().nonnegative().refine((timestamp) => timestamp <= Date.now() + WATERMARK_FUTURE_SKEW_MS, "newestFillTs must not be ahead of server time").optional().describe("raw newest fetched fill \u2014 settle-gate source, never trim-advanced"),
|
|
118
|
+
executionsUpdatedAtEpochMs: z.number().int().nonnegative().describe("verbatim echo of fills/since executionsUpdatedAtEpochMs \u2014 stale-read gate token, not a client clock")
|
|
119
|
+
});
|
|
120
|
+
const CreateApplicablesBulkFields = z.object({
|
|
121
|
+
executionsUpdatedAtEpochMs: z.string().regex(/^\d+$/, "Must be a non-negative integer millisecond value").transform(Number).describe("mirror of meta.executionsUpdatedAtEpochMs, readable without decompressing the payload")
|
|
118
122
|
});
|
|
119
123
|
const CreateApplicablesRequest = z.object({
|
|
120
124
|
applicables: z.array(ApplicablePosition),
|
|
@@ -135,4 +139,4 @@ const CreateFundingPaymentsRequest = z.object({
|
|
|
135
139
|
meta: SyncMeta
|
|
136
140
|
});
|
|
137
141
|
|
|
138
|
-
export { ApplicableFill, ApplicableMetadata, ApplicablePosition, ConfirmFillsRequest, ConfirmableExternalFill, CreateApplicablesMeta, CreateApplicablesRequest, CreateFundingPaymentsRequest, ExternalPosition, FundingPaymentEntry, ReconcileFillsRequest, ReconcileReplacementExternalFill, SyncFillsSinceRequest, SyncFundingSinceRequest, SyncMeta, UnknownExternalFill, WATERMARK_FUTURE_SKEW_MS };
|
|
142
|
+
export { ApplicableFill, ApplicableMetadata, ApplicablePosition, ConfirmFillsRequest, ConfirmableExternalFill, CreateApplicablesBulkFields, CreateApplicablesMeta, CreateApplicablesRequest, CreateFundingPaymentsRequest, ExternalPosition, FundingPaymentEntry, ReconcileFillsRequest, ReconcileReplacementExternalFill, SyncFillsSinceRequest, SyncFundingSinceRequest, SyncMeta, UnknownExternalFill, WATERMARK_FUTURE_SKEW_MS };
|
package/dist/sync/responses.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const SyncFillsSinceResponse: z.ZodObject<{
|
|
|
5
5
|
neverSynced: z.ZodBoolean;
|
|
6
6
|
firstSyncStartedAt: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
confirmedExchangeFillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
+
executionsUpdatedAtEpochMs: z.ZodNumber;
|
|
8
9
|
}, z.core.$strip>;
|
|
9
10
|
export declare const SyncFundingSinceResponse: z.ZodObject<{
|
|
10
11
|
sinceMs: z.ZodNumber;
|
package/dist/sync/responses.js
CHANGED
|
@@ -10,7 +10,14 @@ const SyncFillsSinceResponse = z.object({
|
|
|
10
10
|
// Backend-clock boundary returned only for a never-synced account. The syncer carries this
|
|
11
11
|
// through when an empty exchange fetch provides no fill-derived checkpoint.
|
|
12
12
|
firstSyncStartedAt: z.number().int().nonnegative().optional(),
|
|
13
|
-
confirmedExchangeFillIds: z.array(z.string()).optional()
|
|
13
|
+
confirmedExchangeFillIds: z.array(z.string()).optional(),
|
|
14
|
+
// Newest executions.updatedAt this response can have observed, as epoch ms ceiled to the next
|
|
15
|
+
// whole millisecond (the column keeps microseconds); 0 when the account has no executions. The
|
|
16
|
+
// client echoes it verbatim in the create meta — core defers the create when any execution
|
|
17
|
+
// write postdates it. No client clock on the wire: ordering is against our own persisted
|
|
18
|
+
// updated_at values (Postgres now() on insert, the engine's clock on updates — the settle
|
|
19
|
+
// gate covers skew between those writers).
|
|
20
|
+
executionsUpdatedAtEpochMs: z.number().int().nonnegative()
|
|
14
21
|
});
|
|
15
22
|
const SyncFundingSinceResponse = z.object({
|
|
16
23
|
sinceMs: z.number().int().nonnegative()
|
package/dist/trade/payloads.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const BOUNDED_MARKET_MAX_TTL_MS = 10000;
|
|
3
2
|
export declare const CreateMarketOpen: z.ZodObject<{
|
|
4
3
|
type: z.ZodLiteral<"MARKET">;
|
|
5
4
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
@@ -14,7 +13,9 @@ export declare const CreateMarketOpen: z.ZodObject<{
|
|
|
14
13
|
USD: "USD";
|
|
15
14
|
}>;
|
|
16
15
|
amount: z.ZodString;
|
|
17
|
-
|
|
16
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
17
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>], z.ZodObject<{
|
|
18
19
|
symbol: z.ZodString;
|
|
19
20
|
id: z.ZodOptional<z.ZodString>;
|
|
20
21
|
side: z.ZodEnum<{
|
|
@@ -26,7 +27,10 @@ export declare const CreateMarketOpen: z.ZodObject<{
|
|
|
26
27
|
USD: "USD";
|
|
27
28
|
}>;
|
|
28
29
|
amount: z.ZodString;
|
|
29
|
-
|
|
30
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
31
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
30
34
|
trigger: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
31
35
|
intent: z.ZodLiteral<"CLOSE">;
|
|
32
36
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -101,39 +105,6 @@ export declare const CreateMarketOpen: z.ZodObject<{
|
|
|
101
105
|
}, z.core.$strip>]>>;
|
|
102
106
|
clientId: z.ZodOptional<z.ZodString>;
|
|
103
107
|
}, z.core.$strip>;
|
|
104
|
-
/** Explicit price protection: legacy gateways reject this request type instead of stripping limits. */
|
|
105
|
-
export declare const CreateBoundedMarketOpen: z.ZodObject<{
|
|
106
|
-
type: z.ZodLiteral<"BOUNDED_MARKET">;
|
|
107
|
-
expiresAt: z.ZodNumber;
|
|
108
|
-
legs: z.ZodTuple<[z.ZodObject<{
|
|
109
|
-
symbol: z.ZodString;
|
|
110
|
-
id: z.ZodOptional<z.ZodString>;
|
|
111
|
-
side: z.ZodEnum<{
|
|
112
|
-
BUY: "BUY";
|
|
113
|
-
SELL: "SELL";
|
|
114
|
-
}>;
|
|
115
|
-
mode: z.ZodEnum<{
|
|
116
|
-
QUANTITY: "QUANTITY";
|
|
117
|
-
USD: "USD";
|
|
118
|
-
}>;
|
|
119
|
-
amount: z.ZodString;
|
|
120
|
-
limitPrice: z.ZodString;
|
|
121
|
-
}, z.core.$strip>], z.ZodObject<{
|
|
122
|
-
symbol: z.ZodString;
|
|
123
|
-
id: z.ZodOptional<z.ZodString>;
|
|
124
|
-
side: z.ZodEnum<{
|
|
125
|
-
BUY: "BUY";
|
|
126
|
-
SELL: "SELL";
|
|
127
|
-
}>;
|
|
128
|
-
mode: z.ZodEnum<{
|
|
129
|
-
QUANTITY: "QUANTITY";
|
|
130
|
-
USD: "USD";
|
|
131
|
-
}>;
|
|
132
|
-
amount: z.ZodString;
|
|
133
|
-
limitPrice: z.ZodString;
|
|
134
|
-
}, z.core.$strip>>;
|
|
135
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
136
|
-
}, z.core.$strip>;
|
|
137
108
|
export declare const CreateMarketAdjust: z.ZodObject<{
|
|
138
109
|
type: z.ZodLiteral<"MARKET">;
|
|
139
110
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
@@ -149,7 +120,9 @@ export declare const CreateMarketAdjust: z.ZodObject<{
|
|
|
149
120
|
}>;
|
|
150
121
|
amount: z.ZodString;
|
|
151
122
|
reduceOnly: z.ZodBoolean;
|
|
152
|
-
|
|
123
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
124
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strict>], z.ZodObject<{
|
|
153
126
|
id: z.ZodOptional<z.ZodString>;
|
|
154
127
|
symbol: z.ZodString;
|
|
155
128
|
side: z.ZodEnum<{
|
|
@@ -162,7 +135,10 @@ export declare const CreateMarketAdjust: z.ZodObject<{
|
|
|
162
135
|
}>;
|
|
163
136
|
amount: z.ZodString;
|
|
164
137
|
reduceOnly: z.ZodBoolean;
|
|
165
|
-
|
|
138
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
139
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
166
142
|
clientId: z.ZodOptional<z.ZodString>;
|
|
167
143
|
}, z.core.$strip>;
|
|
168
144
|
export declare const CreateMarketClose: z.ZodObject<{
|
|
@@ -191,7 +167,9 @@ export declare const CreateTradeOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
191
167
|
USD: "USD";
|
|
192
168
|
}>;
|
|
193
169
|
amount: z.ZodString;
|
|
194
|
-
|
|
170
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
171
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$strict>], z.ZodObject<{
|
|
195
173
|
symbol: z.ZodString;
|
|
196
174
|
id: z.ZodOptional<z.ZodString>;
|
|
197
175
|
side: z.ZodEnum<{
|
|
@@ -203,7 +181,10 @@ export declare const CreateTradeOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
203
181
|
USD: "USD";
|
|
204
182
|
}>;
|
|
205
183
|
amount: z.ZodString;
|
|
206
|
-
|
|
184
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
185
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
186
|
+
}, z.core.$strict>>;
|
|
187
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
207
188
|
trigger: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
208
189
|
intent: z.ZodLiteral<"CLOSE">;
|
|
209
190
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -277,37 +258,6 @@ export declare const CreateTradeOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
277
258
|
}, z.core.$strip>;
|
|
278
259
|
}, z.core.$strip>]>>;
|
|
279
260
|
clientId: z.ZodOptional<z.ZodString>;
|
|
280
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
281
|
-
type: z.ZodLiteral<"BOUNDED_MARKET">;
|
|
282
|
-
expiresAt: z.ZodNumber;
|
|
283
|
-
legs: z.ZodTuple<[z.ZodObject<{
|
|
284
|
-
symbol: z.ZodString;
|
|
285
|
-
id: z.ZodOptional<z.ZodString>;
|
|
286
|
-
side: z.ZodEnum<{
|
|
287
|
-
BUY: "BUY";
|
|
288
|
-
SELL: "SELL";
|
|
289
|
-
}>;
|
|
290
|
-
mode: z.ZodEnum<{
|
|
291
|
-
QUANTITY: "QUANTITY";
|
|
292
|
-
USD: "USD";
|
|
293
|
-
}>;
|
|
294
|
-
amount: z.ZodString;
|
|
295
|
-
limitPrice: z.ZodString;
|
|
296
|
-
}, z.core.$strip>], z.ZodObject<{
|
|
297
|
-
symbol: z.ZodString;
|
|
298
|
-
id: z.ZodOptional<z.ZodString>;
|
|
299
|
-
side: z.ZodEnum<{
|
|
300
|
-
BUY: "BUY";
|
|
301
|
-
SELL: "SELL";
|
|
302
|
-
}>;
|
|
303
|
-
mode: z.ZodEnum<{
|
|
304
|
-
QUANTITY: "QUANTITY";
|
|
305
|
-
USD: "USD";
|
|
306
|
-
}>;
|
|
307
|
-
amount: z.ZodString;
|
|
308
|
-
limitPrice: z.ZodString;
|
|
309
|
-
}, z.core.$strip>>;
|
|
310
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
311
261
|
}, z.core.$strip>], "type">;
|
|
312
262
|
export declare const CreateTradeAdjust: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
313
263
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -324,7 +274,9 @@ export declare const CreateTradeAdjust: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
324
274
|
}>;
|
|
325
275
|
amount: z.ZodString;
|
|
326
276
|
reduceOnly: z.ZodBoolean;
|
|
327
|
-
|
|
277
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
278
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strict>], z.ZodObject<{
|
|
328
280
|
id: z.ZodOptional<z.ZodString>;
|
|
329
281
|
symbol: z.ZodString;
|
|
330
282
|
side: z.ZodEnum<{
|
|
@@ -337,7 +289,10 @@ export declare const CreateTradeAdjust: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
337
289
|
}>;
|
|
338
290
|
amount: z.ZodString;
|
|
339
291
|
reduceOnly: z.ZodBoolean;
|
|
340
|
-
|
|
292
|
+
limitPrice: z.ZodOptional<z.ZodNever>;
|
|
293
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.core.$strict>>;
|
|
295
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
341
296
|
clientId: z.ZodOptional<z.ZodString>;
|
|
342
297
|
}, z.core.$strip>], "type">;
|
|
343
298
|
export declare const CreateTradeClose: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -353,7 +308,6 @@ export declare const CreateTradeCloseAll: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
353
308
|
clientId: z.ZodOptional<z.ZodString>;
|
|
354
309
|
}, z.core.$strip>], "type">;
|
|
355
310
|
export type CreateMarketOpen = z.output<typeof CreateMarketOpen>;
|
|
356
|
-
export type CreateBoundedMarketOpen = z.output<typeof CreateBoundedMarketOpen>;
|
|
357
311
|
export type CreateMarketAdjust = z.output<typeof CreateMarketAdjust>;
|
|
358
312
|
export type CreateMarketClose = z.output<typeof CreateMarketClose>;
|
|
359
313
|
export type CreateMarketReverse = z.output<typeof CreateMarketReverse>;
|