@kuest/bindings 0.0.0-stage → 0.13.1
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/LICENSE +21 -0
- package/README.md +4 -2
- package/dist/chunk-2KNK5TP7.js +2 -0
- package/dist/chunk-2KNK5TP7.js.map +1 -0
- package/dist/chunk-53SZ2ZWR.js +2 -0
- package/dist/chunk-53SZ2ZWR.js.map +1 -0
- package/dist/chunk-HOD4LKZU.js +2 -0
- package/dist/chunk-HOD4LKZU.js.map +1 -0
- package/dist/chunk-XSRN2HAT.js +2 -0
- package/dist/chunk-XSRN2HAT.js.map +1 -0
- package/dist/clob/index.d.ts +5390 -0
- package/dist/clob/index.js +2 -0
- package/dist/clob/index.js.map +1 -0
- package/dist/combos/index.d.ts +1126 -0
- package/dist/combos/index.js +2 -0
- package/dist/combos/index.js.map +1 -0
- package/dist/comment-CSYM3bRy.d.ts +945 -0
- package/dist/data/index.d.ts +4863 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/gamma/index.d.ts +10129 -0
- package/dist/gamma/index.js +2 -0
- package/dist/gamma/index.js.map +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/orders-MU1eB8o-.d.ts +2929 -0
- package/dist/perps/index.d.ts +2884 -0
- package/dist/perps/index.js +2 -0
- package/dist/perps/index.js.map +1 -0
- package/dist/relayer/index.d.ts +227 -0
- package/dist/relayer/index.js +2 -0
- package/dist/relayer/index.js.map +1 -0
- package/dist/shared-Dm807IWG.d.ts +223 -0
- package/dist/signature-type-CrLAA9AN.d.ts +23 -0
- package/dist/subscriptions/index.d.ts +7963 -0
- package/dist/subscriptions/index.js +2 -0
- package/dist/subscriptions/index.js.map +1 -0
- package/package.json +92 -3
|
@@ -0,0 +1,2884 @@
|
|
|
1
|
+
import * as _kuest_types from '@kuest/types';
|
|
2
|
+
import { P as PerpsInstrumentId, a as PerpsEntityId, b as PerpsFundingPaymentId, c as PerpsDepositStatus, d as PerpsInternalTransferId, e as PerpsKnownInternalTransferType, f as PerpsInternalTransferDirection, g as PerpsWithdrawalId, h as PerpsKnownWithdrawalStatus, i as PerpsInstrumentType, j as PerpsInstrumentCategory, k as PerpsTradeId, l as PerpsSide, m as PerpsClientOrderId, n as PerpsOrderId } from '../orders-MU1eB8o-.js';
|
|
3
|
+
export { C as CreatePerpsChaseResponseSchema, F as FetchPerpsBuilderApprovalsResponseSchema, o as FetchPerpsChasesResponseSchema, p as FetchPerpsOpenOrdersResponseSchema, q as FetchPerpsOrdersResponseSchema, r as FetchPerpsUnreadNotificationsCountResponseSchema, L as ListPerpsBuilderEarningsResponseSchema, s as ListPerpsFillsResponseSchema, t as ListPerpsNotificationsResponseSchema, M as MarkPerpsNotificationsReadResponseSchema, u as PerpsAccountFill, v as PerpsAccountFillSchema, w as PerpsAccountFillUpdateSchema, x as PerpsAssetSchema, y as PerpsBuilderApproval, z as PerpsBuilderApprovalSchema, A as PerpsBuilderEarning, B as PerpsBuilderEarningId, D as PerpsBuilderEarningIdSchema, E as PerpsBuilderEarningSchema, G as PerpsBuilderEarningsAsset, H as PerpsBuilderEarningsAssetSchema, I as PerpsBuilderEarningsSnapshot, J as PerpsBuilderEarningsSnapshotSchema, K as PerpsBuilderEarningsSummary, N as PerpsBuilderEarningsSummarySchema, O as PerpsBuilderStatus, Q as PerpsBuilderStatusSchema, R as PerpsBuilderTerms, S as PerpsBuilderTermsSchema, T as PerpsCancelAllOrdersResponse, U as PerpsCancelAllOrdersResponseSchema, V as PerpsCancelOrderErrorCode, W as PerpsCancelOrderErrorCodeSchema, X as PerpsCancelOrderResult, Y as PerpsCancelOrderResultSchema, Z as PerpsChase, _ as PerpsChaseAccepted, $ as PerpsChaseAcceptedSchema, a0 as PerpsChaseId, a1 as PerpsChaseIdSchema, a2 as PerpsChaseSchema, a3 as PerpsClientOrderIdSchema, a4 as PerpsCommandAck, a5 as PerpsCommandAckSchema, a6 as PerpsCommandStatusSchema, a7 as PerpsCredentials, a8 as PerpsDataResponseSchema, a9 as PerpsDecimal, aa as PerpsDecimalInput, ab as PerpsDecimalInputSchema, ac as PerpsDepositAmount, ad as PerpsDepositStatusSchema, ae as PerpsEntityIdSchema, af as PerpsFundingInterval, ag as PerpsFundingIntervalSchema, ah as PerpsFundingPaymentIdSchema, ai as PerpsInstrumentCategorySchema, aj as PerpsInstrumentIdSchema, ak as PerpsInstrumentTypeSchema, al as PerpsInternalTransferDirectionSchema, am as PerpsInternalTransferIdSchema, an as PerpsInternalTransferType, ao as PerpsInternalTransferTypeSchema, ap as PerpsKlineInterval, aq as PerpsKlineIntervalSchema, ar as PerpsKnownCancelOrderErrorCode, as as PerpsLimitOrderCanceledNotification, at as PerpsLimitOrderCanceledNotificationSchema, au as PerpsLiquidationDetails, av as PerpsLiquidationDetailsSchema, aw as PerpsLiquidationMethod, ax as PerpsLiquidationWarningNotification, ay as PerpsLiquidationWarningNotificationSchema, az as PerpsLiquidityRole, aA as PerpsMarginType, aB as PerpsMarginTypeSchema, aC as PerpsNotification, aD as PerpsNotificationEntry, aE as PerpsNotificationEntrySchema, aF as PerpsNotificationId, aG as PerpsNotificationIdSchema, aH as PerpsNotificationOrderType, aI as PerpsNotificationOrderTypeSchema, aJ as PerpsNotificationSchema, aK as PerpsNotificationType, aL as PerpsNotificationTypeSchema, aM as PerpsOrder, aN as PerpsOrderIdSchema, aO as PerpsOrderSchema, aP as PerpsOrderStatus, aQ as PerpsOrderStatusSchema, aR as PerpsOrderUpdateSchema, aS as PerpsPnlInterval, aT as PerpsPnlIntervalSchema, aU as PerpsPositionChangeNotification, aV as PerpsPositionChangeNotificationSchema, aW as PerpsPositionClosedNotification, aX as PerpsPositionClosedNotificationSchema, aY as PerpsPositionDeleveragedNotification, aZ as PerpsPositionDeleveragedNotificationSchema, a_ as PerpsPositionLiquidatedNotification, a$ as PerpsPositionLiquidatedNotificationSchema, b0 as PerpsPostOrderAck, b1 as PerpsPostOrderAckSchema, b2 as PerpsSideSchema, b3 as PerpsSortDirection, b4 as PerpsSortDirectionSchema, b5 as PerpsTimeInForce, b6 as PerpsTimeInForceSchema, b7 as PerpsTpSlKind, b8 as PerpsTpSlKindSchema, b9 as PerpsTpSlOrderFields, ba as PerpsTpSlOrderFieldsSchema, bb as PerpsTpSlScope, bc as PerpsTpSlScopeSchema, bd as PerpsTradeIdSchema, be as PerpsTxHash, bf as PerpsTxHashSchema, bg as PerpsUpdateLeverageBatchResult, bh as PerpsUpdateLeverageBatchResultSchema, bi as PerpsUpdateLeverageRejection, bj as PerpsUpdateLeverageRejectionSchema, bk as PerpsUpdateLeverageResult, bl as PerpsUpdateLeverageResultSchema, bm as PerpsWithdrawalAmount, bn as PerpsWithdrawalIdSchema, bo as PerpsWithdrawalStatus, bp as PerpsWithdrawalStatusSchema, bq as decimalString, br as perpsBaseUnits, bs as perpsDecimal } from '../orders-MU1eB8o-.js';
|
|
4
|
+
import { y as DecimalString, H as EpochMilliseconds, B as BaseUnits, af as OrderSide } from '../shared-Dm807IWG.js';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9
|
+
*/
|
|
10
|
+
declare const PerpsBalanceSchema: z.ZodObject<{
|
|
11
|
+
asset: z.ZodString;
|
|
12
|
+
balance: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
13
|
+
value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/**
|
|
16
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
17
|
+
*/
|
|
18
|
+
type PerpsBalance = z.infer<typeof PerpsBalanceSchema>;
|
|
19
|
+
/**
|
|
20
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
21
|
+
*/
|
|
22
|
+
declare const FetchPerpsBalancesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
23
|
+
asset: z.ZodString;
|
|
24
|
+
balance: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
25
|
+
value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
/**
|
|
28
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
29
|
+
*/
|
|
30
|
+
declare const PerpsAccountStatsSchema: z.ZodPipe<z.ZodObject<{
|
|
31
|
+
volume_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
32
|
+
taker_volume_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
33
|
+
maker_volume_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
34
|
+
account_maker_share_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
35
|
+
entity_maker_share_7d: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
36
|
+
entity_id: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsEntityId, number>>>;
|
|
37
|
+
entity_name: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
39
|
+
volume7d: DecimalString;
|
|
40
|
+
takerVolume7d: DecimalString;
|
|
41
|
+
makerVolume7d: DecimalString;
|
|
42
|
+
accountMakerShare7d: DecimalString;
|
|
43
|
+
entityMakerShare7d: DecimalString | undefined;
|
|
44
|
+
entityId: PerpsEntityId | undefined;
|
|
45
|
+
entityName: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
volume_7d: DecimalString;
|
|
48
|
+
taker_volume_7d: DecimalString;
|
|
49
|
+
maker_volume_7d: DecimalString;
|
|
50
|
+
account_maker_share_7d: DecimalString;
|
|
51
|
+
entity_maker_share_7d?: DecimalString | undefined;
|
|
52
|
+
entity_id?: PerpsEntityId | undefined;
|
|
53
|
+
entity_name?: string | undefined;
|
|
54
|
+
}>>;
|
|
55
|
+
/**
|
|
56
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
57
|
+
*/
|
|
58
|
+
type PerpsAccountStats = z.infer<typeof PerpsAccountStatsSchema>;
|
|
59
|
+
/**
|
|
60
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
61
|
+
*/
|
|
62
|
+
declare const FetchPerpsAccountStatsResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
63
|
+
volume_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
64
|
+
taker_volume_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
65
|
+
maker_volume_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
66
|
+
account_maker_share_7d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
67
|
+
entity_maker_share_7d: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
68
|
+
entity_id: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsEntityId, number>>>;
|
|
69
|
+
entity_name: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
71
|
+
volume7d: DecimalString;
|
|
72
|
+
takerVolume7d: DecimalString;
|
|
73
|
+
makerVolume7d: DecimalString;
|
|
74
|
+
accountMakerShare7d: DecimalString;
|
|
75
|
+
entityMakerShare7d: DecimalString | undefined;
|
|
76
|
+
entityId: PerpsEntityId | undefined;
|
|
77
|
+
entityName: string | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
volume_7d: DecimalString;
|
|
80
|
+
taker_volume_7d: DecimalString;
|
|
81
|
+
maker_volume_7d: DecimalString;
|
|
82
|
+
account_maker_share_7d: DecimalString;
|
|
83
|
+
entity_maker_share_7d?: DecimalString | undefined;
|
|
84
|
+
entity_id?: PerpsEntityId | undefined;
|
|
85
|
+
entity_name?: string | undefined;
|
|
86
|
+
}>>;
|
|
87
|
+
/**
|
|
88
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
89
|
+
*/
|
|
90
|
+
declare const PerpsPortfolioPositionSchema: z.ZodPipe<z.ZodObject<{
|
|
91
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
92
|
+
symbol: z.ZodString;
|
|
93
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
94
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
95
|
+
leverage: z.ZodNumber;
|
|
96
|
+
cross: z.ZodBoolean;
|
|
97
|
+
initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
98
|
+
maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
99
|
+
position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
100
|
+
liquidation_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
101
|
+
unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
102
|
+
return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
103
|
+
cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
104
|
+
adl_index: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
105
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
106
|
+
instrumentId: PerpsInstrumentId;
|
|
107
|
+
symbol: string;
|
|
108
|
+
size: DecimalString;
|
|
109
|
+
entryPrice: DecimalString;
|
|
110
|
+
leverage: number;
|
|
111
|
+
cross: boolean;
|
|
112
|
+
initialMargin: DecimalString;
|
|
113
|
+
maintenanceMargin: DecimalString;
|
|
114
|
+
positionValue: DecimalString;
|
|
115
|
+
liquidationPrice: DecimalString;
|
|
116
|
+
unrealizedPnl: DecimalString;
|
|
117
|
+
returnOnEquity: DecimalString;
|
|
118
|
+
cumulativeFunding: DecimalString;
|
|
119
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
120
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
121
|
+
}, {
|
|
122
|
+
instrument_id: PerpsInstrumentId;
|
|
123
|
+
symbol: string;
|
|
124
|
+
size: DecimalString;
|
|
125
|
+
entry_price: DecimalString;
|
|
126
|
+
leverage: number;
|
|
127
|
+
cross: boolean;
|
|
128
|
+
initial_margin: DecimalString;
|
|
129
|
+
maintenance_margin: DecimalString;
|
|
130
|
+
position_value: DecimalString;
|
|
131
|
+
liquidation_price: DecimalString;
|
|
132
|
+
unrealized_pnl: DecimalString;
|
|
133
|
+
return_on_equity: DecimalString;
|
|
134
|
+
cumulative_funding: DecimalString;
|
|
135
|
+
adl_index: 0 | 1 | 2 | 3;
|
|
136
|
+
}>>;
|
|
137
|
+
/**
|
|
138
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
139
|
+
*/
|
|
140
|
+
type PerpsPortfolioPosition = z.infer<typeof PerpsPortfolioPositionSchema>;
|
|
141
|
+
/**
|
|
142
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
143
|
+
*/
|
|
144
|
+
declare const PerpsMarginSummarySchema: z.ZodObject<{
|
|
145
|
+
totalAccountValue: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
146
|
+
availableOrderMargin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
147
|
+
totalInitialMargin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
148
|
+
totalMaintenanceMargin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
149
|
+
totalPositionValue: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
/**
|
|
152
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
153
|
+
*/
|
|
154
|
+
type PerpsMarginSummary = z.infer<typeof PerpsMarginSummarySchema>;
|
|
155
|
+
/**
|
|
156
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
157
|
+
*/
|
|
158
|
+
declare const PerpsPortfolioSchema: z.ZodPipe<z.ZodObject<{
|
|
159
|
+
positions: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
160
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
161
|
+
symbol: z.ZodString;
|
|
162
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
163
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
164
|
+
leverage: z.ZodNumber;
|
|
165
|
+
cross: z.ZodBoolean;
|
|
166
|
+
initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
167
|
+
maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
168
|
+
position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
169
|
+
liquidation_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
170
|
+
unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
171
|
+
return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
172
|
+
cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
173
|
+
adl_index: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
174
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
175
|
+
instrumentId: PerpsInstrumentId;
|
|
176
|
+
symbol: string;
|
|
177
|
+
size: DecimalString;
|
|
178
|
+
entryPrice: DecimalString;
|
|
179
|
+
leverage: number;
|
|
180
|
+
cross: boolean;
|
|
181
|
+
initialMargin: DecimalString;
|
|
182
|
+
maintenanceMargin: DecimalString;
|
|
183
|
+
positionValue: DecimalString;
|
|
184
|
+
liquidationPrice: DecimalString;
|
|
185
|
+
unrealizedPnl: DecimalString;
|
|
186
|
+
returnOnEquity: DecimalString;
|
|
187
|
+
cumulativeFunding: DecimalString;
|
|
188
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
189
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
190
|
+
}, {
|
|
191
|
+
instrument_id: PerpsInstrumentId;
|
|
192
|
+
symbol: string;
|
|
193
|
+
size: DecimalString;
|
|
194
|
+
entry_price: DecimalString;
|
|
195
|
+
leverage: number;
|
|
196
|
+
cross: boolean;
|
|
197
|
+
initial_margin: DecimalString;
|
|
198
|
+
maintenance_margin: DecimalString;
|
|
199
|
+
position_value: DecimalString;
|
|
200
|
+
liquidation_price: DecimalString;
|
|
201
|
+
unrealized_pnl: DecimalString;
|
|
202
|
+
return_on_equity: DecimalString;
|
|
203
|
+
cumulative_funding: DecimalString;
|
|
204
|
+
adl_index: 0 | 1 | 2 | 3;
|
|
205
|
+
}>>>;
|
|
206
|
+
margin: z.ZodPipe<z.ZodObject<{
|
|
207
|
+
total_account_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
208
|
+
available_order_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
209
|
+
total_initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
210
|
+
total_maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
211
|
+
total_position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
212
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
213
|
+
totalAccountValue: DecimalString;
|
|
214
|
+
availableOrderMargin: DecimalString;
|
|
215
|
+
totalInitialMargin: DecimalString;
|
|
216
|
+
totalMaintenanceMargin: DecimalString;
|
|
217
|
+
totalPositionValue: DecimalString;
|
|
218
|
+
}, {
|
|
219
|
+
total_account_value: DecimalString;
|
|
220
|
+
available_order_margin: DecimalString;
|
|
221
|
+
total_initial_margin: DecimalString;
|
|
222
|
+
total_maintenance_margin: DecimalString;
|
|
223
|
+
total_position_value: DecimalString;
|
|
224
|
+
}>>;
|
|
225
|
+
withdrawable: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
226
|
+
in_liquidation: z.ZodBoolean;
|
|
227
|
+
fee_tier: z.ZodNumber;
|
|
228
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
229
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
230
|
+
positions: {
|
|
231
|
+
instrumentId: PerpsInstrumentId;
|
|
232
|
+
symbol: string;
|
|
233
|
+
size: DecimalString;
|
|
234
|
+
entryPrice: DecimalString;
|
|
235
|
+
leverage: number;
|
|
236
|
+
cross: boolean;
|
|
237
|
+
initialMargin: DecimalString;
|
|
238
|
+
maintenanceMargin: DecimalString;
|
|
239
|
+
positionValue: DecimalString;
|
|
240
|
+
liquidationPrice: DecimalString;
|
|
241
|
+
unrealizedPnl: DecimalString;
|
|
242
|
+
returnOnEquity: DecimalString;
|
|
243
|
+
cumulativeFunding: DecimalString;
|
|
244
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
245
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
246
|
+
}[];
|
|
247
|
+
margin: {
|
|
248
|
+
totalAccountValue: DecimalString;
|
|
249
|
+
availableOrderMargin: DecimalString;
|
|
250
|
+
totalInitialMargin: DecimalString;
|
|
251
|
+
totalMaintenanceMargin: DecimalString;
|
|
252
|
+
totalPositionValue: DecimalString;
|
|
253
|
+
};
|
|
254
|
+
withdrawable: DecimalString;
|
|
255
|
+
inLiquidation: boolean;
|
|
256
|
+
/** Zero-based index into the perpetual fee schedule's tiers. */
|
|
257
|
+
feeTier: number;
|
|
258
|
+
timestamp: EpochMilliseconds;
|
|
259
|
+
}, {
|
|
260
|
+
positions: {
|
|
261
|
+
instrumentId: PerpsInstrumentId;
|
|
262
|
+
symbol: string;
|
|
263
|
+
size: DecimalString;
|
|
264
|
+
entryPrice: DecimalString;
|
|
265
|
+
leverage: number;
|
|
266
|
+
cross: boolean;
|
|
267
|
+
initialMargin: DecimalString;
|
|
268
|
+
maintenanceMargin: DecimalString;
|
|
269
|
+
positionValue: DecimalString;
|
|
270
|
+
liquidationPrice: DecimalString;
|
|
271
|
+
unrealizedPnl: DecimalString;
|
|
272
|
+
returnOnEquity: DecimalString;
|
|
273
|
+
cumulativeFunding: DecimalString;
|
|
274
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
275
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
276
|
+
}[];
|
|
277
|
+
margin: {
|
|
278
|
+
totalAccountValue: DecimalString;
|
|
279
|
+
availableOrderMargin: DecimalString;
|
|
280
|
+
totalInitialMargin: DecimalString;
|
|
281
|
+
totalMaintenanceMargin: DecimalString;
|
|
282
|
+
totalPositionValue: DecimalString;
|
|
283
|
+
};
|
|
284
|
+
withdrawable: DecimalString;
|
|
285
|
+
in_liquidation: boolean;
|
|
286
|
+
fee_tier: number;
|
|
287
|
+
timestamp: EpochMilliseconds;
|
|
288
|
+
}>>;
|
|
289
|
+
/**
|
|
290
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
291
|
+
*/
|
|
292
|
+
type PerpsPortfolio = z.infer<typeof PerpsPortfolioSchema>;
|
|
293
|
+
/**
|
|
294
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
295
|
+
*/
|
|
296
|
+
declare const FetchPerpsPortfolioResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
297
|
+
positions: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
298
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
299
|
+
symbol: z.ZodString;
|
|
300
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
301
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
302
|
+
leverage: z.ZodNumber;
|
|
303
|
+
cross: z.ZodBoolean;
|
|
304
|
+
initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
305
|
+
maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
306
|
+
position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
307
|
+
liquidation_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
308
|
+
unrealized_pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
309
|
+
return_on_equity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
310
|
+
cumulative_funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
311
|
+
adl_index: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
312
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
313
|
+
instrumentId: PerpsInstrumentId;
|
|
314
|
+
symbol: string;
|
|
315
|
+
size: DecimalString;
|
|
316
|
+
entryPrice: DecimalString;
|
|
317
|
+
leverage: number;
|
|
318
|
+
cross: boolean;
|
|
319
|
+
initialMargin: DecimalString;
|
|
320
|
+
maintenanceMargin: DecimalString;
|
|
321
|
+
positionValue: DecimalString;
|
|
322
|
+
liquidationPrice: DecimalString;
|
|
323
|
+
unrealizedPnl: DecimalString;
|
|
324
|
+
returnOnEquity: DecimalString;
|
|
325
|
+
cumulativeFunding: DecimalString;
|
|
326
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
327
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
328
|
+
}, {
|
|
329
|
+
instrument_id: PerpsInstrumentId;
|
|
330
|
+
symbol: string;
|
|
331
|
+
size: DecimalString;
|
|
332
|
+
entry_price: DecimalString;
|
|
333
|
+
leverage: number;
|
|
334
|
+
cross: boolean;
|
|
335
|
+
initial_margin: DecimalString;
|
|
336
|
+
maintenance_margin: DecimalString;
|
|
337
|
+
position_value: DecimalString;
|
|
338
|
+
liquidation_price: DecimalString;
|
|
339
|
+
unrealized_pnl: DecimalString;
|
|
340
|
+
return_on_equity: DecimalString;
|
|
341
|
+
cumulative_funding: DecimalString;
|
|
342
|
+
adl_index: 0 | 1 | 2 | 3;
|
|
343
|
+
}>>>;
|
|
344
|
+
margin: z.ZodPipe<z.ZodObject<{
|
|
345
|
+
total_account_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
346
|
+
available_order_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
347
|
+
total_initial_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
348
|
+
total_maintenance_margin: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
349
|
+
total_position_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
350
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
351
|
+
totalAccountValue: DecimalString;
|
|
352
|
+
availableOrderMargin: DecimalString;
|
|
353
|
+
totalInitialMargin: DecimalString;
|
|
354
|
+
totalMaintenanceMargin: DecimalString;
|
|
355
|
+
totalPositionValue: DecimalString;
|
|
356
|
+
}, {
|
|
357
|
+
total_account_value: DecimalString;
|
|
358
|
+
available_order_margin: DecimalString;
|
|
359
|
+
total_initial_margin: DecimalString;
|
|
360
|
+
total_maintenance_margin: DecimalString;
|
|
361
|
+
total_position_value: DecimalString;
|
|
362
|
+
}>>;
|
|
363
|
+
withdrawable: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
364
|
+
in_liquidation: z.ZodBoolean;
|
|
365
|
+
fee_tier: z.ZodNumber;
|
|
366
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
367
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
368
|
+
positions: {
|
|
369
|
+
instrumentId: PerpsInstrumentId;
|
|
370
|
+
symbol: string;
|
|
371
|
+
size: DecimalString;
|
|
372
|
+
entryPrice: DecimalString;
|
|
373
|
+
leverage: number;
|
|
374
|
+
cross: boolean;
|
|
375
|
+
initialMargin: DecimalString;
|
|
376
|
+
maintenanceMargin: DecimalString;
|
|
377
|
+
positionValue: DecimalString;
|
|
378
|
+
liquidationPrice: DecimalString;
|
|
379
|
+
unrealizedPnl: DecimalString;
|
|
380
|
+
returnOnEquity: DecimalString;
|
|
381
|
+
cumulativeFunding: DecimalString;
|
|
382
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
383
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
384
|
+
}[];
|
|
385
|
+
margin: {
|
|
386
|
+
totalAccountValue: DecimalString;
|
|
387
|
+
availableOrderMargin: DecimalString;
|
|
388
|
+
totalInitialMargin: DecimalString;
|
|
389
|
+
totalMaintenanceMargin: DecimalString;
|
|
390
|
+
totalPositionValue: DecimalString;
|
|
391
|
+
};
|
|
392
|
+
withdrawable: DecimalString;
|
|
393
|
+
inLiquidation: boolean;
|
|
394
|
+
/** Zero-based index into the perpetual fee schedule's tiers. */
|
|
395
|
+
feeTier: number;
|
|
396
|
+
timestamp: EpochMilliseconds;
|
|
397
|
+
}, {
|
|
398
|
+
positions: {
|
|
399
|
+
instrumentId: PerpsInstrumentId;
|
|
400
|
+
symbol: string;
|
|
401
|
+
size: DecimalString;
|
|
402
|
+
entryPrice: DecimalString;
|
|
403
|
+
leverage: number;
|
|
404
|
+
cross: boolean;
|
|
405
|
+
initialMargin: DecimalString;
|
|
406
|
+
maintenanceMargin: DecimalString;
|
|
407
|
+
positionValue: DecimalString;
|
|
408
|
+
liquidationPrice: DecimalString;
|
|
409
|
+
unrealizedPnl: DecimalString;
|
|
410
|
+
returnOnEquity: DecimalString;
|
|
411
|
+
cumulativeFunding: DecimalString;
|
|
412
|
+
/** Auto-deleveraging risk tier; higher values indicate higher risk. */
|
|
413
|
+
adlIndex: 0 | 1 | 2 | 3;
|
|
414
|
+
}[];
|
|
415
|
+
margin: {
|
|
416
|
+
totalAccountValue: DecimalString;
|
|
417
|
+
availableOrderMargin: DecimalString;
|
|
418
|
+
totalInitialMargin: DecimalString;
|
|
419
|
+
totalMaintenanceMargin: DecimalString;
|
|
420
|
+
totalPositionValue: DecimalString;
|
|
421
|
+
};
|
|
422
|
+
withdrawable: DecimalString;
|
|
423
|
+
in_liquidation: boolean;
|
|
424
|
+
fee_tier: number;
|
|
425
|
+
timestamp: EpochMilliseconds;
|
|
426
|
+
}>>;
|
|
427
|
+
/**
|
|
428
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
429
|
+
*/
|
|
430
|
+
declare const PerpsAccountFundingPaymentSchema: z.ZodPipe<z.ZodObject<{
|
|
431
|
+
id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsFundingPaymentId, number>>;
|
|
432
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
433
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
434
|
+
funding_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
435
|
+
funding_asset: z.ZodString;
|
|
436
|
+
funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
437
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
438
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
439
|
+
id: PerpsFundingPaymentId;
|
|
440
|
+
instrumentId: PerpsInstrumentId;
|
|
441
|
+
size: DecimalString;
|
|
442
|
+
fundingRate: DecimalString;
|
|
443
|
+
fundingAsset: string;
|
|
444
|
+
funding: DecimalString;
|
|
445
|
+
timestamp: EpochMilliseconds;
|
|
446
|
+
}, {
|
|
447
|
+
id: PerpsFundingPaymentId;
|
|
448
|
+
instrument_id: PerpsInstrumentId;
|
|
449
|
+
size: DecimalString;
|
|
450
|
+
funding_rate: DecimalString;
|
|
451
|
+
funding_asset: string;
|
|
452
|
+
funding: DecimalString;
|
|
453
|
+
timestamp: EpochMilliseconds;
|
|
454
|
+
}>>;
|
|
455
|
+
/**
|
|
456
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
457
|
+
*/
|
|
458
|
+
type PerpsAccountFundingPayment = z.infer<typeof PerpsAccountFundingPaymentSchema>;
|
|
459
|
+
/**
|
|
460
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
461
|
+
*/
|
|
462
|
+
declare const ListPerpsFundingPaymentsResponseSchema: z.ZodObject<{
|
|
463
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
464
|
+
id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsFundingPaymentId, number>>;
|
|
465
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
466
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
467
|
+
funding_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
468
|
+
funding_asset: z.ZodString;
|
|
469
|
+
funding: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
470
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
471
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
472
|
+
id: PerpsFundingPaymentId;
|
|
473
|
+
instrumentId: PerpsInstrumentId;
|
|
474
|
+
size: DecimalString;
|
|
475
|
+
fundingRate: DecimalString;
|
|
476
|
+
fundingAsset: string;
|
|
477
|
+
funding: DecimalString;
|
|
478
|
+
timestamp: EpochMilliseconds;
|
|
479
|
+
}, {
|
|
480
|
+
id: PerpsFundingPaymentId;
|
|
481
|
+
instrument_id: PerpsInstrumentId;
|
|
482
|
+
size: DecimalString;
|
|
483
|
+
funding_rate: DecimalString;
|
|
484
|
+
funding_asset: string;
|
|
485
|
+
funding: DecimalString;
|
|
486
|
+
timestamp: EpochMilliseconds;
|
|
487
|
+
}>>>;
|
|
488
|
+
more: z.ZodBoolean;
|
|
489
|
+
}, z.core.$strip>;
|
|
490
|
+
/**
|
|
491
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
492
|
+
*/
|
|
493
|
+
declare const PerpsAccountFundingPaymentEntrySchema: z.ZodPipe<z.ZodObject<{
|
|
494
|
+
id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsFundingPaymentId, number>>;
|
|
495
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
496
|
+
sz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
497
|
+
fr: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
498
|
+
fund: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
499
|
+
fua: z.ZodString;
|
|
500
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
501
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
502
|
+
id: PerpsFundingPaymentId;
|
|
503
|
+
instrumentId: PerpsInstrumentId;
|
|
504
|
+
size: DecimalString;
|
|
505
|
+
fundingRate: DecimalString;
|
|
506
|
+
fundingAsset: string;
|
|
507
|
+
funding: DecimalString;
|
|
508
|
+
timestamp: EpochMilliseconds;
|
|
509
|
+
}, {
|
|
510
|
+
id: PerpsFundingPaymentId;
|
|
511
|
+
iid: PerpsInstrumentId;
|
|
512
|
+
sz: DecimalString;
|
|
513
|
+
fr: DecimalString;
|
|
514
|
+
fund: DecimalString;
|
|
515
|
+
fua: string;
|
|
516
|
+
ts: EpochMilliseconds;
|
|
517
|
+
}>>;
|
|
518
|
+
/**
|
|
519
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
520
|
+
*/
|
|
521
|
+
declare const PerpsAccountConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
522
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
523
|
+
leverage: z.ZodNumber;
|
|
524
|
+
cross: z.ZodBoolean;
|
|
525
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
526
|
+
instrumentId: PerpsInstrumentId;
|
|
527
|
+
leverage: number;
|
|
528
|
+
cross: boolean;
|
|
529
|
+
}, {
|
|
530
|
+
instrument_id: PerpsInstrumentId;
|
|
531
|
+
leverage: number;
|
|
532
|
+
cross: boolean;
|
|
533
|
+
}>>;
|
|
534
|
+
/**
|
|
535
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
536
|
+
*/
|
|
537
|
+
type PerpsAccountConfig = z.infer<typeof PerpsAccountConfigSchema>;
|
|
538
|
+
/**
|
|
539
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
540
|
+
*/
|
|
541
|
+
declare const FetchPerpsAccountConfigResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
542
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
543
|
+
leverage: z.ZodNumber;
|
|
544
|
+
cross: z.ZodBoolean;
|
|
545
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
546
|
+
instrumentId: PerpsInstrumentId;
|
|
547
|
+
leverage: number;
|
|
548
|
+
cross: boolean;
|
|
549
|
+
}, {
|
|
550
|
+
instrument_id: PerpsInstrumentId;
|
|
551
|
+
leverage: number;
|
|
552
|
+
cross: boolean;
|
|
553
|
+
}>>>;
|
|
554
|
+
/**
|
|
555
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
556
|
+
*/
|
|
557
|
+
declare const PerpsEquityPointSchema: z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
558
|
+
timestamp: EpochMilliseconds;
|
|
559
|
+
equity: DecimalString;
|
|
560
|
+
}, [EpochMilliseconds, DecimalString]>>;
|
|
561
|
+
/**
|
|
562
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
563
|
+
*/
|
|
564
|
+
type PerpsEquityPoint = z.infer<typeof PerpsEquityPointSchema>;
|
|
565
|
+
/**
|
|
566
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
567
|
+
*/
|
|
568
|
+
declare const ListPerpsEquityHistoryResponseSchema: z.ZodObject<{
|
|
569
|
+
data: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
570
|
+
timestamp: EpochMilliseconds;
|
|
571
|
+
equity: DecimalString;
|
|
572
|
+
}, [EpochMilliseconds, DecimalString]>>>;
|
|
573
|
+
more: z.ZodBoolean;
|
|
574
|
+
}, z.core.$strip>;
|
|
575
|
+
/**
|
|
576
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
577
|
+
*/
|
|
578
|
+
declare const PerpsPnlPointSchema: z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
579
|
+
timestamp: EpochMilliseconds;
|
|
580
|
+
pnl: DecimalString;
|
|
581
|
+
}, [EpochMilliseconds, DecimalString]>>;
|
|
582
|
+
/**
|
|
583
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
584
|
+
*/
|
|
585
|
+
type PerpsPnlPoint = z.infer<typeof PerpsPnlPointSchema>;
|
|
586
|
+
/**
|
|
587
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
588
|
+
*/
|
|
589
|
+
declare const ListPerpsPnlHistoryResponseSchema: z.ZodObject<{
|
|
590
|
+
data: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
591
|
+
timestamp: EpochMilliseconds;
|
|
592
|
+
pnl: DecimalString;
|
|
593
|
+
}, [EpochMilliseconds, DecimalString]>>>;
|
|
594
|
+
more: z.ZodBoolean;
|
|
595
|
+
}, z.core.$strip>;
|
|
596
|
+
/**
|
|
597
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
598
|
+
*/
|
|
599
|
+
declare const PerpsProxyKeySchema: z.ZodPipe<z.ZodObject<{
|
|
600
|
+
proxy: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
601
|
+
label: z.ZodOptional<z.ZodString>;
|
|
602
|
+
expiry: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
603
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
604
|
+
proxy: _kuest_types.EvmAddress;
|
|
605
|
+
label: string | undefined;
|
|
606
|
+
expiresAt: EpochMilliseconds;
|
|
607
|
+
}, {
|
|
608
|
+
proxy: _kuest_types.EvmAddress;
|
|
609
|
+
expiry: EpochMilliseconds;
|
|
610
|
+
label?: string | undefined;
|
|
611
|
+
}>>;
|
|
612
|
+
/**
|
|
613
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
614
|
+
*/
|
|
615
|
+
type PerpsProxyKey = z.infer<typeof PerpsProxyKeySchema>;
|
|
616
|
+
/**
|
|
617
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
618
|
+
*/
|
|
619
|
+
declare const PerpsCredentialsResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
620
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
621
|
+
keys: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
622
|
+
proxy: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
623
|
+
label: z.ZodOptional<z.ZodString>;
|
|
624
|
+
expiry: z.ZodPipe<z.ZodPipe<z.ZodNumber, z.ZodTransform<number, number>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
625
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
626
|
+
proxy: _kuest_types.EvmAddress;
|
|
627
|
+
label: string | undefined;
|
|
628
|
+
expiresAt: EpochMilliseconds;
|
|
629
|
+
}, {
|
|
630
|
+
proxy: _kuest_types.EvmAddress;
|
|
631
|
+
expiry: EpochMilliseconds;
|
|
632
|
+
label?: string | undefined;
|
|
633
|
+
}>>>;
|
|
634
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
635
|
+
address: _kuest_types.EvmAddress;
|
|
636
|
+
keys: {
|
|
637
|
+
proxy: _kuest_types.EvmAddress;
|
|
638
|
+
label: string | undefined;
|
|
639
|
+
expiresAt: EpochMilliseconds;
|
|
640
|
+
}[];
|
|
641
|
+
}, {
|
|
642
|
+
address: _kuest_types.EvmAddress;
|
|
643
|
+
keys: {
|
|
644
|
+
proxy: _kuest_types.EvmAddress;
|
|
645
|
+
label: string | undefined;
|
|
646
|
+
expiresAt: EpochMilliseconds;
|
|
647
|
+
}[];
|
|
648
|
+
}>>;
|
|
649
|
+
/**
|
|
650
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
651
|
+
*/
|
|
652
|
+
declare const PerpsCreateProxyResponseSchema: z.ZodObject<{
|
|
653
|
+
secret: z.ZodString;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
/**
|
|
656
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
657
|
+
*/
|
|
658
|
+
declare const PerpsDeleteProxyResponseSchema: z.ZodObject<{
|
|
659
|
+
status: z.ZodEnum<{
|
|
660
|
+
ok: "ok";
|
|
661
|
+
err: "err";
|
|
662
|
+
}>;
|
|
663
|
+
error: z.ZodOptional<z.ZodString>;
|
|
664
|
+
}, z.core.$strip>;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Acknowledgement for a Perps auto-cancel update. `deadline` echoes the armed
|
|
668
|
+
* cancellation time in Unix milliseconds, or `null` when the schedule was
|
|
669
|
+
* disarmed.
|
|
670
|
+
*
|
|
671
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
672
|
+
*/
|
|
673
|
+
declare const PerpsAutoCancelResponseSchema: z.ZodObject<{
|
|
674
|
+
status: z.ZodLiteral<"ok">;
|
|
675
|
+
deadline: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds | null, number>>;
|
|
676
|
+
}, z.core.$strip>;
|
|
677
|
+
/**
|
|
678
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
679
|
+
*/
|
|
680
|
+
type PerpsAutoCancelResponse = z.infer<typeof PerpsAutoCancelResponseSchema>;
|
|
681
|
+
/**
|
|
682
|
+
* Current auto-cancel state for an account. `deadline` is `null` when no
|
|
683
|
+
* schedule is armed.
|
|
684
|
+
*
|
|
685
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
686
|
+
*/
|
|
687
|
+
declare const PerpsAutoCancelStatusSchema: z.ZodPipe<z.ZodObject<{
|
|
688
|
+
deadline: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds | null, number>>;
|
|
689
|
+
triggered: z.ZodNumber;
|
|
690
|
+
daily_limit: z.ZodNumber;
|
|
691
|
+
next_reset: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
692
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
693
|
+
deadline: EpochMilliseconds | null;
|
|
694
|
+
triggered: number;
|
|
695
|
+
dailyLimit: number;
|
|
696
|
+
nextReset: EpochMilliseconds;
|
|
697
|
+
}, {
|
|
698
|
+
deadline: EpochMilliseconds | null;
|
|
699
|
+
triggered: number;
|
|
700
|
+
daily_limit: number;
|
|
701
|
+
next_reset: EpochMilliseconds;
|
|
702
|
+
}>>;
|
|
703
|
+
/**
|
|
704
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
705
|
+
*/
|
|
706
|
+
type PerpsAutoCancelStatus = z.infer<typeof PerpsAutoCancelStatusSchema>;
|
|
707
|
+
/**
|
|
708
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
709
|
+
*/
|
|
710
|
+
declare const FetchPerpsAutoCancelStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
711
|
+
deadline: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds | null, number>>;
|
|
712
|
+
triggered: z.ZodNumber;
|
|
713
|
+
daily_limit: z.ZodNumber;
|
|
714
|
+
next_reset: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
715
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
716
|
+
deadline: EpochMilliseconds | null;
|
|
717
|
+
triggered: number;
|
|
718
|
+
dailyLimit: number;
|
|
719
|
+
nextReset: EpochMilliseconds;
|
|
720
|
+
}, {
|
|
721
|
+
deadline: EpochMilliseconds | null;
|
|
722
|
+
triggered: number;
|
|
723
|
+
daily_limit: number;
|
|
724
|
+
next_reset: EpochMilliseconds;
|
|
725
|
+
}>>;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
729
|
+
*/
|
|
730
|
+
declare const PerpsDepositSchema: z.ZodPipe<z.ZodObject<{
|
|
731
|
+
hash: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>;
|
|
732
|
+
asset: z.ZodString;
|
|
733
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
734
|
+
status: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
735
|
+
from: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
736
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
737
|
+
confirmations: z.ZodNumber;
|
|
738
|
+
required_confirmations: z.ZodNumber;
|
|
739
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
740
|
+
confirmed_timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
741
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
742
|
+
hash: _kuest_types.TxHash;
|
|
743
|
+
asset: string;
|
|
744
|
+
amount: BaseUnits;
|
|
745
|
+
status: PerpsDepositStatus;
|
|
746
|
+
from: _kuest_types.EvmAddress;
|
|
747
|
+
to: _kuest_types.EvmAddress;
|
|
748
|
+
confirmations: number;
|
|
749
|
+
requiredConfirmations: number;
|
|
750
|
+
createdTimestamp: EpochMilliseconds;
|
|
751
|
+
confirmedTimestamp: EpochMilliseconds | undefined;
|
|
752
|
+
}, {
|
|
753
|
+
hash: _kuest_types.TxHash;
|
|
754
|
+
asset: string;
|
|
755
|
+
amount: BaseUnits;
|
|
756
|
+
status: PerpsDepositStatus;
|
|
757
|
+
from: _kuest_types.EvmAddress;
|
|
758
|
+
to: _kuest_types.EvmAddress;
|
|
759
|
+
confirmations: number;
|
|
760
|
+
required_confirmations: number;
|
|
761
|
+
created_timestamp: EpochMilliseconds;
|
|
762
|
+
confirmed_timestamp?: EpochMilliseconds | undefined;
|
|
763
|
+
}>>;
|
|
764
|
+
/**
|
|
765
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
766
|
+
*/
|
|
767
|
+
type PerpsDeposit = z.infer<typeof PerpsDepositSchema>;
|
|
768
|
+
/**
|
|
769
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
770
|
+
*/
|
|
771
|
+
declare const ListPerpsDepositsResponseSchema: z.ZodObject<{
|
|
772
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
773
|
+
hash: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>;
|
|
774
|
+
asset: z.ZodString;
|
|
775
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
776
|
+
status: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
777
|
+
from: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
778
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
779
|
+
confirmations: z.ZodNumber;
|
|
780
|
+
required_confirmations: z.ZodNumber;
|
|
781
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
782
|
+
confirmed_timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
783
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
784
|
+
hash: _kuest_types.TxHash;
|
|
785
|
+
asset: string;
|
|
786
|
+
amount: BaseUnits;
|
|
787
|
+
status: PerpsDepositStatus;
|
|
788
|
+
from: _kuest_types.EvmAddress;
|
|
789
|
+
to: _kuest_types.EvmAddress;
|
|
790
|
+
confirmations: number;
|
|
791
|
+
requiredConfirmations: number;
|
|
792
|
+
createdTimestamp: EpochMilliseconds;
|
|
793
|
+
confirmedTimestamp: EpochMilliseconds | undefined;
|
|
794
|
+
}, {
|
|
795
|
+
hash: _kuest_types.TxHash;
|
|
796
|
+
asset: string;
|
|
797
|
+
amount: BaseUnits;
|
|
798
|
+
status: PerpsDepositStatus;
|
|
799
|
+
from: _kuest_types.EvmAddress;
|
|
800
|
+
to: _kuest_types.EvmAddress;
|
|
801
|
+
confirmations: number;
|
|
802
|
+
required_confirmations: number;
|
|
803
|
+
created_timestamp: EpochMilliseconds;
|
|
804
|
+
confirmed_timestamp?: EpochMilliseconds | undefined;
|
|
805
|
+
}>>>;
|
|
806
|
+
more: z.ZodBoolean;
|
|
807
|
+
}, z.core.$strip>;
|
|
808
|
+
/**
|
|
809
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
810
|
+
*/
|
|
811
|
+
declare const PerpsDepositUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
812
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
813
|
+
asset: z.ZodString;
|
|
814
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
815
|
+
status: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
816
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
817
|
+
hash: _kuest_types.TxHash | undefined;
|
|
818
|
+
asset: string;
|
|
819
|
+
amount: BaseUnits;
|
|
820
|
+
status: PerpsDepositStatus;
|
|
821
|
+
}, {
|
|
822
|
+
asset: string;
|
|
823
|
+
amount: BaseUnits;
|
|
824
|
+
status: PerpsDepositStatus;
|
|
825
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
826
|
+
}>>;
|
|
827
|
+
/**
|
|
828
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
829
|
+
*/
|
|
830
|
+
declare const PerpsWithdrawalSchema: z.ZodPipe<z.ZodObject<{
|
|
831
|
+
withdraw_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
|
|
832
|
+
asset: z.ZodString;
|
|
833
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
834
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
835
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
836
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
837
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
838
|
+
confirmations: z.ZodNumber;
|
|
839
|
+
required_confirmations: z.ZodNumber;
|
|
840
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
841
|
+
confirmed_timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
842
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
843
|
+
withdrawalId: PerpsWithdrawalId;
|
|
844
|
+
asset: string;
|
|
845
|
+
amount: BaseUnits;
|
|
846
|
+
fee: DecimalString;
|
|
847
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
848
|
+
to: _kuest_types.EvmAddress;
|
|
849
|
+
hash: _kuest_types.TxHash | undefined;
|
|
850
|
+
confirmations: number;
|
|
851
|
+
requiredConfirmations: number;
|
|
852
|
+
createdTimestamp: EpochMilliseconds;
|
|
853
|
+
confirmedTimestamp: EpochMilliseconds | undefined;
|
|
854
|
+
}, {
|
|
855
|
+
withdraw_id: PerpsWithdrawalId;
|
|
856
|
+
asset: string;
|
|
857
|
+
amount: BaseUnits;
|
|
858
|
+
fee: DecimalString;
|
|
859
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
860
|
+
to: _kuest_types.EvmAddress;
|
|
861
|
+
confirmations: number;
|
|
862
|
+
required_confirmations: number;
|
|
863
|
+
created_timestamp: EpochMilliseconds;
|
|
864
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
865
|
+
confirmed_timestamp?: EpochMilliseconds | undefined;
|
|
866
|
+
}>>;
|
|
867
|
+
/**
|
|
868
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
869
|
+
*/
|
|
870
|
+
type PerpsWithdrawal = z.infer<typeof PerpsWithdrawalSchema>;
|
|
871
|
+
/**
|
|
872
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
873
|
+
*/
|
|
874
|
+
declare const ListPerpsWithdrawalsResponseSchema: z.ZodObject<{
|
|
875
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
876
|
+
withdraw_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
|
|
877
|
+
asset: z.ZodString;
|
|
878
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
879
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
880
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
881
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
882
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
883
|
+
confirmations: z.ZodNumber;
|
|
884
|
+
required_confirmations: z.ZodNumber;
|
|
885
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
886
|
+
confirmed_timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
887
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
888
|
+
withdrawalId: PerpsWithdrawalId;
|
|
889
|
+
asset: string;
|
|
890
|
+
amount: BaseUnits;
|
|
891
|
+
fee: DecimalString;
|
|
892
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
893
|
+
to: _kuest_types.EvmAddress;
|
|
894
|
+
hash: _kuest_types.TxHash | undefined;
|
|
895
|
+
confirmations: number;
|
|
896
|
+
requiredConfirmations: number;
|
|
897
|
+
createdTimestamp: EpochMilliseconds;
|
|
898
|
+
confirmedTimestamp: EpochMilliseconds | undefined;
|
|
899
|
+
}, {
|
|
900
|
+
withdraw_id: PerpsWithdrawalId;
|
|
901
|
+
asset: string;
|
|
902
|
+
amount: BaseUnits;
|
|
903
|
+
fee: DecimalString;
|
|
904
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
905
|
+
to: _kuest_types.EvmAddress;
|
|
906
|
+
confirmations: number;
|
|
907
|
+
required_confirmations: number;
|
|
908
|
+
created_timestamp: EpochMilliseconds;
|
|
909
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
910
|
+
confirmed_timestamp?: EpochMilliseconds | undefined;
|
|
911
|
+
}>>>;
|
|
912
|
+
more: z.ZodBoolean;
|
|
913
|
+
}, z.core.$strip>;
|
|
914
|
+
/**
|
|
915
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
916
|
+
*/
|
|
917
|
+
declare const PerpsWithdrawResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
918
|
+
status: z.ZodEnum<{
|
|
919
|
+
ok: "ok";
|
|
920
|
+
err: "err";
|
|
921
|
+
}>;
|
|
922
|
+
withdraw_id: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>>;
|
|
923
|
+
error: z.ZodOptional<z.ZodString>;
|
|
924
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
925
|
+
status: "ok" | "err";
|
|
926
|
+
withdrawalId: PerpsWithdrawalId | undefined;
|
|
927
|
+
error: string | undefined;
|
|
928
|
+
}, {
|
|
929
|
+
status: "ok" | "err";
|
|
930
|
+
withdraw_id?: PerpsWithdrawalId | undefined;
|
|
931
|
+
error?: string | undefined;
|
|
932
|
+
}>>;
|
|
933
|
+
/**
|
|
934
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
935
|
+
*/
|
|
936
|
+
declare const PerpsWithdrawalUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
937
|
+
withdraw_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
|
|
938
|
+
asset: z.ZodString;
|
|
939
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<BaseUnits, string>>;
|
|
940
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
941
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
942
|
+
to: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
943
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
944
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
945
|
+
withdrawalId: PerpsWithdrawalId;
|
|
946
|
+
asset: string;
|
|
947
|
+
amount: BaseUnits;
|
|
948
|
+
fee: DecimalString;
|
|
949
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
950
|
+
to: _kuest_types.EvmAddress;
|
|
951
|
+
hash: _kuest_types.TxHash | undefined;
|
|
952
|
+
}, {
|
|
953
|
+
withdraw_id: PerpsWithdrawalId;
|
|
954
|
+
asset: string;
|
|
955
|
+
amount: BaseUnits;
|
|
956
|
+
fee: DecimalString;
|
|
957
|
+
status: (string & {}) | PerpsKnownWithdrawalStatus;
|
|
958
|
+
to: _kuest_types.EvmAddress;
|
|
959
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
960
|
+
}>>;
|
|
961
|
+
/**
|
|
962
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
963
|
+
*/
|
|
964
|
+
declare const PerpsInternalTransferSchema: z.ZodPipe<z.ZodObject<{
|
|
965
|
+
transfer_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInternalTransferId, number>>;
|
|
966
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownInternalTransferType, string>>;
|
|
967
|
+
asset: z.ZodString;
|
|
968
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
969
|
+
direction: z.ZodEnum<typeof PerpsInternalTransferDirection>;
|
|
970
|
+
counterparty: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
971
|
+
label: z.ZodOptional<z.ZodString>;
|
|
972
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
973
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
974
|
+
transferId: PerpsInternalTransferId;
|
|
975
|
+
type: (string & {}) | PerpsKnownInternalTransferType;
|
|
976
|
+
asset: string;
|
|
977
|
+
amount: DecimalString;
|
|
978
|
+
direction: PerpsInternalTransferDirection;
|
|
979
|
+
counterparty: _kuest_types.EvmAddress;
|
|
980
|
+
label: string | undefined;
|
|
981
|
+
createdTimestamp: EpochMilliseconds;
|
|
982
|
+
}, {
|
|
983
|
+
transfer_id: PerpsInternalTransferId;
|
|
984
|
+
type: (string & {}) | PerpsKnownInternalTransferType;
|
|
985
|
+
asset: string;
|
|
986
|
+
amount: DecimalString;
|
|
987
|
+
direction: PerpsInternalTransferDirection;
|
|
988
|
+
counterparty: _kuest_types.EvmAddress;
|
|
989
|
+
created_timestamp: EpochMilliseconds;
|
|
990
|
+
label?: string | undefined;
|
|
991
|
+
}>>;
|
|
992
|
+
/**
|
|
993
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
994
|
+
*/
|
|
995
|
+
type PerpsInternalTransfer = z.infer<typeof PerpsInternalTransferSchema>;
|
|
996
|
+
/**
|
|
997
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
998
|
+
*/
|
|
999
|
+
declare const ListPerpsInternalTransfersResponseSchema: z.ZodObject<{
|
|
1000
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1001
|
+
transfer_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInternalTransferId, number>>;
|
|
1002
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownInternalTransferType, string>>;
|
|
1003
|
+
asset: z.ZodString;
|
|
1004
|
+
amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1005
|
+
direction: z.ZodEnum<typeof PerpsInternalTransferDirection>;
|
|
1006
|
+
counterparty: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
1007
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1009
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1010
|
+
transferId: PerpsInternalTransferId;
|
|
1011
|
+
type: (string & {}) | PerpsKnownInternalTransferType;
|
|
1012
|
+
asset: string;
|
|
1013
|
+
amount: DecimalString;
|
|
1014
|
+
direction: PerpsInternalTransferDirection;
|
|
1015
|
+
counterparty: _kuest_types.EvmAddress;
|
|
1016
|
+
label: string | undefined;
|
|
1017
|
+
createdTimestamp: EpochMilliseconds;
|
|
1018
|
+
}, {
|
|
1019
|
+
transfer_id: PerpsInternalTransferId;
|
|
1020
|
+
type: (string & {}) | PerpsKnownInternalTransferType;
|
|
1021
|
+
asset: string;
|
|
1022
|
+
amount: DecimalString;
|
|
1023
|
+
direction: PerpsInternalTransferDirection;
|
|
1024
|
+
counterparty: _kuest_types.EvmAddress;
|
|
1025
|
+
created_timestamp: EpochMilliseconds;
|
|
1026
|
+
label?: string | undefined;
|
|
1027
|
+
}>>>;
|
|
1028
|
+
more: z.ZodBoolean;
|
|
1029
|
+
}, z.core.$strip>;
|
|
1030
|
+
/**
|
|
1031
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1032
|
+
*/
|
|
1033
|
+
declare const PerpsInternalTransferResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
1034
|
+
status: z.ZodLiteral<"ok">;
|
|
1035
|
+
transfer_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInternalTransferId, number>>;
|
|
1036
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
1037
|
+
status: "ok";
|
|
1038
|
+
transferId: PerpsInternalTransferId;
|
|
1039
|
+
}, {
|
|
1040
|
+
status: "ok";
|
|
1041
|
+
transfer_id: PerpsInternalTransferId;
|
|
1042
|
+
}>>;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1046
|
+
*/
|
|
1047
|
+
declare const PerpsRiskTierSchema: z.ZodObject<{
|
|
1048
|
+
lowerBound: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1049
|
+
maxLeverage: z.ZodNumber;
|
|
1050
|
+
}, z.core.$strip>;
|
|
1051
|
+
/**
|
|
1052
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1053
|
+
*/
|
|
1054
|
+
type PerpsRiskTier = z.infer<typeof PerpsRiskTierSchema>;
|
|
1055
|
+
/**
|
|
1056
|
+
* Permanent retirement record. Sequence is an exact nonnegative safe integer;
|
|
1057
|
+
* larger values are rejected. Timestamp is the cutoff for unapplied funding.
|
|
1058
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1059
|
+
*/
|
|
1060
|
+
type PerpsInstrumentSettlement = {
|
|
1061
|
+
sequence: number;
|
|
1062
|
+
timestamp: EpochMilliseconds;
|
|
1063
|
+
price: DecimalString;
|
|
1064
|
+
insuranceDebit: DecimalString;
|
|
1065
|
+
};
|
|
1066
|
+
/**
|
|
1067
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1068
|
+
*/
|
|
1069
|
+
declare const PerpsInstrumentSettlementSchema: z.ZodPipe<z.ZodObject<{
|
|
1070
|
+
sequence: z.ZodNumber;
|
|
1071
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1072
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1073
|
+
insurance_debit: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1074
|
+
}, z.core.$strip>, z.ZodTransform<PerpsInstrumentSettlement, {
|
|
1075
|
+
sequence: number;
|
|
1076
|
+
timestamp: EpochMilliseconds;
|
|
1077
|
+
price: DecimalString;
|
|
1078
|
+
insurance_debit: DecimalString;
|
|
1079
|
+
}>>;
|
|
1080
|
+
/**
|
|
1081
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1082
|
+
*/
|
|
1083
|
+
declare const PerpsInstrumentSchema: z.ZodPipe<z.ZodObject<{
|
|
1084
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1085
|
+
instrument_type: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
1086
|
+
category: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
1087
|
+
symbol: z.ZodString;
|
|
1088
|
+
display_symbol: z.ZodOptional<z.ZodString>;
|
|
1089
|
+
close_only: z.ZodDefault<z.ZodBoolean>;
|
|
1090
|
+
settlement: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
1091
|
+
sequence: z.ZodNumber;
|
|
1092
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1093
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1094
|
+
insurance_debit: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1095
|
+
}, z.core.$strip>, z.ZodTransform<PerpsInstrumentSettlement, {
|
|
1096
|
+
sequence: number;
|
|
1097
|
+
timestamp: EpochMilliseconds;
|
|
1098
|
+
price: DecimalString;
|
|
1099
|
+
insurance_debit: DecimalString;
|
|
1100
|
+
}>>>;
|
|
1101
|
+
base_asset: z.ZodString;
|
|
1102
|
+
quote_asset: z.ZodString;
|
|
1103
|
+
funding_interval: z.ZodPipe<z.ZodString, z.ZodTransform<`${number}h`, string>>;
|
|
1104
|
+
quantity_decimals: z.ZodNumber;
|
|
1105
|
+
price_decimals: z.ZodNumber;
|
|
1106
|
+
price_bounds: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1107
|
+
liquidation_fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1108
|
+
max_order_count: z.ZodNumber;
|
|
1109
|
+
min_notional: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1110
|
+
max_market_notional: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1111
|
+
max_limit_notional: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1112
|
+
max_leverage: z.ZodNumber;
|
|
1113
|
+
isolated_only: z.ZodBoolean;
|
|
1114
|
+
risk_tiers: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1115
|
+
lower_bound: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1116
|
+
max_leverage: z.ZodNumber;
|
|
1117
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1118
|
+
lowerBound: DecimalString;
|
|
1119
|
+
maxLeverage: number;
|
|
1120
|
+
}, {
|
|
1121
|
+
lower_bound: DecimalString;
|
|
1122
|
+
max_leverage: number;
|
|
1123
|
+
}>>>;
|
|
1124
|
+
ui_live_time: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>>;
|
|
1125
|
+
logo: z.ZodOptional<z.ZodObject<{
|
|
1126
|
+
light: z.ZodString;
|
|
1127
|
+
dark: z.ZodString;
|
|
1128
|
+
}, z.core.$strip>>;
|
|
1129
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1130
|
+
id: PerpsInstrumentId;
|
|
1131
|
+
category: PerpsInstrumentCategory;
|
|
1132
|
+
symbol: string;
|
|
1133
|
+
/** Presentation label; canonical symbol and instrument ID remain unchanged. */
|
|
1134
|
+
displaySymbol: string | undefined;
|
|
1135
|
+
/** Whether new orders must reduce exposure; false for older responses. */
|
|
1136
|
+
closeOnly: boolean;
|
|
1137
|
+
/** Present after permanent retirement; trading cannot resume. */
|
|
1138
|
+
settlement: PerpsInstrumentSettlement | undefined;
|
|
1139
|
+
baseAsset: string;
|
|
1140
|
+
quoteAsset: string;
|
|
1141
|
+
fundingInterval: `${number}h`;
|
|
1142
|
+
quantityDecimals: number;
|
|
1143
|
+
priceDecimals: number;
|
|
1144
|
+
priceBounds: DecimalString;
|
|
1145
|
+
liquidationFee: DecimalString;
|
|
1146
|
+
maxOrderCount: number;
|
|
1147
|
+
minNotional: DecimalString;
|
|
1148
|
+
maxMarketNotional: DecimalString;
|
|
1149
|
+
maxLimitNotional: DecimalString;
|
|
1150
|
+
maxLeverage: number;
|
|
1151
|
+
isolatedOnly: boolean;
|
|
1152
|
+
riskTiers: {
|
|
1153
|
+
lowerBound: DecimalString;
|
|
1154
|
+
maxLeverage: number;
|
|
1155
|
+
}[];
|
|
1156
|
+
/** Advisory visibility time; null means hidden. Does not restrict trading. */
|
|
1157
|
+
uiLiveTime: EpochMilliseconds | null;
|
|
1158
|
+
/** Immutable logo URLs for light and dark themes; absent until uploaded. */
|
|
1159
|
+
logo: {
|
|
1160
|
+
light: string;
|
|
1161
|
+
dark: string;
|
|
1162
|
+
} | undefined;
|
|
1163
|
+
}, {
|
|
1164
|
+
instrument_id: PerpsInstrumentId;
|
|
1165
|
+
instrument_type: PerpsInstrumentType.Perpetual;
|
|
1166
|
+
category: PerpsInstrumentCategory;
|
|
1167
|
+
symbol: string;
|
|
1168
|
+
close_only: boolean;
|
|
1169
|
+
base_asset: string;
|
|
1170
|
+
quote_asset: string;
|
|
1171
|
+
funding_interval: `${number}h`;
|
|
1172
|
+
quantity_decimals: number;
|
|
1173
|
+
price_decimals: number;
|
|
1174
|
+
price_bounds: DecimalString;
|
|
1175
|
+
liquidation_fee: DecimalString;
|
|
1176
|
+
max_order_count: number;
|
|
1177
|
+
min_notional: DecimalString;
|
|
1178
|
+
max_market_notional: DecimalString;
|
|
1179
|
+
max_limit_notional: DecimalString;
|
|
1180
|
+
max_leverage: number;
|
|
1181
|
+
isolated_only: boolean;
|
|
1182
|
+
risk_tiers: {
|
|
1183
|
+
lowerBound: DecimalString;
|
|
1184
|
+
maxLeverage: number;
|
|
1185
|
+
}[];
|
|
1186
|
+
ui_live_time: EpochMilliseconds | null;
|
|
1187
|
+
display_symbol?: string | undefined;
|
|
1188
|
+
settlement?: PerpsInstrumentSettlement | undefined;
|
|
1189
|
+
logo?: {
|
|
1190
|
+
light: string;
|
|
1191
|
+
dark: string;
|
|
1192
|
+
} | undefined;
|
|
1193
|
+
}>>;
|
|
1194
|
+
/**
|
|
1195
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1196
|
+
*/
|
|
1197
|
+
type PerpsInstrument = z.infer<typeof PerpsInstrumentSchema>;
|
|
1198
|
+
/**
|
|
1199
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1200
|
+
*/
|
|
1201
|
+
declare const FetchPerpsInstrumentsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1202
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1203
|
+
instrument_type: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
1204
|
+
category: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
1205
|
+
symbol: z.ZodString;
|
|
1206
|
+
display_symbol: z.ZodOptional<z.ZodString>;
|
|
1207
|
+
close_only: z.ZodDefault<z.ZodBoolean>;
|
|
1208
|
+
settlement: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
1209
|
+
sequence: z.ZodNumber;
|
|
1210
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1211
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1212
|
+
insurance_debit: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1213
|
+
}, z.core.$strip>, z.ZodTransform<PerpsInstrumentSettlement, {
|
|
1214
|
+
sequence: number;
|
|
1215
|
+
timestamp: EpochMilliseconds;
|
|
1216
|
+
price: DecimalString;
|
|
1217
|
+
insurance_debit: DecimalString;
|
|
1218
|
+
}>>>;
|
|
1219
|
+
base_asset: z.ZodString;
|
|
1220
|
+
quote_asset: z.ZodString;
|
|
1221
|
+
funding_interval: z.ZodPipe<z.ZodString, z.ZodTransform<`${number}h`, string>>;
|
|
1222
|
+
quantity_decimals: z.ZodNumber;
|
|
1223
|
+
price_decimals: z.ZodNumber;
|
|
1224
|
+
price_bounds: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1225
|
+
liquidation_fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1226
|
+
max_order_count: z.ZodNumber;
|
|
1227
|
+
min_notional: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1228
|
+
max_market_notional: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1229
|
+
max_limit_notional: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1230
|
+
max_leverage: z.ZodNumber;
|
|
1231
|
+
isolated_only: z.ZodBoolean;
|
|
1232
|
+
risk_tiers: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1233
|
+
lower_bound: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1234
|
+
max_leverage: z.ZodNumber;
|
|
1235
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1236
|
+
lowerBound: DecimalString;
|
|
1237
|
+
maxLeverage: number;
|
|
1238
|
+
}, {
|
|
1239
|
+
lower_bound: DecimalString;
|
|
1240
|
+
max_leverage: number;
|
|
1241
|
+
}>>>;
|
|
1242
|
+
ui_live_time: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>>;
|
|
1243
|
+
logo: z.ZodOptional<z.ZodObject<{
|
|
1244
|
+
light: z.ZodString;
|
|
1245
|
+
dark: z.ZodString;
|
|
1246
|
+
}, z.core.$strip>>;
|
|
1247
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1248
|
+
id: PerpsInstrumentId;
|
|
1249
|
+
category: PerpsInstrumentCategory;
|
|
1250
|
+
symbol: string;
|
|
1251
|
+
/** Presentation label; canonical symbol and instrument ID remain unchanged. */
|
|
1252
|
+
displaySymbol: string | undefined;
|
|
1253
|
+
/** Whether new orders must reduce exposure; false for older responses. */
|
|
1254
|
+
closeOnly: boolean;
|
|
1255
|
+
/** Present after permanent retirement; trading cannot resume. */
|
|
1256
|
+
settlement: PerpsInstrumentSettlement | undefined;
|
|
1257
|
+
baseAsset: string;
|
|
1258
|
+
quoteAsset: string;
|
|
1259
|
+
fundingInterval: `${number}h`;
|
|
1260
|
+
quantityDecimals: number;
|
|
1261
|
+
priceDecimals: number;
|
|
1262
|
+
priceBounds: DecimalString;
|
|
1263
|
+
liquidationFee: DecimalString;
|
|
1264
|
+
maxOrderCount: number;
|
|
1265
|
+
minNotional: DecimalString;
|
|
1266
|
+
maxMarketNotional: DecimalString;
|
|
1267
|
+
maxLimitNotional: DecimalString;
|
|
1268
|
+
maxLeverage: number;
|
|
1269
|
+
isolatedOnly: boolean;
|
|
1270
|
+
riskTiers: {
|
|
1271
|
+
lowerBound: DecimalString;
|
|
1272
|
+
maxLeverage: number;
|
|
1273
|
+
}[];
|
|
1274
|
+
/** Advisory visibility time; null means hidden. Does not restrict trading. */
|
|
1275
|
+
uiLiveTime: EpochMilliseconds | null;
|
|
1276
|
+
/** Immutable logo URLs for light and dark themes; absent until uploaded. */
|
|
1277
|
+
logo: {
|
|
1278
|
+
light: string;
|
|
1279
|
+
dark: string;
|
|
1280
|
+
} | undefined;
|
|
1281
|
+
}, {
|
|
1282
|
+
instrument_id: PerpsInstrumentId;
|
|
1283
|
+
instrument_type: PerpsInstrumentType.Perpetual;
|
|
1284
|
+
category: PerpsInstrumentCategory;
|
|
1285
|
+
symbol: string;
|
|
1286
|
+
close_only: boolean;
|
|
1287
|
+
base_asset: string;
|
|
1288
|
+
quote_asset: string;
|
|
1289
|
+
funding_interval: `${number}h`;
|
|
1290
|
+
quantity_decimals: number;
|
|
1291
|
+
price_decimals: number;
|
|
1292
|
+
price_bounds: DecimalString;
|
|
1293
|
+
liquidation_fee: DecimalString;
|
|
1294
|
+
max_order_count: number;
|
|
1295
|
+
min_notional: DecimalString;
|
|
1296
|
+
max_market_notional: DecimalString;
|
|
1297
|
+
max_limit_notional: DecimalString;
|
|
1298
|
+
max_leverage: number;
|
|
1299
|
+
isolated_only: boolean;
|
|
1300
|
+
risk_tiers: {
|
|
1301
|
+
lowerBound: DecimalString;
|
|
1302
|
+
maxLeverage: number;
|
|
1303
|
+
}[];
|
|
1304
|
+
ui_live_time: EpochMilliseconds | null;
|
|
1305
|
+
display_symbol?: string | undefined;
|
|
1306
|
+
settlement?: PerpsInstrumentSettlement | undefined;
|
|
1307
|
+
logo?: {
|
|
1308
|
+
light: string;
|
|
1309
|
+
dark: string;
|
|
1310
|
+
} | undefined;
|
|
1311
|
+
}>>>;
|
|
1312
|
+
/**
|
|
1313
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1314
|
+
*/
|
|
1315
|
+
declare const PerpsTickerSchema: z.ZodPipe<z.ZodObject<{
|
|
1316
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1317
|
+
symbol: z.ZodString;
|
|
1318
|
+
index_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1319
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1320
|
+
last_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1321
|
+
mid_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1322
|
+
open_interest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1323
|
+
funding_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1324
|
+
next_funding: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1325
|
+
timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
1326
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1327
|
+
instrumentId: PerpsInstrumentId;
|
|
1328
|
+
symbol: string;
|
|
1329
|
+
indexPrice: DecimalString;
|
|
1330
|
+
markPrice: DecimalString;
|
|
1331
|
+
lastPrice: DecimalString;
|
|
1332
|
+
midPrice: DecimalString;
|
|
1333
|
+
openInterest: DecimalString;
|
|
1334
|
+
fundingRate: DecimalString;
|
|
1335
|
+
nextFunding: EpochMilliseconds;
|
|
1336
|
+
timestamp: EpochMilliseconds | undefined;
|
|
1337
|
+
}, {
|
|
1338
|
+
instrument_id: PerpsInstrumentId;
|
|
1339
|
+
symbol: string;
|
|
1340
|
+
index_price: DecimalString;
|
|
1341
|
+
mark_price: DecimalString;
|
|
1342
|
+
last_price: DecimalString;
|
|
1343
|
+
mid_price: DecimalString;
|
|
1344
|
+
open_interest: DecimalString;
|
|
1345
|
+
funding_rate: DecimalString;
|
|
1346
|
+
next_funding: EpochMilliseconds;
|
|
1347
|
+
timestamp?: EpochMilliseconds | undefined;
|
|
1348
|
+
}>>;
|
|
1349
|
+
/**
|
|
1350
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1351
|
+
*/
|
|
1352
|
+
type PerpsTicker = z.infer<typeof PerpsTickerSchema> & {
|
|
1353
|
+
openPrice?: DecimalString;
|
|
1354
|
+
volume24h?: DecimalString;
|
|
1355
|
+
};
|
|
1356
|
+
/**
|
|
1357
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1358
|
+
*/
|
|
1359
|
+
declare const FetchPerpsTickersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1360
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1361
|
+
symbol: z.ZodString;
|
|
1362
|
+
index_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1363
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1364
|
+
last_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1365
|
+
mid_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1366
|
+
open_interest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1367
|
+
funding_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1368
|
+
next_funding: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1369
|
+
timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
1370
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1371
|
+
instrumentId: PerpsInstrumentId;
|
|
1372
|
+
symbol: string;
|
|
1373
|
+
indexPrice: DecimalString;
|
|
1374
|
+
markPrice: DecimalString;
|
|
1375
|
+
lastPrice: DecimalString;
|
|
1376
|
+
midPrice: DecimalString;
|
|
1377
|
+
openInterest: DecimalString;
|
|
1378
|
+
fundingRate: DecimalString;
|
|
1379
|
+
nextFunding: EpochMilliseconds;
|
|
1380
|
+
timestamp: EpochMilliseconds | undefined;
|
|
1381
|
+
}, {
|
|
1382
|
+
instrument_id: PerpsInstrumentId;
|
|
1383
|
+
symbol: string;
|
|
1384
|
+
index_price: DecimalString;
|
|
1385
|
+
mark_price: DecimalString;
|
|
1386
|
+
last_price: DecimalString;
|
|
1387
|
+
mid_price: DecimalString;
|
|
1388
|
+
open_interest: DecimalString;
|
|
1389
|
+
funding_rate: DecimalString;
|
|
1390
|
+
next_funding: EpochMilliseconds;
|
|
1391
|
+
timestamp?: EpochMilliseconds | undefined;
|
|
1392
|
+
}>>>;
|
|
1393
|
+
/**
|
|
1394
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1395
|
+
*/
|
|
1396
|
+
declare const PerpsTickerEntrySchema: z.ZodPipe<z.ZodObject<{
|
|
1397
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1398
|
+
idx: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1399
|
+
mark: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1400
|
+
last: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1401
|
+
mid: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1402
|
+
oi: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1403
|
+
fr: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1404
|
+
nxf: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1405
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1406
|
+
instrumentId: PerpsInstrumentId;
|
|
1407
|
+
indexPrice: DecimalString;
|
|
1408
|
+
markPrice: DecimalString;
|
|
1409
|
+
lastPrice: DecimalString;
|
|
1410
|
+
midPrice: DecimalString;
|
|
1411
|
+
openInterest: DecimalString;
|
|
1412
|
+
fundingRate: DecimalString;
|
|
1413
|
+
nextFunding: EpochMilliseconds;
|
|
1414
|
+
}, {
|
|
1415
|
+
iid: PerpsInstrumentId;
|
|
1416
|
+
idx: DecimalString;
|
|
1417
|
+
mark: DecimalString;
|
|
1418
|
+
last: DecimalString;
|
|
1419
|
+
mid: DecimalString;
|
|
1420
|
+
oi: DecimalString;
|
|
1421
|
+
fr: DecimalString;
|
|
1422
|
+
nxf: EpochMilliseconds;
|
|
1423
|
+
}>>;
|
|
1424
|
+
/**
|
|
1425
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1426
|
+
*/
|
|
1427
|
+
declare const PerpsCandleSchema: z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
|
|
1428
|
+
timestamp: EpochMilliseconds;
|
|
1429
|
+
open: DecimalString;
|
|
1430
|
+
high: DecimalString;
|
|
1431
|
+
low: DecimalString;
|
|
1432
|
+
close: DecimalString;
|
|
1433
|
+
volume: DecimalString;
|
|
1434
|
+
trades: number;
|
|
1435
|
+
}, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>;
|
|
1436
|
+
/**
|
|
1437
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1438
|
+
*/
|
|
1439
|
+
type PerpsCandle = z.infer<typeof PerpsCandleSchema>;
|
|
1440
|
+
/**
|
|
1441
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1442
|
+
*/
|
|
1443
|
+
declare const PerpsStatisticSchema: z.ZodPipe<z.ZodObject<{
|
|
1444
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1445
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
volume: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1447
|
+
open_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1448
|
+
klines: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
|
|
1449
|
+
timestamp: EpochMilliseconds;
|
|
1450
|
+
open: DecimalString;
|
|
1451
|
+
high: DecimalString;
|
|
1452
|
+
low: DecimalString;
|
|
1453
|
+
close: DecimalString;
|
|
1454
|
+
volume: DecimalString;
|
|
1455
|
+
trades: number;
|
|
1456
|
+
}, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
|
|
1457
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1458
|
+
instrumentId: PerpsInstrumentId;
|
|
1459
|
+
symbol: string | undefined;
|
|
1460
|
+
volume: DecimalString;
|
|
1461
|
+
openPrice: DecimalString;
|
|
1462
|
+
klines: {
|
|
1463
|
+
timestamp: EpochMilliseconds;
|
|
1464
|
+
open: DecimalString;
|
|
1465
|
+
high: DecimalString;
|
|
1466
|
+
low: DecimalString;
|
|
1467
|
+
close: DecimalString;
|
|
1468
|
+
volume: DecimalString;
|
|
1469
|
+
trades: number;
|
|
1470
|
+
}[];
|
|
1471
|
+
}, {
|
|
1472
|
+
instrument_id: PerpsInstrumentId;
|
|
1473
|
+
volume: DecimalString;
|
|
1474
|
+
open_price: DecimalString;
|
|
1475
|
+
klines: {
|
|
1476
|
+
timestamp: EpochMilliseconds;
|
|
1477
|
+
open: DecimalString;
|
|
1478
|
+
high: DecimalString;
|
|
1479
|
+
low: DecimalString;
|
|
1480
|
+
close: DecimalString;
|
|
1481
|
+
volume: DecimalString;
|
|
1482
|
+
trades: number;
|
|
1483
|
+
}[];
|
|
1484
|
+
symbol?: string | undefined;
|
|
1485
|
+
}>>;
|
|
1486
|
+
/**
|
|
1487
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1488
|
+
*/
|
|
1489
|
+
type PerpsStatistic = z.infer<typeof PerpsStatisticSchema>;
|
|
1490
|
+
/**
|
|
1491
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1492
|
+
*/
|
|
1493
|
+
declare const FetchPerpsStatisticsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1494
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1495
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
1496
|
+
volume: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1497
|
+
open_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1498
|
+
klines: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
|
|
1499
|
+
timestamp: EpochMilliseconds;
|
|
1500
|
+
open: DecimalString;
|
|
1501
|
+
high: DecimalString;
|
|
1502
|
+
low: DecimalString;
|
|
1503
|
+
close: DecimalString;
|
|
1504
|
+
volume: DecimalString;
|
|
1505
|
+
trades: number;
|
|
1506
|
+
}, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
|
|
1507
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1508
|
+
instrumentId: PerpsInstrumentId;
|
|
1509
|
+
symbol: string | undefined;
|
|
1510
|
+
volume: DecimalString;
|
|
1511
|
+
openPrice: DecimalString;
|
|
1512
|
+
klines: {
|
|
1513
|
+
timestamp: EpochMilliseconds;
|
|
1514
|
+
open: DecimalString;
|
|
1515
|
+
high: DecimalString;
|
|
1516
|
+
low: DecimalString;
|
|
1517
|
+
close: DecimalString;
|
|
1518
|
+
volume: DecimalString;
|
|
1519
|
+
trades: number;
|
|
1520
|
+
}[];
|
|
1521
|
+
}, {
|
|
1522
|
+
instrument_id: PerpsInstrumentId;
|
|
1523
|
+
volume: DecimalString;
|
|
1524
|
+
open_price: DecimalString;
|
|
1525
|
+
klines: {
|
|
1526
|
+
timestamp: EpochMilliseconds;
|
|
1527
|
+
open: DecimalString;
|
|
1528
|
+
high: DecimalString;
|
|
1529
|
+
low: DecimalString;
|
|
1530
|
+
close: DecimalString;
|
|
1531
|
+
volume: DecimalString;
|
|
1532
|
+
trades: number;
|
|
1533
|
+
}[];
|
|
1534
|
+
symbol?: string | undefined;
|
|
1535
|
+
}>>>;
|
|
1536
|
+
/**
|
|
1537
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1538
|
+
*/
|
|
1539
|
+
declare const PerpsStatisticUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
1540
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1541
|
+
vol: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1542
|
+
open: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1543
|
+
klines: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
|
|
1544
|
+
timestamp: EpochMilliseconds;
|
|
1545
|
+
open: DecimalString;
|
|
1546
|
+
high: DecimalString;
|
|
1547
|
+
low: DecimalString;
|
|
1548
|
+
close: DecimalString;
|
|
1549
|
+
volume: DecimalString;
|
|
1550
|
+
trades: number;
|
|
1551
|
+
}, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
|
|
1552
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1553
|
+
instrumentId: PerpsInstrumentId;
|
|
1554
|
+
volume: DecimalString;
|
|
1555
|
+
openPrice: DecimalString;
|
|
1556
|
+
klines: {
|
|
1557
|
+
timestamp: EpochMilliseconds;
|
|
1558
|
+
open: DecimalString;
|
|
1559
|
+
high: DecimalString;
|
|
1560
|
+
low: DecimalString;
|
|
1561
|
+
close: DecimalString;
|
|
1562
|
+
volume: DecimalString;
|
|
1563
|
+
trades: number;
|
|
1564
|
+
}[];
|
|
1565
|
+
}, {
|
|
1566
|
+
iid: PerpsInstrumentId;
|
|
1567
|
+
vol: DecimalString;
|
|
1568
|
+
open: DecimalString;
|
|
1569
|
+
klines: {
|
|
1570
|
+
timestamp: EpochMilliseconds;
|
|
1571
|
+
open: DecimalString;
|
|
1572
|
+
high: DecimalString;
|
|
1573
|
+
low: DecimalString;
|
|
1574
|
+
close: DecimalString;
|
|
1575
|
+
volume: DecimalString;
|
|
1576
|
+
trades: number;
|
|
1577
|
+
}[];
|
|
1578
|
+
}>>;
|
|
1579
|
+
/**
|
|
1580
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1581
|
+
*/
|
|
1582
|
+
declare const PerpsBookLevelSchema: z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
1583
|
+
price: DecimalString;
|
|
1584
|
+
quantity: DecimalString;
|
|
1585
|
+
}, [DecimalString, DecimalString]>>;
|
|
1586
|
+
/**
|
|
1587
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1588
|
+
*/
|
|
1589
|
+
type PerpsBookLevel = z.infer<typeof PerpsBookLevelSchema>;
|
|
1590
|
+
/**
|
|
1591
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1592
|
+
*/
|
|
1593
|
+
declare const PerpsBookSchema: z.ZodPipe<z.ZodObject<{
|
|
1594
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1595
|
+
bids: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
1596
|
+
price: DecimalString;
|
|
1597
|
+
quantity: DecimalString;
|
|
1598
|
+
}, [DecimalString, DecimalString]>>>;
|
|
1599
|
+
asks: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
1600
|
+
price: DecimalString;
|
|
1601
|
+
quantity: DecimalString;
|
|
1602
|
+
}, [DecimalString, DecimalString]>>>;
|
|
1603
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1604
|
+
sequence: z.ZodNumber;
|
|
1605
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1606
|
+
instrumentId: PerpsInstrumentId;
|
|
1607
|
+
bids: {
|
|
1608
|
+
price: DecimalString;
|
|
1609
|
+
quantity: DecimalString;
|
|
1610
|
+
}[];
|
|
1611
|
+
asks: {
|
|
1612
|
+
price: DecimalString;
|
|
1613
|
+
quantity: DecimalString;
|
|
1614
|
+
}[];
|
|
1615
|
+
timestamp: EpochMilliseconds;
|
|
1616
|
+
sequence: number;
|
|
1617
|
+
}, {
|
|
1618
|
+
instrument_id: PerpsInstrumentId;
|
|
1619
|
+
bids: {
|
|
1620
|
+
price: DecimalString;
|
|
1621
|
+
quantity: DecimalString;
|
|
1622
|
+
}[];
|
|
1623
|
+
asks: {
|
|
1624
|
+
price: DecimalString;
|
|
1625
|
+
quantity: DecimalString;
|
|
1626
|
+
}[];
|
|
1627
|
+
timestamp: EpochMilliseconds;
|
|
1628
|
+
sequence: number;
|
|
1629
|
+
}>>;
|
|
1630
|
+
/**
|
|
1631
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1632
|
+
*/
|
|
1633
|
+
type PerpsBook = z.infer<typeof PerpsBookSchema>;
|
|
1634
|
+
/**
|
|
1635
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1636
|
+
*/
|
|
1637
|
+
declare const PerpsBookUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
1638
|
+
b: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
1639
|
+
price: DecimalString;
|
|
1640
|
+
quantity: DecimalString;
|
|
1641
|
+
}, [DecimalString, DecimalString]>>>;
|
|
1642
|
+
a: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>], null>, z.ZodTransform<{
|
|
1643
|
+
price: DecimalString;
|
|
1644
|
+
quantity: DecimalString;
|
|
1645
|
+
}, [DecimalString, DecimalString]>>>;
|
|
1646
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1647
|
+
bids: {
|
|
1648
|
+
price: DecimalString;
|
|
1649
|
+
quantity: DecimalString;
|
|
1650
|
+
}[];
|
|
1651
|
+
asks: {
|
|
1652
|
+
price: DecimalString;
|
|
1653
|
+
quantity: DecimalString;
|
|
1654
|
+
}[];
|
|
1655
|
+
}, {
|
|
1656
|
+
b: {
|
|
1657
|
+
price: DecimalString;
|
|
1658
|
+
quantity: DecimalString;
|
|
1659
|
+
}[];
|
|
1660
|
+
a: {
|
|
1661
|
+
price: DecimalString;
|
|
1662
|
+
quantity: DecimalString;
|
|
1663
|
+
}[];
|
|
1664
|
+
}>>;
|
|
1665
|
+
/**
|
|
1666
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1667
|
+
*/
|
|
1668
|
+
declare const PerpsBboSchema: z.ZodObject<{
|
|
1669
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1670
|
+
bidPrice: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1671
|
+
bidQuantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1672
|
+
askPrice: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1673
|
+
askQuantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1674
|
+
timestamp: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
1675
|
+
}, z.core.$strip>;
|
|
1676
|
+
/**
|
|
1677
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1678
|
+
*/
|
|
1679
|
+
type PerpsBbo = z.infer<typeof PerpsBboSchema>;
|
|
1680
|
+
/**
|
|
1681
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1682
|
+
*/
|
|
1683
|
+
declare const PerpsBboUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
1684
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1685
|
+
bp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1686
|
+
bq: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1687
|
+
ap: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1688
|
+
aq: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1689
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1690
|
+
instrumentId: PerpsInstrumentId;
|
|
1691
|
+
bidPrice: DecimalString;
|
|
1692
|
+
bidQuantity: DecimalString;
|
|
1693
|
+
askPrice: DecimalString;
|
|
1694
|
+
askQuantity: DecimalString;
|
|
1695
|
+
}, {
|
|
1696
|
+
iid: PerpsInstrumentId;
|
|
1697
|
+
bp: DecimalString;
|
|
1698
|
+
bq: DecimalString;
|
|
1699
|
+
ap: DecimalString;
|
|
1700
|
+
aq: DecimalString;
|
|
1701
|
+
}>>;
|
|
1702
|
+
/**
|
|
1703
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1704
|
+
*/
|
|
1705
|
+
declare const PerpsPublicTradeSchema: z.ZodPipe<z.ZodObject<{
|
|
1706
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
1707
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1708
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1709
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
1710
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1711
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1712
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1713
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
1714
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1715
|
+
tradeId: PerpsTradeId;
|
|
1716
|
+
instrumentId: PerpsInstrumentId;
|
|
1717
|
+
side: PerpsSide;
|
|
1718
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
1719
|
+
settlement: boolean;
|
|
1720
|
+
price: DecimalString;
|
|
1721
|
+
quantity: DecimalString;
|
|
1722
|
+
timestamp: EpochMilliseconds;
|
|
1723
|
+
hash: _kuest_types.TxHash | undefined;
|
|
1724
|
+
}, {
|
|
1725
|
+
trade_id: PerpsTradeId;
|
|
1726
|
+
instrument_id: PerpsInstrumentId;
|
|
1727
|
+
side: PerpsSide;
|
|
1728
|
+
settlement: boolean;
|
|
1729
|
+
price: DecimalString;
|
|
1730
|
+
quantity: DecimalString;
|
|
1731
|
+
timestamp: EpochMilliseconds;
|
|
1732
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
1733
|
+
}>>;
|
|
1734
|
+
/**
|
|
1735
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1736
|
+
*/
|
|
1737
|
+
type PerpsPublicTrade = z.infer<typeof PerpsPublicTradeSchema>;
|
|
1738
|
+
/**
|
|
1739
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1740
|
+
*/
|
|
1741
|
+
declare const PerpsPublicTradeUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
1742
|
+
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
1743
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1744
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1745
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
1746
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1747
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1748
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1749
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
1750
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1751
|
+
tradeId: PerpsTradeId;
|
|
1752
|
+
instrumentId: PerpsInstrumentId;
|
|
1753
|
+
side: PerpsSide;
|
|
1754
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
1755
|
+
settlement: boolean;
|
|
1756
|
+
price: DecimalString;
|
|
1757
|
+
quantity: DecimalString;
|
|
1758
|
+
timestamp: EpochMilliseconds;
|
|
1759
|
+
hash: _kuest_types.TxHash | undefined;
|
|
1760
|
+
}, {
|
|
1761
|
+
tid: PerpsTradeId;
|
|
1762
|
+
iid: PerpsInstrumentId;
|
|
1763
|
+
side: PerpsSide;
|
|
1764
|
+
settlement: boolean;
|
|
1765
|
+
p: DecimalString;
|
|
1766
|
+
qty: DecimalString;
|
|
1767
|
+
ts: EpochMilliseconds;
|
|
1768
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
1769
|
+
}>>;
|
|
1770
|
+
/**
|
|
1771
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1772
|
+
*/
|
|
1773
|
+
declare const FetchPerpsTradesResponseSchema: z.ZodObject<{
|
|
1774
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1775
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
1776
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1777
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1778
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
1779
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1780
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1781
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1782
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
1783
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1784
|
+
tradeId: PerpsTradeId;
|
|
1785
|
+
instrumentId: PerpsInstrumentId;
|
|
1786
|
+
side: PerpsSide;
|
|
1787
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
1788
|
+
settlement: boolean;
|
|
1789
|
+
price: DecimalString;
|
|
1790
|
+
quantity: DecimalString;
|
|
1791
|
+
timestamp: EpochMilliseconds;
|
|
1792
|
+
hash: _kuest_types.TxHash | undefined;
|
|
1793
|
+
}, {
|
|
1794
|
+
trade_id: PerpsTradeId;
|
|
1795
|
+
instrument_id: PerpsInstrumentId;
|
|
1796
|
+
side: PerpsSide;
|
|
1797
|
+
settlement: boolean;
|
|
1798
|
+
price: DecimalString;
|
|
1799
|
+
quantity: DecimalString;
|
|
1800
|
+
timestamp: EpochMilliseconds;
|
|
1801
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
1802
|
+
}>>>;
|
|
1803
|
+
more: z.ZodBoolean;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
/**
|
|
1806
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1807
|
+
*/
|
|
1808
|
+
declare const PerpsFundingRateSchema: z.ZodPipe<z.ZodObject<{
|
|
1809
|
+
funding_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1810
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1811
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1812
|
+
fundingRate: DecimalString;
|
|
1813
|
+
timestamp: EpochMilliseconds;
|
|
1814
|
+
}, {
|
|
1815
|
+
funding_rate: DecimalString;
|
|
1816
|
+
timestamp: EpochMilliseconds;
|
|
1817
|
+
}>>;
|
|
1818
|
+
/**
|
|
1819
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1820
|
+
*/
|
|
1821
|
+
type PerpsFundingRate = z.infer<typeof PerpsFundingRateSchema>;
|
|
1822
|
+
/**
|
|
1823
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1824
|
+
*/
|
|
1825
|
+
declare const FetchPerpsFundingHistoryResponseSchema: z.ZodObject<{
|
|
1826
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1827
|
+
funding_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1828
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1829
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1830
|
+
fundingRate: DecimalString;
|
|
1831
|
+
timestamp: EpochMilliseconds;
|
|
1832
|
+
}, {
|
|
1833
|
+
funding_rate: DecimalString;
|
|
1834
|
+
timestamp: EpochMilliseconds;
|
|
1835
|
+
}>>>;
|
|
1836
|
+
more: z.ZodBoolean;
|
|
1837
|
+
}, z.core.$strip>;
|
|
1838
|
+
declare const PerpsFeeTierSchema: z.ZodPipe<z.ZodObject<{
|
|
1839
|
+
min_volume_30d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1840
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1841
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1842
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1843
|
+
minVolume30d: DecimalString;
|
|
1844
|
+
takerFeeRate: DecimalString;
|
|
1845
|
+
makerFeeRate: DecimalString;
|
|
1846
|
+
}, {
|
|
1847
|
+
min_volume_30d: DecimalString;
|
|
1848
|
+
taker_fee_rate: DecimalString;
|
|
1849
|
+
maker_fee_rate: DecimalString;
|
|
1850
|
+
}>>;
|
|
1851
|
+
type PerpsFeeTier = z.infer<typeof PerpsFeeTierSchema>;
|
|
1852
|
+
/**
|
|
1853
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1854
|
+
*/
|
|
1855
|
+
declare const PerpsFeeScheduleEntrySchema: z.ZodPipe<z.ZodObject<{
|
|
1856
|
+
instrument_type: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
1857
|
+
category: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
1858
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1859
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1860
|
+
tiers: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1861
|
+
min_volume_30d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1862
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1863
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1864
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1865
|
+
minVolume30d: DecimalString;
|
|
1866
|
+
takerFeeRate: DecimalString;
|
|
1867
|
+
makerFeeRate: DecimalString;
|
|
1868
|
+
}, {
|
|
1869
|
+
min_volume_30d: DecimalString;
|
|
1870
|
+
taker_fee_rate: DecimalString;
|
|
1871
|
+
maker_fee_rate: DecimalString;
|
|
1872
|
+
}>>>;
|
|
1873
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1874
|
+
category: PerpsInstrumentCategory;
|
|
1875
|
+
takerFeeRate: DecimalString;
|
|
1876
|
+
makerFeeRate: DecimalString;
|
|
1877
|
+
tiers: {
|
|
1878
|
+
minVolume30d: DecimalString;
|
|
1879
|
+
takerFeeRate: DecimalString;
|
|
1880
|
+
makerFeeRate: DecimalString;
|
|
1881
|
+
}[];
|
|
1882
|
+
}, {
|
|
1883
|
+
instrument_type: PerpsInstrumentType.Perpetual;
|
|
1884
|
+
category: PerpsInstrumentCategory;
|
|
1885
|
+
taker_fee_rate: DecimalString;
|
|
1886
|
+
maker_fee_rate: DecimalString;
|
|
1887
|
+
tiers: {
|
|
1888
|
+
minVolume30d: DecimalString;
|
|
1889
|
+
takerFeeRate: DecimalString;
|
|
1890
|
+
makerFeeRate: DecimalString;
|
|
1891
|
+
}[];
|
|
1892
|
+
}>>;
|
|
1893
|
+
/**
|
|
1894
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1895
|
+
*/
|
|
1896
|
+
type PerpsFeeScheduleEntry = z.infer<typeof PerpsFeeScheduleEntrySchema>;
|
|
1897
|
+
/**
|
|
1898
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1899
|
+
*/
|
|
1900
|
+
declare const PerpsFeesInfoSchema: z.ZodPipe<z.ZodObject<{
|
|
1901
|
+
fee_schedule: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1902
|
+
instrument_type: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
1903
|
+
category: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
1904
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1905
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1906
|
+
tiers: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1907
|
+
min_volume_30d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1908
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1909
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1910
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1911
|
+
minVolume30d: DecimalString;
|
|
1912
|
+
takerFeeRate: DecimalString;
|
|
1913
|
+
makerFeeRate: DecimalString;
|
|
1914
|
+
}, {
|
|
1915
|
+
min_volume_30d: DecimalString;
|
|
1916
|
+
taker_fee_rate: DecimalString;
|
|
1917
|
+
maker_fee_rate: DecimalString;
|
|
1918
|
+
}>>>;
|
|
1919
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1920
|
+
category: PerpsInstrumentCategory;
|
|
1921
|
+
takerFeeRate: DecimalString;
|
|
1922
|
+
makerFeeRate: DecimalString;
|
|
1923
|
+
tiers: {
|
|
1924
|
+
minVolume30d: DecimalString;
|
|
1925
|
+
takerFeeRate: DecimalString;
|
|
1926
|
+
makerFeeRate: DecimalString;
|
|
1927
|
+
}[];
|
|
1928
|
+
}, {
|
|
1929
|
+
instrument_type: PerpsInstrumentType.Perpetual;
|
|
1930
|
+
category: PerpsInstrumentCategory;
|
|
1931
|
+
taker_fee_rate: DecimalString;
|
|
1932
|
+
maker_fee_rate: DecimalString;
|
|
1933
|
+
tiers: {
|
|
1934
|
+
minVolume30d: DecimalString;
|
|
1935
|
+
takerFeeRate: DecimalString;
|
|
1936
|
+
makerFeeRate: DecimalString;
|
|
1937
|
+
}[];
|
|
1938
|
+
}>>>;
|
|
1939
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1940
|
+
feeSchedule: {
|
|
1941
|
+
category: PerpsInstrumentCategory;
|
|
1942
|
+
takerFeeRate: DecimalString;
|
|
1943
|
+
makerFeeRate: DecimalString;
|
|
1944
|
+
tiers: {
|
|
1945
|
+
minVolume30d: DecimalString;
|
|
1946
|
+
takerFeeRate: DecimalString;
|
|
1947
|
+
makerFeeRate: DecimalString;
|
|
1948
|
+
}[];
|
|
1949
|
+
}[];
|
|
1950
|
+
}, {
|
|
1951
|
+
fee_schedule: {
|
|
1952
|
+
category: PerpsInstrumentCategory;
|
|
1953
|
+
takerFeeRate: DecimalString;
|
|
1954
|
+
makerFeeRate: DecimalString;
|
|
1955
|
+
tiers: {
|
|
1956
|
+
minVolume30d: DecimalString;
|
|
1957
|
+
takerFeeRate: DecimalString;
|
|
1958
|
+
makerFeeRate: DecimalString;
|
|
1959
|
+
}[];
|
|
1960
|
+
}[];
|
|
1961
|
+
}>>;
|
|
1962
|
+
/**
|
|
1963
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1964
|
+
*/
|
|
1965
|
+
type PerpsFeesInfo = z.infer<typeof PerpsFeesInfoSchema>;
|
|
1966
|
+
/**
|
|
1967
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1968
|
+
*/
|
|
1969
|
+
declare const FetchPerpsFeesResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
1970
|
+
fee_schedule: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1971
|
+
instrument_type: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
1972
|
+
category: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
1973
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1974
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1975
|
+
tiers: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1976
|
+
min_volume_30d: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1977
|
+
taker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1978
|
+
maker_fee_rate: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1979
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1980
|
+
minVolume30d: DecimalString;
|
|
1981
|
+
takerFeeRate: DecimalString;
|
|
1982
|
+
makerFeeRate: DecimalString;
|
|
1983
|
+
}, {
|
|
1984
|
+
min_volume_30d: DecimalString;
|
|
1985
|
+
taker_fee_rate: DecimalString;
|
|
1986
|
+
maker_fee_rate: DecimalString;
|
|
1987
|
+
}>>>;
|
|
1988
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1989
|
+
category: PerpsInstrumentCategory;
|
|
1990
|
+
takerFeeRate: DecimalString;
|
|
1991
|
+
makerFeeRate: DecimalString;
|
|
1992
|
+
tiers: {
|
|
1993
|
+
minVolume30d: DecimalString;
|
|
1994
|
+
takerFeeRate: DecimalString;
|
|
1995
|
+
makerFeeRate: DecimalString;
|
|
1996
|
+
}[];
|
|
1997
|
+
}, {
|
|
1998
|
+
instrument_type: PerpsInstrumentType.Perpetual;
|
|
1999
|
+
category: PerpsInstrumentCategory;
|
|
2000
|
+
taker_fee_rate: DecimalString;
|
|
2001
|
+
maker_fee_rate: DecimalString;
|
|
2002
|
+
tiers: {
|
|
2003
|
+
minVolume30d: DecimalString;
|
|
2004
|
+
takerFeeRate: DecimalString;
|
|
2005
|
+
makerFeeRate: DecimalString;
|
|
2006
|
+
}[];
|
|
2007
|
+
}>>>;
|
|
2008
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2009
|
+
feeSchedule: {
|
|
2010
|
+
category: PerpsInstrumentCategory;
|
|
2011
|
+
takerFeeRate: DecimalString;
|
|
2012
|
+
makerFeeRate: DecimalString;
|
|
2013
|
+
tiers: {
|
|
2014
|
+
minVolume30d: DecimalString;
|
|
2015
|
+
takerFeeRate: DecimalString;
|
|
2016
|
+
makerFeeRate: DecimalString;
|
|
2017
|
+
}[];
|
|
2018
|
+
}[];
|
|
2019
|
+
}, {
|
|
2020
|
+
fee_schedule: {
|
|
2021
|
+
category: PerpsInstrumentCategory;
|
|
2022
|
+
takerFeeRate: DecimalString;
|
|
2023
|
+
makerFeeRate: DecimalString;
|
|
2024
|
+
tiers: {
|
|
2025
|
+
minVolume30d: DecimalString;
|
|
2026
|
+
takerFeeRate: DecimalString;
|
|
2027
|
+
makerFeeRate: DecimalString;
|
|
2028
|
+
}[];
|
|
2029
|
+
}[];
|
|
2030
|
+
}>>;
|
|
2031
|
+
/**
|
|
2032
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2033
|
+
*/
|
|
2034
|
+
declare const FetchPerpsCandlesResponseSchema: z.ZodObject<{
|
|
2035
|
+
data: z.ZodArray<z.ZodPipe<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodNumber], null>, z.ZodTransform<{
|
|
2036
|
+
timestamp: EpochMilliseconds;
|
|
2037
|
+
open: DecimalString;
|
|
2038
|
+
high: DecimalString;
|
|
2039
|
+
low: DecimalString;
|
|
2040
|
+
close: DecimalString;
|
|
2041
|
+
volume: DecimalString;
|
|
2042
|
+
trades: number;
|
|
2043
|
+
}, [EpochMilliseconds, DecimalString, DecimalString, DecimalString, DecimalString, DecimalString, number]>>>;
|
|
2044
|
+
more: z.ZodBoolean;
|
|
2045
|
+
}, z.core.$strip>;
|
|
2046
|
+
|
|
2047
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2048
|
+
declare enum PerpsPositionSnapshotStatus {
|
|
2049
|
+
Ok = "ok",
|
|
2050
|
+
NotFound = "not_found",
|
|
2051
|
+
HistoryPending = "history_pending",
|
|
2052
|
+
HistoryLimit = "history_limit",
|
|
2053
|
+
ResourceLimit = "resource_limit",
|
|
2054
|
+
TemporarilyUnavailable = "temporarily_unavailable",
|
|
2055
|
+
Unavailable = "unavailable"
|
|
2056
|
+
}
|
|
2057
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2058
|
+
declare enum PerpsPositionSnapshotMarkerKind {
|
|
2059
|
+
Increase = "increase",
|
|
2060
|
+
Decrease = "decrease"
|
|
2061
|
+
}
|
|
2062
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2063
|
+
declare const PerpsPositionSnapshotCandleSchema: z.ZodObject<{
|
|
2064
|
+
position: z.ZodNumber;
|
|
2065
|
+
open: z.ZodNumber;
|
|
2066
|
+
high: z.ZodNumber;
|
|
2067
|
+
low: z.ZodNumber;
|
|
2068
|
+
close: z.ZodNumber;
|
|
2069
|
+
}, z.core.$strip>;
|
|
2070
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2071
|
+
type PerpsPositionSnapshotCandle = z.infer<typeof PerpsPositionSnapshotCandleSchema>;
|
|
2072
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2073
|
+
declare const PerpsPositionSnapshotMarkerSchema: z.ZodObject<{
|
|
2074
|
+
position: z.ZodNumber;
|
|
2075
|
+
kind: z.ZodEnum<typeof PerpsPositionSnapshotMarkerKind>;
|
|
2076
|
+
}, z.core.$strip>;
|
|
2077
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2078
|
+
type PerpsPositionSnapshotMarker = z.infer<typeof PerpsPositionSnapshotMarkerSchema>;
|
|
2079
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2080
|
+
declare const PerpsPositionSnapshotChartSchema: z.ZodObject<{
|
|
2081
|
+
candles: z.ZodArray<z.ZodObject<{
|
|
2082
|
+
position: z.ZodNumber;
|
|
2083
|
+
open: z.ZodNumber;
|
|
2084
|
+
high: z.ZodNumber;
|
|
2085
|
+
low: z.ZodNumber;
|
|
2086
|
+
close: z.ZodNumber;
|
|
2087
|
+
}, z.core.$strip>>;
|
|
2088
|
+
markers: z.ZodArray<z.ZodObject<{
|
|
2089
|
+
position: z.ZodNumber;
|
|
2090
|
+
kind: z.ZodEnum<typeof PerpsPositionSnapshotMarkerKind>;
|
|
2091
|
+
}, z.core.$strip>>;
|
|
2092
|
+
}, z.core.$strip>;
|
|
2093
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2094
|
+
type PerpsPositionSnapshotChart = z.infer<typeof PerpsPositionSnapshotChartSchema>;
|
|
2095
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2096
|
+
declare const PerpsPositionSnapshotSchema: z.ZodPipe<z.ZodObject<{
|
|
2097
|
+
position_cycle_id: z.ZodString;
|
|
2098
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2099
|
+
started_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2100
|
+
as_of_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2101
|
+
is_closed: z.ZodBoolean;
|
|
2102
|
+
size_after: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2103
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2104
|
+
as_of_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2105
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2106
|
+
pnl_percent: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2107
|
+
leverage: z.ZodNullable<z.ZodNumber>;
|
|
2108
|
+
chart: z.ZodObject<{
|
|
2109
|
+
candles: z.ZodArray<z.ZodObject<{
|
|
2110
|
+
position: z.ZodNumber;
|
|
2111
|
+
open: z.ZodNumber;
|
|
2112
|
+
high: z.ZodNumber;
|
|
2113
|
+
low: z.ZodNumber;
|
|
2114
|
+
close: z.ZodNumber;
|
|
2115
|
+
}, z.core.$strip>>;
|
|
2116
|
+
markers: z.ZodArray<z.ZodObject<{
|
|
2117
|
+
position: z.ZodNumber;
|
|
2118
|
+
kind: z.ZodEnum<typeof PerpsPositionSnapshotMarkerKind>;
|
|
2119
|
+
}, z.core.$strip>>;
|
|
2120
|
+
}, z.core.$strip>;
|
|
2121
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2122
|
+
positionCycleId: string;
|
|
2123
|
+
side: PerpsSide;
|
|
2124
|
+
startedAt: EpochMilliseconds;
|
|
2125
|
+
asOfAt: EpochMilliseconds;
|
|
2126
|
+
isClosed: boolean;
|
|
2127
|
+
sizeAfter: DecimalString;
|
|
2128
|
+
entryPrice: DecimalString;
|
|
2129
|
+
asOfPrice: DecimalString;
|
|
2130
|
+
pnl: DecimalString;
|
|
2131
|
+
pnlPercent: DecimalString | null;
|
|
2132
|
+
leverage: number | null;
|
|
2133
|
+
chart: {
|
|
2134
|
+
candles: {
|
|
2135
|
+
position: number;
|
|
2136
|
+
open: number;
|
|
2137
|
+
high: number;
|
|
2138
|
+
low: number;
|
|
2139
|
+
close: number;
|
|
2140
|
+
}[];
|
|
2141
|
+
markers: {
|
|
2142
|
+
position: number;
|
|
2143
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2144
|
+
}[];
|
|
2145
|
+
};
|
|
2146
|
+
}, {
|
|
2147
|
+
position_cycle_id: string;
|
|
2148
|
+
side: PerpsSide;
|
|
2149
|
+
started_at: EpochMilliseconds;
|
|
2150
|
+
as_of_at: EpochMilliseconds;
|
|
2151
|
+
is_closed: boolean;
|
|
2152
|
+
size_after: DecimalString;
|
|
2153
|
+
entry_price: DecimalString;
|
|
2154
|
+
as_of_price: DecimalString;
|
|
2155
|
+
pnl: DecimalString;
|
|
2156
|
+
pnl_percent: DecimalString | null;
|
|
2157
|
+
leverage: number | null;
|
|
2158
|
+
chart: {
|
|
2159
|
+
candles: {
|
|
2160
|
+
position: number;
|
|
2161
|
+
open: number;
|
|
2162
|
+
high: number;
|
|
2163
|
+
low: number;
|
|
2164
|
+
close: number;
|
|
2165
|
+
}[];
|
|
2166
|
+
markers: {
|
|
2167
|
+
position: number;
|
|
2168
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2169
|
+
}[];
|
|
2170
|
+
};
|
|
2171
|
+
}>>;
|
|
2172
|
+
/** A position cycle valued at captured state or immediately after a selected fill.
|
|
2173
|
+
* @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2174
|
+
type PerpsPositionSnapshot = z.infer<typeof PerpsPositionSnapshotSchema>;
|
|
2175
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2176
|
+
type PerpsPositionSnapshotResult = {
|
|
2177
|
+
instrumentId: PerpsInstrumentId;
|
|
2178
|
+
tradeId?: string;
|
|
2179
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2180
|
+
snapshot: PerpsPositionSnapshot;
|
|
2181
|
+
} | {
|
|
2182
|
+
instrumentId: PerpsInstrumentId;
|
|
2183
|
+
tradeId?: string;
|
|
2184
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2185
|
+
};
|
|
2186
|
+
declare const HistoryResultSchema: z.ZodPipe<z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2187
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2188
|
+
trade_id: z.ZodOptional<z.ZodString>;
|
|
2189
|
+
status: z.ZodLiteral<PerpsPositionSnapshotStatus.Ok>;
|
|
2190
|
+
snapshot: z.ZodPipe<z.ZodObject<{
|
|
2191
|
+
position_cycle_id: z.ZodString;
|
|
2192
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2193
|
+
started_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2194
|
+
as_of_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2195
|
+
is_closed: z.ZodBoolean;
|
|
2196
|
+
size_after: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2197
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2198
|
+
as_of_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2199
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2200
|
+
pnl_percent: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2201
|
+
leverage: z.ZodNullable<z.ZodNumber>;
|
|
2202
|
+
chart: z.ZodObject<{
|
|
2203
|
+
candles: z.ZodArray<z.ZodObject<{
|
|
2204
|
+
position: z.ZodNumber;
|
|
2205
|
+
open: z.ZodNumber;
|
|
2206
|
+
high: z.ZodNumber;
|
|
2207
|
+
low: z.ZodNumber;
|
|
2208
|
+
close: z.ZodNumber;
|
|
2209
|
+
}, z.core.$strip>>;
|
|
2210
|
+
markers: z.ZodArray<z.ZodObject<{
|
|
2211
|
+
position: z.ZodNumber;
|
|
2212
|
+
kind: z.ZodEnum<typeof PerpsPositionSnapshotMarkerKind>;
|
|
2213
|
+
}, z.core.$strip>>;
|
|
2214
|
+
}, z.core.$strip>;
|
|
2215
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2216
|
+
positionCycleId: string;
|
|
2217
|
+
side: PerpsSide;
|
|
2218
|
+
startedAt: EpochMilliseconds;
|
|
2219
|
+
asOfAt: EpochMilliseconds;
|
|
2220
|
+
isClosed: boolean;
|
|
2221
|
+
sizeAfter: DecimalString;
|
|
2222
|
+
entryPrice: DecimalString;
|
|
2223
|
+
asOfPrice: DecimalString;
|
|
2224
|
+
pnl: DecimalString;
|
|
2225
|
+
pnlPercent: DecimalString | null;
|
|
2226
|
+
leverage: number | null;
|
|
2227
|
+
chart: {
|
|
2228
|
+
candles: {
|
|
2229
|
+
position: number;
|
|
2230
|
+
open: number;
|
|
2231
|
+
high: number;
|
|
2232
|
+
low: number;
|
|
2233
|
+
close: number;
|
|
2234
|
+
}[];
|
|
2235
|
+
markers: {
|
|
2236
|
+
position: number;
|
|
2237
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2238
|
+
}[];
|
|
2239
|
+
};
|
|
2240
|
+
}, {
|
|
2241
|
+
position_cycle_id: string;
|
|
2242
|
+
side: PerpsSide;
|
|
2243
|
+
started_at: EpochMilliseconds;
|
|
2244
|
+
as_of_at: EpochMilliseconds;
|
|
2245
|
+
is_closed: boolean;
|
|
2246
|
+
size_after: DecimalString;
|
|
2247
|
+
entry_price: DecimalString;
|
|
2248
|
+
as_of_price: DecimalString;
|
|
2249
|
+
pnl: DecimalString;
|
|
2250
|
+
pnl_percent: DecimalString | null;
|
|
2251
|
+
leverage: number | null;
|
|
2252
|
+
chart: {
|
|
2253
|
+
candles: {
|
|
2254
|
+
position: number;
|
|
2255
|
+
open: number;
|
|
2256
|
+
high: number;
|
|
2257
|
+
low: number;
|
|
2258
|
+
close: number;
|
|
2259
|
+
}[];
|
|
2260
|
+
markers: {
|
|
2261
|
+
position: number;
|
|
2262
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2263
|
+
}[];
|
|
2264
|
+
};
|
|
2265
|
+
}>>;
|
|
2266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2267
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2268
|
+
trade_id: z.ZodOptional<z.ZodString>;
|
|
2269
|
+
status: z.ZodEnum<{
|
|
2270
|
+
readonly NotFound: PerpsPositionSnapshotStatus.NotFound;
|
|
2271
|
+
readonly HistoryPending: PerpsPositionSnapshotStatus.HistoryPending;
|
|
2272
|
+
readonly HistoryLimit: PerpsPositionSnapshotStatus.HistoryLimit;
|
|
2273
|
+
readonly ResourceLimit: PerpsPositionSnapshotStatus.ResourceLimit;
|
|
2274
|
+
readonly TemporarilyUnavailable: PerpsPositionSnapshotStatus.TemporarilyUnavailable;
|
|
2275
|
+
readonly Unavailable: PerpsPositionSnapshotStatus.Unavailable;
|
|
2276
|
+
}>;
|
|
2277
|
+
snapshot: z.ZodOptional<z.ZodNever>;
|
|
2278
|
+
}, z.core.$strip>], "status">, z.ZodTransform<{
|
|
2279
|
+
instrumentId: PerpsInstrumentId;
|
|
2280
|
+
tradeId?: string;
|
|
2281
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2282
|
+
snapshot: PerpsPositionSnapshot;
|
|
2283
|
+
} | {
|
|
2284
|
+
instrumentId: PerpsInstrumentId;
|
|
2285
|
+
tradeId?: string;
|
|
2286
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2287
|
+
}, {
|
|
2288
|
+
instrument_id: PerpsInstrumentId;
|
|
2289
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2290
|
+
snapshot: {
|
|
2291
|
+
positionCycleId: string;
|
|
2292
|
+
side: PerpsSide;
|
|
2293
|
+
startedAt: EpochMilliseconds;
|
|
2294
|
+
asOfAt: EpochMilliseconds;
|
|
2295
|
+
isClosed: boolean;
|
|
2296
|
+
sizeAfter: DecimalString;
|
|
2297
|
+
entryPrice: DecimalString;
|
|
2298
|
+
asOfPrice: DecimalString;
|
|
2299
|
+
pnl: DecimalString;
|
|
2300
|
+
pnlPercent: DecimalString | null;
|
|
2301
|
+
leverage: number | null;
|
|
2302
|
+
chart: {
|
|
2303
|
+
candles: {
|
|
2304
|
+
position: number;
|
|
2305
|
+
open: number;
|
|
2306
|
+
high: number;
|
|
2307
|
+
low: number;
|
|
2308
|
+
close: number;
|
|
2309
|
+
}[];
|
|
2310
|
+
markers: {
|
|
2311
|
+
position: number;
|
|
2312
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2313
|
+
}[];
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
trade_id?: string | undefined;
|
|
2317
|
+
} | {
|
|
2318
|
+
instrument_id: PerpsInstrumentId;
|
|
2319
|
+
status: PerpsPositionSnapshotStatus.NotFound | PerpsPositionSnapshotStatus.HistoryPending | PerpsPositionSnapshotStatus.HistoryLimit | PerpsPositionSnapshotStatus.ResourceLimit | PerpsPositionSnapshotStatus.TemporarilyUnavailable | PerpsPositionSnapshotStatus.Unavailable;
|
|
2320
|
+
trade_id?: string | undefined;
|
|
2321
|
+
snapshot?: undefined;
|
|
2322
|
+
}>>, z.ZodTransform<{
|
|
2323
|
+
tradeId: string;
|
|
2324
|
+
instrumentId: PerpsInstrumentId;
|
|
2325
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2326
|
+
snapshot: PerpsPositionSnapshot;
|
|
2327
|
+
} | {
|
|
2328
|
+
tradeId: string;
|
|
2329
|
+
instrumentId: PerpsInstrumentId;
|
|
2330
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2331
|
+
}, {
|
|
2332
|
+
instrumentId: PerpsInstrumentId;
|
|
2333
|
+
tradeId?: string;
|
|
2334
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2335
|
+
snapshot: PerpsPositionSnapshot;
|
|
2336
|
+
} | {
|
|
2337
|
+
instrumentId: PerpsInstrumentId;
|
|
2338
|
+
tradeId?: string;
|
|
2339
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2340
|
+
}>>;
|
|
2341
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2342
|
+
type PerpsHistoricalPositionSnapshotResult = z.infer<typeof HistoryResultSchema>;
|
|
2343
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2344
|
+
declare const PerpsPositionSnapshotsSchema: z.ZodPipe<z.ZodObject<{
|
|
2345
|
+
history_as_of_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2346
|
+
active: z.ZodArray<z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2347
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2348
|
+
trade_id: z.ZodOptional<z.ZodString>;
|
|
2349
|
+
status: z.ZodLiteral<PerpsPositionSnapshotStatus.Ok>;
|
|
2350
|
+
snapshot: z.ZodPipe<z.ZodObject<{
|
|
2351
|
+
position_cycle_id: z.ZodString;
|
|
2352
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2353
|
+
started_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2354
|
+
as_of_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2355
|
+
is_closed: z.ZodBoolean;
|
|
2356
|
+
size_after: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2357
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2358
|
+
as_of_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2359
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2360
|
+
pnl_percent: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2361
|
+
leverage: z.ZodNullable<z.ZodNumber>;
|
|
2362
|
+
chart: z.ZodObject<{
|
|
2363
|
+
candles: z.ZodArray<z.ZodObject<{
|
|
2364
|
+
position: z.ZodNumber;
|
|
2365
|
+
open: z.ZodNumber;
|
|
2366
|
+
high: z.ZodNumber;
|
|
2367
|
+
low: z.ZodNumber;
|
|
2368
|
+
close: z.ZodNumber;
|
|
2369
|
+
}, z.core.$strip>>;
|
|
2370
|
+
markers: z.ZodArray<z.ZodObject<{
|
|
2371
|
+
position: z.ZodNumber;
|
|
2372
|
+
kind: z.ZodEnum<typeof PerpsPositionSnapshotMarkerKind>;
|
|
2373
|
+
}, z.core.$strip>>;
|
|
2374
|
+
}, z.core.$strip>;
|
|
2375
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2376
|
+
positionCycleId: string;
|
|
2377
|
+
side: PerpsSide;
|
|
2378
|
+
startedAt: EpochMilliseconds;
|
|
2379
|
+
asOfAt: EpochMilliseconds;
|
|
2380
|
+
isClosed: boolean;
|
|
2381
|
+
sizeAfter: DecimalString;
|
|
2382
|
+
entryPrice: DecimalString;
|
|
2383
|
+
asOfPrice: DecimalString;
|
|
2384
|
+
pnl: DecimalString;
|
|
2385
|
+
pnlPercent: DecimalString | null;
|
|
2386
|
+
leverage: number | null;
|
|
2387
|
+
chart: {
|
|
2388
|
+
candles: {
|
|
2389
|
+
position: number;
|
|
2390
|
+
open: number;
|
|
2391
|
+
high: number;
|
|
2392
|
+
low: number;
|
|
2393
|
+
close: number;
|
|
2394
|
+
}[];
|
|
2395
|
+
markers: {
|
|
2396
|
+
position: number;
|
|
2397
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2398
|
+
}[];
|
|
2399
|
+
};
|
|
2400
|
+
}, {
|
|
2401
|
+
position_cycle_id: string;
|
|
2402
|
+
side: PerpsSide;
|
|
2403
|
+
started_at: EpochMilliseconds;
|
|
2404
|
+
as_of_at: EpochMilliseconds;
|
|
2405
|
+
is_closed: boolean;
|
|
2406
|
+
size_after: DecimalString;
|
|
2407
|
+
entry_price: DecimalString;
|
|
2408
|
+
as_of_price: DecimalString;
|
|
2409
|
+
pnl: DecimalString;
|
|
2410
|
+
pnl_percent: DecimalString | null;
|
|
2411
|
+
leverage: number | null;
|
|
2412
|
+
chart: {
|
|
2413
|
+
candles: {
|
|
2414
|
+
position: number;
|
|
2415
|
+
open: number;
|
|
2416
|
+
high: number;
|
|
2417
|
+
low: number;
|
|
2418
|
+
close: number;
|
|
2419
|
+
}[];
|
|
2420
|
+
markers: {
|
|
2421
|
+
position: number;
|
|
2422
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2423
|
+
}[];
|
|
2424
|
+
};
|
|
2425
|
+
}>>;
|
|
2426
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2427
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2428
|
+
trade_id: z.ZodOptional<z.ZodString>;
|
|
2429
|
+
status: z.ZodEnum<{
|
|
2430
|
+
readonly NotFound: PerpsPositionSnapshotStatus.NotFound;
|
|
2431
|
+
readonly HistoryPending: PerpsPositionSnapshotStatus.HistoryPending;
|
|
2432
|
+
readonly HistoryLimit: PerpsPositionSnapshotStatus.HistoryLimit;
|
|
2433
|
+
readonly ResourceLimit: PerpsPositionSnapshotStatus.ResourceLimit;
|
|
2434
|
+
readonly TemporarilyUnavailable: PerpsPositionSnapshotStatus.TemporarilyUnavailable;
|
|
2435
|
+
readonly Unavailable: PerpsPositionSnapshotStatus.Unavailable;
|
|
2436
|
+
}>;
|
|
2437
|
+
snapshot: z.ZodOptional<z.ZodNever>;
|
|
2438
|
+
}, z.core.$strip>], "status">, z.ZodTransform<{
|
|
2439
|
+
instrumentId: PerpsInstrumentId;
|
|
2440
|
+
tradeId?: string;
|
|
2441
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2442
|
+
snapshot: PerpsPositionSnapshot;
|
|
2443
|
+
} | {
|
|
2444
|
+
instrumentId: PerpsInstrumentId;
|
|
2445
|
+
tradeId?: string;
|
|
2446
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2447
|
+
}, {
|
|
2448
|
+
instrument_id: PerpsInstrumentId;
|
|
2449
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2450
|
+
snapshot: {
|
|
2451
|
+
positionCycleId: string;
|
|
2452
|
+
side: PerpsSide;
|
|
2453
|
+
startedAt: EpochMilliseconds;
|
|
2454
|
+
asOfAt: EpochMilliseconds;
|
|
2455
|
+
isClosed: boolean;
|
|
2456
|
+
sizeAfter: DecimalString;
|
|
2457
|
+
entryPrice: DecimalString;
|
|
2458
|
+
asOfPrice: DecimalString;
|
|
2459
|
+
pnl: DecimalString;
|
|
2460
|
+
pnlPercent: DecimalString | null;
|
|
2461
|
+
leverage: number | null;
|
|
2462
|
+
chart: {
|
|
2463
|
+
candles: {
|
|
2464
|
+
position: number;
|
|
2465
|
+
open: number;
|
|
2466
|
+
high: number;
|
|
2467
|
+
low: number;
|
|
2468
|
+
close: number;
|
|
2469
|
+
}[];
|
|
2470
|
+
markers: {
|
|
2471
|
+
position: number;
|
|
2472
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2473
|
+
}[];
|
|
2474
|
+
};
|
|
2475
|
+
};
|
|
2476
|
+
trade_id?: string | undefined;
|
|
2477
|
+
} | {
|
|
2478
|
+
instrument_id: PerpsInstrumentId;
|
|
2479
|
+
status: PerpsPositionSnapshotStatus.NotFound | PerpsPositionSnapshotStatus.HistoryPending | PerpsPositionSnapshotStatus.HistoryLimit | PerpsPositionSnapshotStatus.ResourceLimit | PerpsPositionSnapshotStatus.TemporarilyUnavailable | PerpsPositionSnapshotStatus.Unavailable;
|
|
2480
|
+
trade_id?: string | undefined;
|
|
2481
|
+
snapshot?: undefined;
|
|
2482
|
+
}>>>;
|
|
2483
|
+
history: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2484
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2485
|
+
trade_id: z.ZodOptional<z.ZodString>;
|
|
2486
|
+
status: z.ZodLiteral<PerpsPositionSnapshotStatus.Ok>;
|
|
2487
|
+
snapshot: z.ZodPipe<z.ZodObject<{
|
|
2488
|
+
position_cycle_id: z.ZodString;
|
|
2489
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2490
|
+
started_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2491
|
+
as_of_at: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2492
|
+
is_closed: z.ZodBoolean;
|
|
2493
|
+
size_after: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2494
|
+
entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2495
|
+
as_of_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2496
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2497
|
+
pnl_percent: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2498
|
+
leverage: z.ZodNullable<z.ZodNumber>;
|
|
2499
|
+
chart: z.ZodObject<{
|
|
2500
|
+
candles: z.ZodArray<z.ZodObject<{
|
|
2501
|
+
position: z.ZodNumber;
|
|
2502
|
+
open: z.ZodNumber;
|
|
2503
|
+
high: z.ZodNumber;
|
|
2504
|
+
low: z.ZodNumber;
|
|
2505
|
+
close: z.ZodNumber;
|
|
2506
|
+
}, z.core.$strip>>;
|
|
2507
|
+
markers: z.ZodArray<z.ZodObject<{
|
|
2508
|
+
position: z.ZodNumber;
|
|
2509
|
+
kind: z.ZodEnum<typeof PerpsPositionSnapshotMarkerKind>;
|
|
2510
|
+
}, z.core.$strip>>;
|
|
2511
|
+
}, z.core.$strip>;
|
|
2512
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2513
|
+
positionCycleId: string;
|
|
2514
|
+
side: PerpsSide;
|
|
2515
|
+
startedAt: EpochMilliseconds;
|
|
2516
|
+
asOfAt: EpochMilliseconds;
|
|
2517
|
+
isClosed: boolean;
|
|
2518
|
+
sizeAfter: DecimalString;
|
|
2519
|
+
entryPrice: DecimalString;
|
|
2520
|
+
asOfPrice: DecimalString;
|
|
2521
|
+
pnl: DecimalString;
|
|
2522
|
+
pnlPercent: DecimalString | null;
|
|
2523
|
+
leverage: number | null;
|
|
2524
|
+
chart: {
|
|
2525
|
+
candles: {
|
|
2526
|
+
position: number;
|
|
2527
|
+
open: number;
|
|
2528
|
+
high: number;
|
|
2529
|
+
low: number;
|
|
2530
|
+
close: number;
|
|
2531
|
+
}[];
|
|
2532
|
+
markers: {
|
|
2533
|
+
position: number;
|
|
2534
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2535
|
+
}[];
|
|
2536
|
+
};
|
|
2537
|
+
}, {
|
|
2538
|
+
position_cycle_id: string;
|
|
2539
|
+
side: PerpsSide;
|
|
2540
|
+
started_at: EpochMilliseconds;
|
|
2541
|
+
as_of_at: EpochMilliseconds;
|
|
2542
|
+
is_closed: boolean;
|
|
2543
|
+
size_after: DecimalString;
|
|
2544
|
+
entry_price: DecimalString;
|
|
2545
|
+
as_of_price: DecimalString;
|
|
2546
|
+
pnl: DecimalString;
|
|
2547
|
+
pnl_percent: DecimalString | null;
|
|
2548
|
+
leverage: number | null;
|
|
2549
|
+
chart: {
|
|
2550
|
+
candles: {
|
|
2551
|
+
position: number;
|
|
2552
|
+
open: number;
|
|
2553
|
+
high: number;
|
|
2554
|
+
low: number;
|
|
2555
|
+
close: number;
|
|
2556
|
+
}[];
|
|
2557
|
+
markers: {
|
|
2558
|
+
position: number;
|
|
2559
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2560
|
+
}[];
|
|
2561
|
+
};
|
|
2562
|
+
}>>;
|
|
2563
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2564
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2565
|
+
trade_id: z.ZodOptional<z.ZodString>;
|
|
2566
|
+
status: z.ZodEnum<{
|
|
2567
|
+
readonly NotFound: PerpsPositionSnapshotStatus.NotFound;
|
|
2568
|
+
readonly HistoryPending: PerpsPositionSnapshotStatus.HistoryPending;
|
|
2569
|
+
readonly HistoryLimit: PerpsPositionSnapshotStatus.HistoryLimit;
|
|
2570
|
+
readonly ResourceLimit: PerpsPositionSnapshotStatus.ResourceLimit;
|
|
2571
|
+
readonly TemporarilyUnavailable: PerpsPositionSnapshotStatus.TemporarilyUnavailable;
|
|
2572
|
+
readonly Unavailable: PerpsPositionSnapshotStatus.Unavailable;
|
|
2573
|
+
}>;
|
|
2574
|
+
snapshot: z.ZodOptional<z.ZodNever>;
|
|
2575
|
+
}, z.core.$strip>], "status">, z.ZodTransform<{
|
|
2576
|
+
instrumentId: PerpsInstrumentId;
|
|
2577
|
+
tradeId?: string;
|
|
2578
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2579
|
+
snapshot: PerpsPositionSnapshot;
|
|
2580
|
+
} | {
|
|
2581
|
+
instrumentId: PerpsInstrumentId;
|
|
2582
|
+
tradeId?: string;
|
|
2583
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2584
|
+
}, {
|
|
2585
|
+
instrument_id: PerpsInstrumentId;
|
|
2586
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2587
|
+
snapshot: {
|
|
2588
|
+
positionCycleId: string;
|
|
2589
|
+
side: PerpsSide;
|
|
2590
|
+
startedAt: EpochMilliseconds;
|
|
2591
|
+
asOfAt: EpochMilliseconds;
|
|
2592
|
+
isClosed: boolean;
|
|
2593
|
+
sizeAfter: DecimalString;
|
|
2594
|
+
entryPrice: DecimalString;
|
|
2595
|
+
asOfPrice: DecimalString;
|
|
2596
|
+
pnl: DecimalString;
|
|
2597
|
+
pnlPercent: DecimalString | null;
|
|
2598
|
+
leverage: number | null;
|
|
2599
|
+
chart: {
|
|
2600
|
+
candles: {
|
|
2601
|
+
position: number;
|
|
2602
|
+
open: number;
|
|
2603
|
+
high: number;
|
|
2604
|
+
low: number;
|
|
2605
|
+
close: number;
|
|
2606
|
+
}[];
|
|
2607
|
+
markers: {
|
|
2608
|
+
position: number;
|
|
2609
|
+
kind: PerpsPositionSnapshotMarkerKind;
|
|
2610
|
+
}[];
|
|
2611
|
+
};
|
|
2612
|
+
};
|
|
2613
|
+
trade_id?: string | undefined;
|
|
2614
|
+
} | {
|
|
2615
|
+
instrument_id: PerpsInstrumentId;
|
|
2616
|
+
status: PerpsPositionSnapshotStatus.NotFound | PerpsPositionSnapshotStatus.HistoryPending | PerpsPositionSnapshotStatus.HistoryLimit | PerpsPositionSnapshotStatus.ResourceLimit | PerpsPositionSnapshotStatus.TemporarilyUnavailable | PerpsPositionSnapshotStatus.Unavailable;
|
|
2617
|
+
trade_id?: string | undefined;
|
|
2618
|
+
snapshot?: undefined;
|
|
2619
|
+
}>>, z.ZodTransform<{
|
|
2620
|
+
tradeId: string;
|
|
2621
|
+
instrumentId: PerpsInstrumentId;
|
|
2622
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2623
|
+
snapshot: PerpsPositionSnapshot;
|
|
2624
|
+
} | {
|
|
2625
|
+
tradeId: string;
|
|
2626
|
+
instrumentId: PerpsInstrumentId;
|
|
2627
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2628
|
+
}, {
|
|
2629
|
+
instrumentId: PerpsInstrumentId;
|
|
2630
|
+
tradeId?: string;
|
|
2631
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2632
|
+
snapshot: PerpsPositionSnapshot;
|
|
2633
|
+
} | {
|
|
2634
|
+
instrumentId: PerpsInstrumentId;
|
|
2635
|
+
tradeId?: string;
|
|
2636
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2637
|
+
}>>>;
|
|
2638
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2639
|
+
historyAsOfAt: EpochMilliseconds;
|
|
2640
|
+
active: ({
|
|
2641
|
+
instrumentId: PerpsInstrumentId;
|
|
2642
|
+
tradeId?: string;
|
|
2643
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2644
|
+
snapshot: PerpsPositionSnapshot;
|
|
2645
|
+
} | {
|
|
2646
|
+
instrumentId: PerpsInstrumentId;
|
|
2647
|
+
tradeId?: string;
|
|
2648
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2649
|
+
})[];
|
|
2650
|
+
history: ({
|
|
2651
|
+
tradeId: string;
|
|
2652
|
+
instrumentId: PerpsInstrumentId;
|
|
2653
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2654
|
+
snapshot: PerpsPositionSnapshot;
|
|
2655
|
+
} | {
|
|
2656
|
+
tradeId: string;
|
|
2657
|
+
instrumentId: PerpsInstrumentId;
|
|
2658
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2659
|
+
})[];
|
|
2660
|
+
}, {
|
|
2661
|
+
history_as_of_at: EpochMilliseconds;
|
|
2662
|
+
active: ({
|
|
2663
|
+
instrumentId: PerpsInstrumentId;
|
|
2664
|
+
tradeId?: string;
|
|
2665
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2666
|
+
snapshot: PerpsPositionSnapshot;
|
|
2667
|
+
} | {
|
|
2668
|
+
instrumentId: PerpsInstrumentId;
|
|
2669
|
+
tradeId?: string;
|
|
2670
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2671
|
+
})[];
|
|
2672
|
+
history: ({
|
|
2673
|
+
tradeId: string;
|
|
2674
|
+
instrumentId: PerpsInstrumentId;
|
|
2675
|
+
status: PerpsPositionSnapshotStatus.Ok;
|
|
2676
|
+
snapshot: PerpsPositionSnapshot;
|
|
2677
|
+
} | {
|
|
2678
|
+
tradeId: string;
|
|
2679
|
+
instrumentId: PerpsInstrumentId;
|
|
2680
|
+
status: Exclude<PerpsPositionSnapshotStatus, PerpsPositionSnapshotStatus.Ok>;
|
|
2681
|
+
})[];
|
|
2682
|
+
}>>;
|
|
2683
|
+
/** Ordered selections and the completed-history horizon. No pagination.
|
|
2684
|
+
* @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2685
|
+
type PerpsPositionSnapshots = z.infer<typeof PerpsPositionSnapshotsSchema>;
|
|
2686
|
+
|
|
2687
|
+
/**
|
|
2688
|
+
* Parses whether an address has a Perps account.
|
|
2689
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2690
|
+
*/
|
|
2691
|
+
declare const PerpsRegistrationResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
2692
|
+
registered: z.ZodBoolean;
|
|
2693
|
+
}, z.core.$strip>, z.ZodTransform<boolean, {
|
|
2694
|
+
registered: boolean;
|
|
2695
|
+
}>>;
|
|
2696
|
+
|
|
2697
|
+
/** Opaque run identity.
|
|
2698
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2699
|
+
*/
|
|
2700
|
+
type PerpsTwapId = number & {
|
|
2701
|
+
readonly __tag: 'PerpsTwapId';
|
|
2702
|
+
};
|
|
2703
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2704
|
+
declare const PerpsTwapIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTwapId, number>>;
|
|
2705
|
+
/** Active runs only; ended runs are absent from the active collection.
|
|
2706
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2707
|
+
*/
|
|
2708
|
+
declare enum PerpsTwapStatus {
|
|
2709
|
+
Running = "running",
|
|
2710
|
+
Paused = "paused"
|
|
2711
|
+
}
|
|
2712
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2713
|
+
declare const PerpsTwapSchema: z.ZodPipe<z.ZodObject<{
|
|
2714
|
+
twid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTwapId, number>>;
|
|
2715
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2716
|
+
buy: z.ZodBoolean;
|
|
2717
|
+
qty: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2718
|
+
fill: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2719
|
+
dur: z.ZodNumber;
|
|
2720
|
+
ivl: z.ZodNumber;
|
|
2721
|
+
rnd: z.ZodBoolean;
|
|
2722
|
+
slip_bps: z.ZodNumber;
|
|
2723
|
+
min_px: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2724
|
+
max_px: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2725
|
+
ro: z.ZodBoolean;
|
|
2726
|
+
st: z.ZodEnum<typeof PerpsTwapStatus>;
|
|
2727
|
+
slices: z.ZodNumber;
|
|
2728
|
+
slice_count: z.ZodNumber;
|
|
2729
|
+
sts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2730
|
+
ets: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2731
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2732
|
+
avg_px: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2733
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
2734
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2735
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2736
|
+
orderId?: PerpsOrderId | undefined;
|
|
2737
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
2738
|
+
averagePrice?: DecimalString | undefined;
|
|
2739
|
+
twapId: PerpsTwapId;
|
|
2740
|
+
instrumentId: PerpsInstrumentId;
|
|
2741
|
+
side: OrderSide;
|
|
2742
|
+
quantity: DecimalString;
|
|
2743
|
+
filledQuantity: DecimalString;
|
|
2744
|
+
durationMs: number;
|
|
2745
|
+
intervalMs: number;
|
|
2746
|
+
randomize: boolean;
|
|
2747
|
+
slippageBps: number;
|
|
2748
|
+
minPrice: DecimalString;
|
|
2749
|
+
maxPrice: DecimalString;
|
|
2750
|
+
reduceOnly: boolean;
|
|
2751
|
+
status: PerpsTwapStatus;
|
|
2752
|
+
slices: number;
|
|
2753
|
+
sliceCount: number;
|
|
2754
|
+
startedAt: EpochMilliseconds;
|
|
2755
|
+
endsAt: EpochMilliseconds;
|
|
2756
|
+
createdAt: EpochMilliseconds;
|
|
2757
|
+
}, {
|
|
2758
|
+
twid: PerpsTwapId;
|
|
2759
|
+
iid: PerpsInstrumentId;
|
|
2760
|
+
buy: boolean;
|
|
2761
|
+
qty: DecimalString;
|
|
2762
|
+
fill: DecimalString;
|
|
2763
|
+
dur: number;
|
|
2764
|
+
ivl: number;
|
|
2765
|
+
rnd: boolean;
|
|
2766
|
+
slip_bps: number;
|
|
2767
|
+
min_px: DecimalString;
|
|
2768
|
+
max_px: DecimalString;
|
|
2769
|
+
ro: boolean;
|
|
2770
|
+
st: PerpsTwapStatus;
|
|
2771
|
+
slices: number;
|
|
2772
|
+
slice_count: number;
|
|
2773
|
+
sts: EpochMilliseconds;
|
|
2774
|
+
ets: EpochMilliseconds;
|
|
2775
|
+
cts: EpochMilliseconds;
|
|
2776
|
+
avg_px?: DecimalString | undefined;
|
|
2777
|
+
coid?: PerpsClientOrderId | undefined;
|
|
2778
|
+
oid?: PerpsOrderId | undefined;
|
|
2779
|
+
}>>;
|
|
2780
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2781
|
+
type PerpsTwap = z.infer<typeof PerpsTwapSchema>;
|
|
2782
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2783
|
+
declare const PerpsTwapAcceptedSchema: z.ZodPipe<z.ZodObject<{
|
|
2784
|
+
status: z.ZodLiteral<"ok">;
|
|
2785
|
+
twid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTwapId, number>>;
|
|
2786
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2787
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2788
|
+
twapId: PerpsTwapId;
|
|
2789
|
+
timestamp: EpochMilliseconds;
|
|
2790
|
+
}, {
|
|
2791
|
+
status: "ok";
|
|
2792
|
+
twid: PerpsTwapId;
|
|
2793
|
+
ts: EpochMilliseconds;
|
|
2794
|
+
}>>;
|
|
2795
|
+
/** Acceptance does not guarantee all scheduled quantity will fill.
|
|
2796
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2797
|
+
*/
|
|
2798
|
+
type PerpsTwapAccepted = z.infer<typeof PerpsTwapAcceptedSchema>;
|
|
2799
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2800
|
+
declare const FetchPerpsTwapsResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
2801
|
+
twid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTwapId, number>>;
|
|
2802
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2803
|
+
buy: z.ZodBoolean;
|
|
2804
|
+
qty: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2805
|
+
fill: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2806
|
+
dur: z.ZodNumber;
|
|
2807
|
+
ivl: z.ZodNumber;
|
|
2808
|
+
rnd: z.ZodBoolean;
|
|
2809
|
+
slip_bps: z.ZodNumber;
|
|
2810
|
+
min_px: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2811
|
+
max_px: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2812
|
+
ro: z.ZodBoolean;
|
|
2813
|
+
st: z.ZodEnum<typeof PerpsTwapStatus>;
|
|
2814
|
+
slices: z.ZodNumber;
|
|
2815
|
+
slice_count: z.ZodNumber;
|
|
2816
|
+
sts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2817
|
+
ets: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2818
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2819
|
+
avg_px: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2820
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
2821
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2822
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2823
|
+
orderId?: PerpsOrderId | undefined;
|
|
2824
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
2825
|
+
averagePrice?: DecimalString | undefined;
|
|
2826
|
+
twapId: PerpsTwapId;
|
|
2827
|
+
instrumentId: PerpsInstrumentId;
|
|
2828
|
+
side: OrderSide;
|
|
2829
|
+
quantity: DecimalString;
|
|
2830
|
+
filledQuantity: DecimalString;
|
|
2831
|
+
durationMs: number;
|
|
2832
|
+
intervalMs: number;
|
|
2833
|
+
randomize: boolean;
|
|
2834
|
+
slippageBps: number;
|
|
2835
|
+
minPrice: DecimalString;
|
|
2836
|
+
maxPrice: DecimalString;
|
|
2837
|
+
reduceOnly: boolean;
|
|
2838
|
+
status: PerpsTwapStatus;
|
|
2839
|
+
slices: number;
|
|
2840
|
+
sliceCount: number;
|
|
2841
|
+
startedAt: EpochMilliseconds;
|
|
2842
|
+
endsAt: EpochMilliseconds;
|
|
2843
|
+
createdAt: EpochMilliseconds;
|
|
2844
|
+
}, {
|
|
2845
|
+
twid: PerpsTwapId;
|
|
2846
|
+
iid: PerpsInstrumentId;
|
|
2847
|
+
buy: boolean;
|
|
2848
|
+
qty: DecimalString;
|
|
2849
|
+
fill: DecimalString;
|
|
2850
|
+
dur: number;
|
|
2851
|
+
ivl: number;
|
|
2852
|
+
rnd: boolean;
|
|
2853
|
+
slip_bps: number;
|
|
2854
|
+
min_px: DecimalString;
|
|
2855
|
+
max_px: DecimalString;
|
|
2856
|
+
ro: boolean;
|
|
2857
|
+
st: PerpsTwapStatus;
|
|
2858
|
+
slices: number;
|
|
2859
|
+
slice_count: number;
|
|
2860
|
+
sts: EpochMilliseconds;
|
|
2861
|
+
ets: EpochMilliseconds;
|
|
2862
|
+
cts: EpochMilliseconds;
|
|
2863
|
+
avg_px?: DecimalString | undefined;
|
|
2864
|
+
coid?: PerpsClientOrderId | undefined;
|
|
2865
|
+
oid?: PerpsOrderId | undefined;
|
|
2866
|
+
}>>>;
|
|
2867
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2868
|
+
declare const CreatePerpsTwapResponseSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
2869
|
+
status: z.ZodLiteral<"ok">;
|
|
2870
|
+
twid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTwapId, number>>;
|
|
2871
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2872
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2873
|
+
twapId: PerpsTwapId;
|
|
2874
|
+
timestamp: EpochMilliseconds;
|
|
2875
|
+
}, {
|
|
2876
|
+
status: "ok";
|
|
2877
|
+
twid: PerpsTwapId;
|
|
2878
|
+
ts: EpochMilliseconds;
|
|
2879
|
+
}>>, z.ZodObject<{
|
|
2880
|
+
status: z.ZodLiteral<"err">;
|
|
2881
|
+
error: z.ZodString;
|
|
2882
|
+
}, z.core.$strip>]>;
|
|
2883
|
+
|
|
2884
|
+
export { CreatePerpsTwapResponseSchema, FetchPerpsAccountConfigResponseSchema, FetchPerpsAccountStatsResponseSchema, FetchPerpsAutoCancelStatusResponseSchema, FetchPerpsBalancesResponseSchema, FetchPerpsCandlesResponseSchema, FetchPerpsFeesResponseSchema, FetchPerpsFundingHistoryResponseSchema, FetchPerpsInstrumentsResponseSchema, FetchPerpsPortfolioResponseSchema, FetchPerpsStatisticsResponseSchema, FetchPerpsTickersResponseSchema, FetchPerpsTradesResponseSchema, FetchPerpsTwapsResponseSchema, ListPerpsDepositsResponseSchema, ListPerpsEquityHistoryResponseSchema, ListPerpsFundingPaymentsResponseSchema, ListPerpsInternalTransfersResponseSchema, ListPerpsPnlHistoryResponseSchema, ListPerpsWithdrawalsResponseSchema, type PerpsAccountConfig, PerpsAccountConfigSchema, type PerpsAccountFundingPayment, PerpsAccountFundingPaymentEntrySchema, PerpsAccountFundingPaymentSchema, type PerpsAccountStats, PerpsAccountStatsSchema, type PerpsAutoCancelResponse, PerpsAutoCancelResponseSchema, type PerpsAutoCancelStatus, PerpsAutoCancelStatusSchema, type PerpsBalance, PerpsBalanceSchema, type PerpsBbo, PerpsBboSchema, PerpsBboUpdateSchema, type PerpsBook, type PerpsBookLevel, PerpsBookLevelSchema, PerpsBookSchema, PerpsBookUpdateSchema, type PerpsCandle, PerpsCandleSchema, PerpsClientOrderId, PerpsCreateProxyResponseSchema, PerpsCredentialsResponseSchema, PerpsDeleteProxyResponseSchema, type PerpsDeposit, PerpsDepositSchema, PerpsDepositStatus, PerpsDepositUpdateSchema, PerpsEntityId, type PerpsEquityPoint, PerpsEquityPointSchema, type PerpsFeeScheduleEntry, PerpsFeeScheduleEntrySchema, type PerpsFeeTier, PerpsFeeTierSchema, type PerpsFeesInfo, PerpsFeesInfoSchema, PerpsFundingPaymentId, type PerpsFundingRate, PerpsFundingRateSchema, type PerpsHistoricalPositionSnapshotResult, type PerpsInstrument, PerpsInstrumentCategory, PerpsInstrumentId, PerpsInstrumentSchema, type PerpsInstrumentSettlement, PerpsInstrumentSettlementSchema, PerpsInstrumentType, type PerpsInternalTransfer, PerpsInternalTransferDirection, PerpsInternalTransferId, PerpsInternalTransferResponseSchema, PerpsInternalTransferSchema, PerpsKnownInternalTransferType, PerpsKnownWithdrawalStatus, type PerpsMarginSummary, PerpsMarginSummarySchema, PerpsOrderId, type PerpsPnlPoint, PerpsPnlPointSchema, type PerpsPortfolio, type PerpsPortfolioPosition, PerpsPortfolioPositionSchema, PerpsPortfolioSchema, type PerpsPositionSnapshot, type PerpsPositionSnapshotCandle, PerpsPositionSnapshotCandleSchema, type PerpsPositionSnapshotChart, PerpsPositionSnapshotChartSchema, type PerpsPositionSnapshotMarker, PerpsPositionSnapshotMarkerKind, PerpsPositionSnapshotMarkerSchema, type PerpsPositionSnapshotResult, PerpsPositionSnapshotSchema, PerpsPositionSnapshotStatus, type PerpsPositionSnapshots, PerpsPositionSnapshotsSchema, type PerpsProxyKey, PerpsProxyKeySchema, type PerpsPublicTrade, PerpsPublicTradeSchema, PerpsPublicTradeUpdateSchema, PerpsRegistrationResponseSchema, type PerpsRiskTier, PerpsRiskTierSchema, PerpsSide, type PerpsStatistic, PerpsStatisticSchema, PerpsStatisticUpdateSchema, type PerpsTicker, PerpsTickerEntrySchema, PerpsTickerSchema, PerpsTradeId, type PerpsTwap, type PerpsTwapAccepted, PerpsTwapAcceptedSchema, type PerpsTwapId, PerpsTwapIdSchema, PerpsTwapSchema, PerpsTwapStatus, PerpsWithdrawResponseSchema, type PerpsWithdrawal, PerpsWithdrawalId, PerpsWithdrawalSchema, PerpsWithdrawalUpdateSchema };
|