@nktkas/hyperliquid 0.24.2 → 0.25.0-beta.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/README.md +197 -117
- package/esm/mod.d.ts +11 -11
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/esm/src/clients/exchange.d.ts +29 -18
- package/esm/src/clients/exchange.d.ts.map +1 -1
- package/esm/src/clients/exchange.js +50 -48
- package/esm/src/clients/info.d.ts +79 -75
- package/esm/src/clients/info.d.ts.map +1 -1
- package/esm/src/clients/info.js +294 -163
- package/esm/src/clients/multiSign.d.ts +11 -7
- package/esm/src/clients/multiSign.d.ts.map +1 -1
- package/esm/src/clients/subscription.d.ts +105 -32
- package/esm/src/clients/subscription.d.ts.map +1 -1
- package/esm/src/clients/subscription.js +114 -33
- package/esm/src/{base.d.ts → errors.d.ts} +1 -1
- package/esm/src/errors.d.ts.map +1 -0
- package/esm/src/schemas/_base.d.ts +10 -0
- package/esm/src/schemas/_base.d.ts.map +1 -0
- package/esm/src/schemas/_base.js +12 -0
- package/esm/src/schemas/exchange/requests.d.ts +8953 -0
- package/esm/src/schemas/exchange/requests.d.ts.map +1 -0
- package/esm/src/schemas/exchange/requests.js +1413 -0
- package/esm/src/schemas/exchange/responses.d.ts +567 -0
- package/esm/src/schemas/exchange/responses.d.ts.map +1 -0
- package/esm/src/schemas/exchange/responses.js +243 -0
- package/esm/src/schemas/explorer/requests.d.ts +44 -0
- package/esm/src/schemas/explorer/requests.d.ts.map +1 -0
- package/esm/src/schemas/explorer/requests.js +32 -0
- package/esm/src/schemas/explorer/responses.d.ts +360 -0
- package/esm/src/schemas/explorer/responses.d.ts.map +1 -0
- package/esm/src/schemas/explorer/responses.js +56 -0
- package/esm/src/schemas/info/accounts.d.ts +2159 -0
- package/esm/src/schemas/info/accounts.d.ts.map +1 -0
- package/esm/src/schemas/info/accounts.js +622 -0
- package/esm/src/schemas/info/assets.d.ts +945 -0
- package/esm/src/schemas/info/assets.d.ts.map +1 -0
- package/esm/src/schemas/info/assets.js +265 -0
- package/esm/src/schemas/info/markets.d.ts +138 -0
- package/esm/src/schemas/info/markets.d.ts.map +1 -0
- package/esm/src/schemas/info/markets.js +58 -0
- package/esm/src/schemas/info/orders.d.ts +957 -0
- package/esm/src/schemas/info/orders.d.ts.map +1 -0
- package/esm/src/schemas/info/orders.js +297 -0
- package/esm/src/schemas/info/requests.d.ts +882 -0
- package/esm/src/schemas/info/requests.d.ts.map +1 -0
- package/esm/src/schemas/info/requests.js +655 -0
- package/esm/src/schemas/info/validators.d.ts +305 -0
- package/esm/src/schemas/info/validators.d.ts.map +1 -0
- package/esm/src/schemas/info/validators.js +112 -0
- package/esm/src/schemas/info/vaults.d.ts +447 -0
- package/esm/src/schemas/info/vaults.d.ts.map +1 -0
- package/esm/src/schemas/info/vaults.js +110 -0
- package/esm/src/schemas/mod.d.ts +100 -0
- package/esm/src/schemas/mod.d.ts.map +1 -0
- package/esm/src/schemas/mod.js +113 -0
- package/esm/src/schemas/subscriptions/requests.d.ts +332 -0
- package/esm/src/schemas/subscriptions/requests.d.ts.map +1 -0
- package/esm/src/schemas/subscriptions/requests.js +258 -0
- package/esm/src/schemas/subscriptions/responses.d.ts +3643 -0
- package/esm/src/schemas/subscriptions/responses.d.ts.map +1 -0
- package/esm/src/schemas/subscriptions/responses.js +233 -0
- package/esm/src/signing/mod.d.ts +109 -29
- package/esm/src/signing/mod.d.ts.map +1 -1
- package/esm/src/signing/mod.js +135 -29
- package/esm/src/transports/base.d.ts +2 -2
- package/esm/src/transports/base.d.ts.map +1 -1
- package/esm/src/transports/base.js +2 -2
- package/esm/src/transports/http/http_transport.d.ts +2 -1
- package/esm/src/transports/http/http_transport.d.ts.map +1 -1
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/esm/src/transports/websocket/websocket_transport.d.ts +2 -1
- package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/package.json +6 -5
- package/script/mod.d.ts +11 -11
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -1
- package/script/src/clients/exchange.d.ts +29 -18
- package/script/src/clients/exchange.d.ts.map +1 -1
- package/script/src/clients/exchange.js +56 -54
- package/script/src/clients/info.d.ts +79 -75
- package/script/src/clients/info.d.ts.map +1 -1
- package/script/src/clients/info.js +294 -163
- package/script/src/clients/multiSign.d.ts +11 -7
- package/script/src/clients/multiSign.d.ts.map +1 -1
- package/script/src/clients/subscription.d.ts +105 -32
- package/script/src/clients/subscription.d.ts.map +1 -1
- package/script/src/clients/subscription.js +114 -33
- package/script/src/{base.d.ts → errors.d.ts} +1 -1
- package/script/src/errors.d.ts.map +1 -0
- package/script/src/schemas/_base.d.ts +10 -0
- package/script/src/schemas/_base.d.ts.map +1 -0
- package/script/src/schemas/_base.js +48 -0
- package/script/src/schemas/exchange/requests.d.ts +8953 -0
- package/script/src/schemas/exchange/requests.d.ts.map +1 -0
- package/script/src/schemas/exchange/requests.js +1449 -0
- package/script/src/schemas/exchange/responses.d.ts +567 -0
- package/script/src/schemas/exchange/responses.d.ts.map +1 -0
- package/script/src/schemas/exchange/responses.js +279 -0
- package/script/src/schemas/explorer/requests.d.ts +44 -0
- package/script/src/schemas/explorer/requests.d.ts.map +1 -0
- package/script/src/schemas/explorer/requests.js +68 -0
- package/script/src/schemas/explorer/responses.d.ts +360 -0
- package/script/src/schemas/explorer/responses.d.ts.map +1 -0
- package/script/src/schemas/explorer/responses.js +92 -0
- package/script/src/schemas/info/accounts.d.ts +2159 -0
- package/script/src/schemas/info/accounts.d.ts.map +1 -0
- package/script/src/schemas/info/accounts.js +658 -0
- package/script/src/schemas/info/assets.d.ts +945 -0
- package/script/src/schemas/info/assets.d.ts.map +1 -0
- package/script/src/schemas/info/assets.js +301 -0
- package/script/src/schemas/info/markets.d.ts +138 -0
- package/script/src/schemas/info/markets.d.ts.map +1 -0
- package/script/src/schemas/info/markets.js +94 -0
- package/script/src/schemas/info/orders.d.ts +957 -0
- package/script/src/schemas/info/orders.d.ts.map +1 -0
- package/script/src/schemas/info/orders.js +333 -0
- package/script/src/schemas/info/requests.d.ts +882 -0
- package/script/src/schemas/info/requests.d.ts.map +1 -0
- package/script/src/schemas/info/requests.js +692 -0
- package/script/src/schemas/info/validators.d.ts +305 -0
- package/script/src/schemas/info/validators.d.ts.map +1 -0
- package/script/src/schemas/info/validators.js +148 -0
- package/script/src/schemas/info/vaults.d.ts +447 -0
- package/script/src/schemas/info/vaults.d.ts.map +1 -0
- package/script/src/schemas/info/vaults.js +146 -0
- package/script/src/schemas/mod.d.ts +100 -0
- package/script/src/schemas/mod.d.ts.map +1 -0
- package/script/src/schemas/mod.js +154 -0
- package/script/src/schemas/subscriptions/requests.d.ts +332 -0
- package/script/src/schemas/subscriptions/requests.d.ts.map +1 -0
- package/script/src/schemas/subscriptions/requests.js +294 -0
- package/script/src/schemas/subscriptions/responses.d.ts +3643 -0
- package/script/src/schemas/subscriptions/responses.d.ts.map +1 -0
- package/script/src/schemas/subscriptions/responses.js +269 -0
- package/script/src/signing/mod.d.ts +109 -29
- package/script/src/signing/mod.d.ts.map +1 -1
- package/script/src/signing/mod.js +137 -33
- package/script/src/transports/base.d.ts +2 -2
- package/script/src/transports/base.d.ts.map +1 -1
- package/script/src/transports/base.js +3 -3
- package/script/src/transports/http/http_transport.d.ts +2 -1
- package/script/src/transports/http/http_transport.d.ts.map +1 -1
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/script/src/transports/websocket/websocket_transport.d.ts +2 -1
- package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/esm/src/base.d.ts.map +0 -1
- package/esm/src/signing/_sorter.d.ts +0 -127
- package/esm/src/signing/_sorter.d.ts.map +0 -1
- package/esm/src/signing/_sorter.js +0 -693
- package/esm/src/types/exchange/requests.d.ts +0 -1345
- package/esm/src/types/exchange/requests.d.ts.map +0 -1
- package/esm/src/types/exchange/requests.js +0 -1
- package/esm/src/types/exchange/responses.d.ts +0 -233
- package/esm/src/types/exchange/responses.d.ts.map +0 -1
- package/esm/src/types/exchange/responses.js +0 -1
- package/esm/src/types/explorer/requests.d.ts +0 -32
- package/esm/src/types/explorer/requests.d.ts.map +0 -1
- package/esm/src/types/explorer/requests.js +0 -1
- package/esm/src/types/explorer/responses.d.ts +0 -58
- package/esm/src/types/explorer/responses.d.ts.map +0 -1
- package/esm/src/types/explorer/responses.js +0 -1
- package/esm/src/types/info/accounts.d.ts +0 -864
- package/esm/src/types/info/accounts.d.ts.map +0 -1
- package/esm/src/types/info/accounts.js +0 -1
- package/esm/src/types/info/assets.d.ts +0 -354
- package/esm/src/types/info/assets.d.ts.map +0 -1
- package/esm/src/types/info/assets.js +0 -1
- package/esm/src/types/info/markets.d.ts +0 -79
- package/esm/src/types/info/markets.d.ts.map +0 -1
- package/esm/src/types/info/markets.js +0 -1
- package/esm/src/types/info/orders.d.ts +0 -266
- package/esm/src/types/info/orders.d.ts.map +0 -1
- package/esm/src/types/info/orders.js +0 -1
- package/esm/src/types/info/requests.d.ts +0 -634
- package/esm/src/types/info/requests.d.ts.map +0 -1
- package/esm/src/types/info/requests.js +0 -1
- package/esm/src/types/info/validators.d.ts +0 -147
- package/esm/src/types/info/validators.d.ts.map +0 -1
- package/esm/src/types/info/validators.js +0 -1
- package/esm/src/types/info/vaults.d.ts +0 -119
- package/esm/src/types/info/vaults.d.ts.map +0 -1
- package/esm/src/types/info/vaults.js +0 -1
- package/esm/src/types/mod.d.ts +0 -38
- package/esm/src/types/mod.d.ts.map +0 -1
- package/esm/src/types/mod.js +0 -24
- package/esm/src/types/subscriptions/requests.d.ts +0 -143
- package/esm/src/types/subscriptions/requests.d.ts.map +0 -1
- package/esm/src/types/subscriptions/requests.js +0 -1
- package/esm/src/types/subscriptions/responses.d.ts +0 -213
- package/esm/src/types/subscriptions/responses.d.ts.map +0 -1
- package/esm/src/types/subscriptions/responses.js +0 -1
- package/script/src/base.d.ts.map +0 -1
- package/script/src/signing/_sorter.d.ts +0 -127
- package/script/src/signing/_sorter.d.ts.map +0 -1
- package/script/src/signing/_sorter.js +0 -696
- package/script/src/types/exchange/requests.d.ts +0 -1345
- package/script/src/types/exchange/requests.d.ts.map +0 -1
- package/script/src/types/exchange/requests.js +0 -2
- package/script/src/types/exchange/responses.d.ts +0 -233
- package/script/src/types/exchange/responses.d.ts.map +0 -1
- package/script/src/types/exchange/responses.js +0 -2
- package/script/src/types/explorer/requests.d.ts +0 -32
- package/script/src/types/explorer/requests.d.ts.map +0 -1
- package/script/src/types/explorer/requests.js +0 -2
- package/script/src/types/explorer/responses.d.ts +0 -58
- package/script/src/types/explorer/responses.d.ts.map +0 -1
- package/script/src/types/explorer/responses.js +0 -2
- package/script/src/types/info/accounts.d.ts +0 -864
- package/script/src/types/info/accounts.d.ts.map +0 -1
- package/script/src/types/info/accounts.js +0 -2
- package/script/src/types/info/assets.d.ts +0 -354
- package/script/src/types/info/assets.d.ts.map +0 -1
- package/script/src/types/info/assets.js +0 -2
- package/script/src/types/info/markets.d.ts +0 -79
- package/script/src/types/info/markets.d.ts.map +0 -1
- package/script/src/types/info/markets.js +0 -2
- package/script/src/types/info/orders.d.ts +0 -266
- package/script/src/types/info/orders.d.ts.map +0 -1
- package/script/src/types/info/orders.js +0 -2
- package/script/src/types/info/requests.d.ts +0 -634
- package/script/src/types/info/requests.d.ts.map +0 -1
- package/script/src/types/info/requests.js +0 -2
- package/script/src/types/info/validators.d.ts +0 -147
- package/script/src/types/info/validators.d.ts.map +0 -1
- package/script/src/types/info/validators.js +0 -2
- package/script/src/types/info/vaults.d.ts +0 -119
- package/script/src/types/info/vaults.d.ts.map +0 -1
- package/script/src/types/info/vaults.js +0 -2
- package/script/src/types/mod.d.ts +0 -38
- package/script/src/types/mod.d.ts.map +0 -1
- package/script/src/types/mod.js +0 -25
- package/script/src/types/subscriptions/requests.d.ts +0 -143
- package/script/src/types/subscriptions/requests.d.ts.map +0 -1
- package/script/src/types/subscriptions/requests.js +0 -2
- package/script/src/types/subscriptions/responses.d.ts +0 -213
- package/script/src/types/subscriptions/responses.d.ts.map +0 -1
- package/script/src/types/subscriptions/responses.js +0 -2
- /package/esm/src/{base.js → errors.js} +0 -0
- /package/script/src/{base.js → errors.js} +0 -0
|
@@ -1,864 +0,0 @@
|
|
|
1
|
-
import type { Hex } from "../mod.js";
|
|
2
|
-
/** User active asset data. */
|
|
3
|
-
export interface ActiveAssetData {
|
|
4
|
-
/** User address. */
|
|
5
|
-
user: Hex;
|
|
6
|
-
/** Asset symbol (e.g., BTC). */
|
|
7
|
-
coin: string;
|
|
8
|
-
/** Leverage configuration. */
|
|
9
|
-
leverage: {
|
|
10
|
-
/** Leverage type. */
|
|
11
|
-
type: "isolated";
|
|
12
|
-
/** Leverage value used. */
|
|
13
|
-
value: number;
|
|
14
|
-
/**
|
|
15
|
-
* Amount of USD used (1 = 1$).
|
|
16
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
17
|
-
*/
|
|
18
|
-
rawUsd: string;
|
|
19
|
-
} | {
|
|
20
|
-
/** Leverage type. */
|
|
21
|
-
type: "cross";
|
|
22
|
-
/** Leverage value used. */
|
|
23
|
-
value: number;
|
|
24
|
-
};
|
|
25
|
-
/** Maximum trade size range [min, max]. */
|
|
26
|
-
maxTradeSzs: [string, string];
|
|
27
|
-
/** Available to trade range [min, max]. */
|
|
28
|
-
availableToTrade: [string, string];
|
|
29
|
-
/**
|
|
30
|
-
* Mark price.
|
|
31
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
32
|
-
*/
|
|
33
|
-
markPx: string;
|
|
34
|
-
}
|
|
35
|
-
/** Position for a specific asset. */
|
|
36
|
-
export interface AssetPosition {
|
|
37
|
-
/** Position type. */
|
|
38
|
-
type: "oneWay";
|
|
39
|
-
/** Position details. */
|
|
40
|
-
position: {
|
|
41
|
-
/** Asset symbol. */
|
|
42
|
-
coin: string;
|
|
43
|
-
/**
|
|
44
|
-
* Signed position size.
|
|
45
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
46
|
-
*/
|
|
47
|
-
szi: string;
|
|
48
|
-
/** Leverage details. */
|
|
49
|
-
leverage: {
|
|
50
|
-
/** Leverage type. */
|
|
51
|
-
type: "isolated";
|
|
52
|
-
/** Leverage value used. */
|
|
53
|
-
value: number;
|
|
54
|
-
/** Amount of USD used (1 = 1$). */
|
|
55
|
-
rawUsd: string;
|
|
56
|
-
} | {
|
|
57
|
-
/** Leverage type. */
|
|
58
|
-
type: "cross";
|
|
59
|
-
/** Leverage value used. */
|
|
60
|
-
value: number;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Average entry price.
|
|
64
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
65
|
-
*/
|
|
66
|
-
entryPx: string;
|
|
67
|
-
/**
|
|
68
|
-
* Position value.
|
|
69
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
70
|
-
*/
|
|
71
|
-
positionValue: string;
|
|
72
|
-
/**
|
|
73
|
-
* Unrealized profit and loss.
|
|
74
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
75
|
-
*/
|
|
76
|
-
unrealizedPnl: string;
|
|
77
|
-
/**
|
|
78
|
-
* Return on equity.
|
|
79
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
80
|
-
*/
|
|
81
|
-
returnOnEquity: string;
|
|
82
|
-
/**
|
|
83
|
-
* Liquidation price.
|
|
84
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
85
|
-
*/
|
|
86
|
-
liquidationPx: string | null;
|
|
87
|
-
/**
|
|
88
|
-
* Margin used.
|
|
89
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
90
|
-
*/
|
|
91
|
-
marginUsed: string;
|
|
92
|
-
/** Maximum allowed leverage. */
|
|
93
|
-
maxLeverage: number;
|
|
94
|
-
/** Cumulative funding details. */
|
|
95
|
-
cumFunding: {
|
|
96
|
-
/**
|
|
97
|
-
* Total funding paid or received since account opening.
|
|
98
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
99
|
-
*/
|
|
100
|
-
allTime: string;
|
|
101
|
-
/**
|
|
102
|
-
* Funding accumulated since the position was opened.
|
|
103
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
104
|
-
*/
|
|
105
|
-
sinceOpen: string;
|
|
106
|
-
/**
|
|
107
|
-
* Funding accumulated since the last change in position size.
|
|
108
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
109
|
-
*/
|
|
110
|
-
sinceChange: string;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
/** Escrowed balance for a specific asset. */
|
|
115
|
-
export interface EvmEscrowsBalance {
|
|
116
|
-
/** Asset symbol. */
|
|
117
|
-
coin: string;
|
|
118
|
-
/** Unique identifier for the token. */
|
|
119
|
-
token: number;
|
|
120
|
-
/**
|
|
121
|
-
* Total balance.
|
|
122
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
123
|
-
*/
|
|
124
|
-
total: string;
|
|
125
|
-
}
|
|
126
|
-
/** Extra agent details for a user. */
|
|
127
|
-
export interface ExtraAgent {
|
|
128
|
-
/** Extra agent address. */
|
|
129
|
-
address: Hex;
|
|
130
|
-
/** Extra agent name. */
|
|
131
|
-
name: string;
|
|
132
|
-
/** Validity period as a timestamp (in ms since epoch). */
|
|
133
|
-
validUntil: number;
|
|
134
|
-
}
|
|
135
|
-
/** Legal verification status for a user. */
|
|
136
|
-
export interface LegalCheck {
|
|
137
|
-
/** Whether the user IP address is allowed. */
|
|
138
|
-
ipAllowed: boolean;
|
|
139
|
-
/** Whether the user has accepted the terms of service. */
|
|
140
|
-
acceptedTerms: boolean;
|
|
141
|
-
/** Whether the user is allowed to use the platform. */
|
|
142
|
-
userAllowed: boolean;
|
|
143
|
-
}
|
|
144
|
-
/** Multi-sig signers for a user. */
|
|
145
|
-
export interface MultiSigSigners {
|
|
146
|
-
/** Authorized users addresses. */
|
|
147
|
-
authorizedUsers: Hex[];
|
|
148
|
-
/** Threshold number of signatures required. */
|
|
149
|
-
threshold: number;
|
|
150
|
-
}
|
|
151
|
-
/** Account summary for perpetual trading. */
|
|
152
|
-
export interface PerpsClearinghouseState {
|
|
153
|
-
/** Margin summary details. */
|
|
154
|
-
marginSummary: {
|
|
155
|
-
/**
|
|
156
|
-
* Total account value.
|
|
157
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
158
|
-
*/
|
|
159
|
-
accountValue: string;
|
|
160
|
-
/**
|
|
161
|
-
* Total notional position value.
|
|
162
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
163
|
-
*/
|
|
164
|
-
totalNtlPos: string;
|
|
165
|
-
/**
|
|
166
|
-
* Total raw USD value.
|
|
167
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
168
|
-
*/
|
|
169
|
-
totalRawUsd: string;
|
|
170
|
-
/**
|
|
171
|
-
* Total margin used.
|
|
172
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
173
|
-
*/
|
|
174
|
-
totalMarginUsed: string;
|
|
175
|
-
};
|
|
176
|
-
/** Cross-margin summary details. */
|
|
177
|
-
crossMarginSummary: {
|
|
178
|
-
/**
|
|
179
|
-
* Total account value.
|
|
180
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
181
|
-
*/
|
|
182
|
-
accountValue: string;
|
|
183
|
-
/**
|
|
184
|
-
* Total notional position value.
|
|
185
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
186
|
-
*/
|
|
187
|
-
totalNtlPos: string;
|
|
188
|
-
/**
|
|
189
|
-
* Total raw USD value.
|
|
190
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
191
|
-
*/
|
|
192
|
-
totalRawUsd: string;
|
|
193
|
-
/**
|
|
194
|
-
* Total margin used.
|
|
195
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
196
|
-
*/
|
|
197
|
-
totalMarginUsed: string;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Maintenance margin used for cross-margin positions.
|
|
201
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
202
|
-
*/
|
|
203
|
-
crossMaintenanceMarginUsed: string;
|
|
204
|
-
/**
|
|
205
|
-
* Amount available for withdrawal.
|
|
206
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
207
|
-
*/
|
|
208
|
-
withdrawable: string;
|
|
209
|
-
/** List of asset positions. */
|
|
210
|
-
assetPositions: AssetPosition[];
|
|
211
|
-
/** Timestamp when data was retrieved (in ms since epoch). */
|
|
212
|
-
time: number;
|
|
213
|
-
}
|
|
214
|
-
/** Portfolio metrics snapshot. */
|
|
215
|
-
export interface Portfolio {
|
|
216
|
-
/** History entries for account value as [timestamp, value]. */
|
|
217
|
-
accountValueHistory: [number, string][];
|
|
218
|
-
/** History entries for profit and loss as [timestamp, value]. */
|
|
219
|
-
pnlHistory: [number, string][];
|
|
220
|
-
/**
|
|
221
|
-
* Volume metric for the portfolio.
|
|
222
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
223
|
-
*/
|
|
224
|
-
vlm: string;
|
|
225
|
-
}
|
|
226
|
-
/** Portfolio metrics grouped by time periods. */
|
|
227
|
-
export type PortfolioPeriods = [
|
|
228
|
-
[
|
|
229
|
-
"day",
|
|
230
|
-
Portfolio
|
|
231
|
-
],
|
|
232
|
-
[
|
|
233
|
-
"week",
|
|
234
|
-
Portfolio
|
|
235
|
-
],
|
|
236
|
-
[
|
|
237
|
-
"month",
|
|
238
|
-
Portfolio
|
|
239
|
-
],
|
|
240
|
-
[
|
|
241
|
-
"allTime",
|
|
242
|
-
Portfolio
|
|
243
|
-
],
|
|
244
|
-
[
|
|
245
|
-
"perpDay",
|
|
246
|
-
Portfolio
|
|
247
|
-
],
|
|
248
|
-
[
|
|
249
|
-
"perpWeek",
|
|
250
|
-
Portfolio
|
|
251
|
-
],
|
|
252
|
-
[
|
|
253
|
-
"perpMonth",
|
|
254
|
-
Portfolio
|
|
255
|
-
],
|
|
256
|
-
[
|
|
257
|
-
"perpAllTime",
|
|
258
|
-
Portfolio
|
|
259
|
-
]
|
|
260
|
-
];
|
|
261
|
-
/** Pre-transfer user existence check result. */
|
|
262
|
-
export interface PreTransferCheck {
|
|
263
|
-
/**
|
|
264
|
-
* Activation fee.
|
|
265
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
266
|
-
*/
|
|
267
|
-
fee: string;
|
|
268
|
-
/** Whether the user is sanctioned. */
|
|
269
|
-
isSanctioned: boolean;
|
|
270
|
-
/** Whether the user exists. */
|
|
271
|
-
userExists: boolean;
|
|
272
|
-
/** Whether the user has sent a transaction. */
|
|
273
|
-
userHasSentTx: boolean;
|
|
274
|
-
}
|
|
275
|
-
/** Referral details for a user. */
|
|
276
|
-
export interface Referral {
|
|
277
|
-
/** Referrer details. */
|
|
278
|
-
referredBy: {
|
|
279
|
-
/** Referrer address. */
|
|
280
|
-
referrer: Hex;
|
|
281
|
-
/** Referral code used. */
|
|
282
|
-
code: string;
|
|
283
|
-
} | null;
|
|
284
|
-
/**
|
|
285
|
-
* Cumulative traded volume.
|
|
286
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
287
|
-
*/
|
|
288
|
-
cumVlm: string;
|
|
289
|
-
/**
|
|
290
|
-
* Rewards earned but not yet claimed.
|
|
291
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
292
|
-
*/
|
|
293
|
-
unclaimedRewards: string;
|
|
294
|
-
/**
|
|
295
|
-
* Rewards that have been claimed.
|
|
296
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
297
|
-
*/
|
|
298
|
-
claimedRewards: string;
|
|
299
|
-
/**
|
|
300
|
-
* Builder reward amount.
|
|
301
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
302
|
-
*/
|
|
303
|
-
builderRewards: string;
|
|
304
|
-
/** Current state of the referrer. */
|
|
305
|
-
referrerState: {
|
|
306
|
-
/** Referrer is ready to receive rewards. */
|
|
307
|
-
stage: "ready";
|
|
308
|
-
/** Referral program details. */
|
|
309
|
-
data: {
|
|
310
|
-
/** Assigned referral code. */
|
|
311
|
-
code: string;
|
|
312
|
-
/** Total number of referrals. */
|
|
313
|
-
nReferrals: number;
|
|
314
|
-
/** Summary of each referral state. */
|
|
315
|
-
referralStates: {
|
|
316
|
-
/**
|
|
317
|
-
* Cumulative traded volume.
|
|
318
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
319
|
-
*/
|
|
320
|
-
cumVlm: string;
|
|
321
|
-
/**
|
|
322
|
-
* Total fees rewarded to the referred user since referral.
|
|
323
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
324
|
-
*/
|
|
325
|
-
cumRewardedFeesSinceReferred: string;
|
|
326
|
-
/**
|
|
327
|
-
* Total fees rewarded to the referrer from referred trades.
|
|
328
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
329
|
-
*/
|
|
330
|
-
cumFeesRewardedToReferrer: string;
|
|
331
|
-
/** Timestamp when the referred user joined (in ms since epoch). */
|
|
332
|
-
timeJoined: number;
|
|
333
|
-
/** Address of the referred user. */
|
|
334
|
-
user: Hex;
|
|
335
|
-
}[];
|
|
336
|
-
};
|
|
337
|
-
} | {
|
|
338
|
-
/** Referrer needs to create a referral code. */
|
|
339
|
-
stage: "needToCreateCode";
|
|
340
|
-
} | {
|
|
341
|
-
/** Referrer must complete a trade before earning rewards. */
|
|
342
|
-
stage: "needToTrade";
|
|
343
|
-
/** Required trading volume details for activation. */
|
|
344
|
-
data: {
|
|
345
|
-
/**
|
|
346
|
-
* Required trading volume.
|
|
347
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
348
|
-
*/
|
|
349
|
-
required: string;
|
|
350
|
-
};
|
|
351
|
-
};
|
|
352
|
-
/** History of referral rewards. */
|
|
353
|
-
rewardHistory: {
|
|
354
|
-
/**
|
|
355
|
-
* Amount of earned rewards.
|
|
356
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
357
|
-
*/
|
|
358
|
-
earned: string;
|
|
359
|
-
/**
|
|
360
|
-
* Traded volume at the time of reward.
|
|
361
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
362
|
-
*/
|
|
363
|
-
vlm: string;
|
|
364
|
-
/**
|
|
365
|
-
* Traded volume via referrals.
|
|
366
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
367
|
-
*/
|
|
368
|
-
referralVlm: string;
|
|
369
|
-
/** Timestamp when the reward was earned (in ms since epoch). */
|
|
370
|
-
time: number;
|
|
371
|
-
}[];
|
|
372
|
-
}
|
|
373
|
-
/** Balance for a specific spot token. */
|
|
374
|
-
export interface SpotBalance {
|
|
375
|
-
/** Asset symbol. */
|
|
376
|
-
coin: string;
|
|
377
|
-
/** Unique identifier for the token. */
|
|
378
|
-
token: number;
|
|
379
|
-
/**
|
|
380
|
-
* Total balance.
|
|
381
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
382
|
-
*/
|
|
383
|
-
total: string;
|
|
384
|
-
/**
|
|
385
|
-
* Amount on hold.
|
|
386
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
387
|
-
*/
|
|
388
|
-
hold: string;
|
|
389
|
-
/**
|
|
390
|
-
* Entry notional value.
|
|
391
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
392
|
-
*/
|
|
393
|
-
entryNtl: string;
|
|
394
|
-
}
|
|
395
|
-
/** Account summary for spot trading. */
|
|
396
|
-
export interface SpotClearinghouseState {
|
|
397
|
-
/** Balance for each token. */
|
|
398
|
-
balances: SpotBalance[];
|
|
399
|
-
/** Escrowed balances. */
|
|
400
|
-
evmEscrows?: EvmEscrowsBalance[];
|
|
401
|
-
}
|
|
402
|
-
/** Sub-account details for a user. */
|
|
403
|
-
export interface SubAccount {
|
|
404
|
-
/** Sub-account name. */
|
|
405
|
-
name: string;
|
|
406
|
-
/** Sub-account address. */
|
|
407
|
-
subAccountUser: Hex;
|
|
408
|
-
/** Master account address. */
|
|
409
|
-
master: Hex;
|
|
410
|
-
/** Perpetual trading clearinghouse state summary. */
|
|
411
|
-
clearinghouseState: PerpsClearinghouseState;
|
|
412
|
-
/** Spot tokens clearinghouse state. */
|
|
413
|
-
spotState: SpotClearinghouseState;
|
|
414
|
-
}
|
|
415
|
-
/** User fees. */
|
|
416
|
-
export interface UserFees {
|
|
417
|
-
/** Daily user volume metrics. */
|
|
418
|
-
dailyUserVlm: {
|
|
419
|
-
/** Date in YYYY-M-D format. */
|
|
420
|
-
date: `${number}-${number}-${number}`;
|
|
421
|
-
/**
|
|
422
|
-
* User cross-trade volume.
|
|
423
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
424
|
-
*/
|
|
425
|
-
userCross: string;
|
|
426
|
-
/**
|
|
427
|
-
* User add-liquidity volume.
|
|
428
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
429
|
-
*/
|
|
430
|
-
userAdd: string;
|
|
431
|
-
/**
|
|
432
|
-
* Exchange total volume.
|
|
433
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
434
|
-
*/
|
|
435
|
-
exchange: string;
|
|
436
|
-
}[];
|
|
437
|
-
/** Fee schedule information. */
|
|
438
|
-
feeSchedule: {
|
|
439
|
-
/**
|
|
440
|
-
* Cross-trade fee rate.
|
|
441
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
442
|
-
*/
|
|
443
|
-
cross: string;
|
|
444
|
-
/**
|
|
445
|
-
* Add-liquidity fee rate.
|
|
446
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
447
|
-
*/
|
|
448
|
-
add: string;
|
|
449
|
-
/**
|
|
450
|
-
* Spot cross-trade fee rate.
|
|
451
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
452
|
-
*/
|
|
453
|
-
spotCross: string;
|
|
454
|
-
/**
|
|
455
|
-
* Spot add-liquidity fee rate.
|
|
456
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
457
|
-
*/
|
|
458
|
-
spotAdd: string;
|
|
459
|
-
/** Fee tiers details. */
|
|
460
|
-
tiers: {
|
|
461
|
-
/** VIP fee tier information. */
|
|
462
|
-
vip: {
|
|
463
|
-
/**
|
|
464
|
-
* Notional volume cutoff.
|
|
465
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
466
|
-
*/
|
|
467
|
-
ntlCutoff: string;
|
|
468
|
-
/**
|
|
469
|
-
* Cross-trade fee rate.
|
|
470
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
471
|
-
*/
|
|
472
|
-
cross: string;
|
|
473
|
-
/**
|
|
474
|
-
* Add-liquidity fee rate.
|
|
475
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
476
|
-
*/
|
|
477
|
-
add: string;
|
|
478
|
-
/**
|
|
479
|
-
* Spot cross-trade fee rate.
|
|
480
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
481
|
-
*/
|
|
482
|
-
spotCross: string;
|
|
483
|
-
/**
|
|
484
|
-
* Spot add-liquidity fee rate.
|
|
485
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
486
|
-
*/
|
|
487
|
-
spotAdd: string;
|
|
488
|
-
}[];
|
|
489
|
-
/** Market maker fee tier information. */
|
|
490
|
-
mm: {
|
|
491
|
-
/**
|
|
492
|
-
* Maker fraction cutoff.
|
|
493
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
494
|
-
*/
|
|
495
|
-
makerFractionCutoff: string;
|
|
496
|
-
/**
|
|
497
|
-
* Add-liquidity fee rate.
|
|
498
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
499
|
-
*/
|
|
500
|
-
add: string;
|
|
501
|
-
}[];
|
|
502
|
-
};
|
|
503
|
-
/**
|
|
504
|
-
* Referral discount rate.
|
|
505
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
506
|
-
*/
|
|
507
|
-
referralDiscount: string;
|
|
508
|
-
/** Staking discount tiers details. */
|
|
509
|
-
stakingDiscountTiers: {
|
|
510
|
-
/**
|
|
511
|
-
* Basis points of maximum supply.
|
|
512
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
513
|
-
*/
|
|
514
|
-
bpsOfMaxSupply: string;
|
|
515
|
-
/**
|
|
516
|
-
* Discount rate applied.
|
|
517
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
518
|
-
*/
|
|
519
|
-
discount: string;
|
|
520
|
-
}[];
|
|
521
|
-
};
|
|
522
|
-
/**
|
|
523
|
-
* User cross-trade rate.
|
|
524
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
525
|
-
*/
|
|
526
|
-
userCrossRate: string;
|
|
527
|
-
/**
|
|
528
|
-
* User add-liquidity rate.
|
|
529
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
530
|
-
*/
|
|
531
|
-
userAddRate: string;
|
|
532
|
-
/**
|
|
533
|
-
* User spot cross-trade rate.
|
|
534
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
535
|
-
*/
|
|
536
|
-
userSpotCrossRate: string;
|
|
537
|
-
/**
|
|
538
|
-
* User spot add-liquidity rate.
|
|
539
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
540
|
-
*/
|
|
541
|
-
userSpotAddRate: string;
|
|
542
|
-
/**
|
|
543
|
-
* Active referral discount rate.
|
|
544
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
545
|
-
*/
|
|
546
|
-
activeReferralDiscount: string;
|
|
547
|
-
/** Trial details. */
|
|
548
|
-
trial: unknown | null;
|
|
549
|
-
/**
|
|
550
|
-
* Fee trial reward amount.
|
|
551
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
552
|
-
*/
|
|
553
|
-
feeTrialReward: string;
|
|
554
|
-
/** Timestamp when next trial becomes available. */
|
|
555
|
-
nextTrialAvailableTimestamp: unknown | null;
|
|
556
|
-
stakingLink: unknown | null;
|
|
557
|
-
/** Active staking discount details. */
|
|
558
|
-
activeStakingDiscount: {
|
|
559
|
-
/**
|
|
560
|
-
* Basis points of maximum supply.
|
|
561
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
562
|
-
*/
|
|
563
|
-
bpsOfMaxSupply: string;
|
|
564
|
-
/**
|
|
565
|
-
* Discount rate applied.
|
|
566
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
567
|
-
*/
|
|
568
|
-
discount: string;
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
/** Funding ledger update for a user. */
|
|
572
|
-
export interface UserFundingUpdate {
|
|
573
|
-
/** Timestamp of the update (in ms since epoch). */
|
|
574
|
-
time: number;
|
|
575
|
-
/** L1 transaction hash. */
|
|
576
|
-
hash: Hex;
|
|
577
|
-
/** Update details. */
|
|
578
|
-
delta: FundingUpdate;
|
|
579
|
-
}
|
|
580
|
-
/** Funding update details. */
|
|
581
|
-
export interface FundingUpdate {
|
|
582
|
-
/** Update type. */
|
|
583
|
-
type: "funding";
|
|
584
|
-
/** Asset symbol. */
|
|
585
|
-
coin: string;
|
|
586
|
-
/**
|
|
587
|
-
* Amount transferred in USDC.
|
|
588
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
589
|
-
*/
|
|
590
|
-
usdc: string;
|
|
591
|
-
/**
|
|
592
|
-
* Signed position size.
|
|
593
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
594
|
-
*/
|
|
595
|
-
szi: string;
|
|
596
|
-
/**
|
|
597
|
-
* Applied funding rate.
|
|
598
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
599
|
-
*/
|
|
600
|
-
fundingRate: string;
|
|
601
|
-
/** Number of samples. */
|
|
602
|
-
nSamples: number | null;
|
|
603
|
-
}
|
|
604
|
-
/** User rate limits. */
|
|
605
|
-
export interface UserRateLimit {
|
|
606
|
-
/**
|
|
607
|
-
* Cumulative trading volume.
|
|
608
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
609
|
-
*/
|
|
610
|
-
cumVlm: string;
|
|
611
|
-
/** Number of API requests used. */
|
|
612
|
-
nRequestsUsed: number;
|
|
613
|
-
/** Maximum allowed API requests. */
|
|
614
|
-
nRequestsCap: number;
|
|
615
|
-
}
|
|
616
|
-
/** User role */
|
|
617
|
-
export type UserRole = {
|
|
618
|
-
/** Role identifier. */
|
|
619
|
-
role: "missing" | "user" | "vault";
|
|
620
|
-
} | {
|
|
621
|
-
/** Role identifier. */
|
|
622
|
-
role: "agent";
|
|
623
|
-
/** Details for agent role. */
|
|
624
|
-
data: {
|
|
625
|
-
/** Master account address associated with the agent. */
|
|
626
|
-
user: Hex;
|
|
627
|
-
};
|
|
628
|
-
} | {
|
|
629
|
-
/** Role identifier. */
|
|
630
|
-
role: "subAccount";
|
|
631
|
-
/** Details for sub-account role. */
|
|
632
|
-
data: {
|
|
633
|
-
/** Master account address associated with the sub-account. */
|
|
634
|
-
master: Hex;
|
|
635
|
-
};
|
|
636
|
-
};
|
|
637
|
-
/** Non-funding ledger update for a user. */
|
|
638
|
-
export interface UserNonFundingLedgerUpdate {
|
|
639
|
-
/** Timestamp of the update (in ms since epoch). */
|
|
640
|
-
time: number;
|
|
641
|
-
/** L1 transaction hash. */
|
|
642
|
-
hash: Hex;
|
|
643
|
-
/** Update details. */
|
|
644
|
-
delta: AccountClassTransferUpdate | DepositUpdate | InternalTransferUpdate | LiquidationUpdate | RewardsClaimUpdate | SpotTransferUpdate | SubAccountTransferUpdate | VaultCreateUpdate | VaultDepositUpdate | VaultDistributionUpdate | VaultWithdrawUpdate | WithdrawUpdate;
|
|
645
|
-
}
|
|
646
|
-
/** Transfer between spot and perpetual accounts. */
|
|
647
|
-
export interface AccountClassTransferUpdate {
|
|
648
|
-
/** Update type. */
|
|
649
|
-
type: "accountClassTransfer";
|
|
650
|
-
/**
|
|
651
|
-
* Amount transferred in USDC.
|
|
652
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
653
|
-
*/
|
|
654
|
-
usdc: string;
|
|
655
|
-
/** Indicates if the transfer is to the perpetual account. */
|
|
656
|
-
toPerp: boolean;
|
|
657
|
-
}
|
|
658
|
-
/** Deposit update to an account. */
|
|
659
|
-
export interface DepositUpdate {
|
|
660
|
-
/** Update type. */
|
|
661
|
-
type: "deposit";
|
|
662
|
-
/**
|
|
663
|
-
* Amount deposited in USDC.
|
|
664
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
665
|
-
*/
|
|
666
|
-
usdc: string;
|
|
667
|
-
}
|
|
668
|
-
/** Internal transfer between accounts. */
|
|
669
|
-
export interface InternalTransferUpdate {
|
|
670
|
-
/** Update type. */
|
|
671
|
-
type: "internalTransfer";
|
|
672
|
-
/**
|
|
673
|
-
* Amount transferred in USDC.
|
|
674
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
675
|
-
*/
|
|
676
|
-
usdc: string;
|
|
677
|
-
/** Initiator address. */
|
|
678
|
-
user: Hex;
|
|
679
|
-
/** Destination address. */
|
|
680
|
-
destination: Hex;
|
|
681
|
-
/**
|
|
682
|
-
* Transfer fee.
|
|
683
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
684
|
-
*/
|
|
685
|
-
fee: string;
|
|
686
|
-
}
|
|
687
|
-
/** Liquidation event update. */
|
|
688
|
-
export interface LiquidationUpdate {
|
|
689
|
-
/** Update type. */
|
|
690
|
-
type: "liquidation";
|
|
691
|
-
/**
|
|
692
|
-
* Total notional value of liquidated positions.
|
|
693
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
694
|
-
*/
|
|
695
|
-
liquidatedNtlPos: string;
|
|
696
|
-
/**
|
|
697
|
-
* Account value at liquidation time.
|
|
698
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
699
|
-
*/
|
|
700
|
-
accountValue: string;
|
|
701
|
-
/** Leverage type for liquidated positions. */
|
|
702
|
-
leverageType: "Cross" | "Isolated";
|
|
703
|
-
/** Details of each liquidated position. */
|
|
704
|
-
liquidatedPositions: {
|
|
705
|
-
/** Asset symbol of the liquidated position. */
|
|
706
|
-
coin: string;
|
|
707
|
-
/**
|
|
708
|
-
* Signed position size liquidated.
|
|
709
|
-
* @pattern ^-?[0-9]+(\.[0-9]+)?$
|
|
710
|
-
*/
|
|
711
|
-
szi: string;
|
|
712
|
-
}[];
|
|
713
|
-
}
|
|
714
|
-
/** Rewards claim event update. */
|
|
715
|
-
export interface RewardsClaimUpdate {
|
|
716
|
-
/** Update type. */
|
|
717
|
-
type: "rewardsClaim";
|
|
718
|
-
/**
|
|
719
|
-
* Amount of rewards claimed.
|
|
720
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
721
|
-
*/
|
|
722
|
-
amount: string;
|
|
723
|
-
}
|
|
724
|
-
/** Spot transfer update between accounts. */
|
|
725
|
-
export interface SpotTransferUpdate {
|
|
726
|
-
/** Update type. */
|
|
727
|
-
type: "spotTransfer";
|
|
728
|
-
/** Token symbol. */
|
|
729
|
-
token: string;
|
|
730
|
-
/**
|
|
731
|
-
* Amount transferred.
|
|
732
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
733
|
-
*/
|
|
734
|
-
amount: string;
|
|
735
|
-
/**
|
|
736
|
-
* Equivalent USDC value.
|
|
737
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
738
|
-
*/
|
|
739
|
-
usdcValue: string;
|
|
740
|
-
/** Initiator address. */
|
|
741
|
-
user: Hex;
|
|
742
|
-
/** Destination address. */
|
|
743
|
-
destination: Hex;
|
|
744
|
-
/**
|
|
745
|
-
* Transfer fee.
|
|
746
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
747
|
-
*/
|
|
748
|
-
fee: string;
|
|
749
|
-
/**
|
|
750
|
-
* Fee in native token.
|
|
751
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
752
|
-
*/
|
|
753
|
-
nativeTokenFee: string;
|
|
754
|
-
nonce: null;
|
|
755
|
-
/** Token in which the fee is denominated (e.g., "USDC"). */
|
|
756
|
-
feeToken: string;
|
|
757
|
-
}
|
|
758
|
-
/** Transfer update between sub-accounts. */
|
|
759
|
-
export interface SubAccountTransferUpdate {
|
|
760
|
-
/** Update type. */
|
|
761
|
-
type: "subAccountTransfer";
|
|
762
|
-
/**
|
|
763
|
-
* Amount transferred in USDC.
|
|
764
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
765
|
-
*/
|
|
766
|
-
usdc: string;
|
|
767
|
-
/** Initiator address. */
|
|
768
|
-
user: Hex;
|
|
769
|
-
/** Destination address. */
|
|
770
|
-
destination: Hex;
|
|
771
|
-
}
|
|
772
|
-
/** Vault creation update. */
|
|
773
|
-
export interface VaultCreateUpdate {
|
|
774
|
-
/** Update type. */
|
|
775
|
-
type: "vaultCreate";
|
|
776
|
-
/** Address of the created vault. */
|
|
777
|
-
vault: Hex;
|
|
778
|
-
/**
|
|
779
|
-
* Initial allocated amount in USDC.
|
|
780
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
781
|
-
*/
|
|
782
|
-
usdc: string;
|
|
783
|
-
/**
|
|
784
|
-
* Vault creation fee.
|
|
785
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
786
|
-
*/
|
|
787
|
-
fee: string;
|
|
788
|
-
}
|
|
789
|
-
/** Vault deposit update. */
|
|
790
|
-
export interface VaultDepositUpdate {
|
|
791
|
-
/** Update type. */
|
|
792
|
-
type: "vaultDeposit";
|
|
793
|
-
/** Address of the target vault. */
|
|
794
|
-
vault: Hex;
|
|
795
|
-
/**
|
|
796
|
-
* Amount deposited in USDC.
|
|
797
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
798
|
-
*/
|
|
799
|
-
usdc: string;
|
|
800
|
-
}
|
|
801
|
-
/** Vault distribution update. */
|
|
802
|
-
export interface VaultDistributionUpdate {
|
|
803
|
-
/** Update type. */
|
|
804
|
-
type: "vaultDistribution";
|
|
805
|
-
/** Address of the vault distributing funds. */
|
|
806
|
-
vault: Hex;
|
|
807
|
-
/**
|
|
808
|
-
* Amount distributed in USDC.
|
|
809
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
810
|
-
*/
|
|
811
|
-
usdc: string;
|
|
812
|
-
}
|
|
813
|
-
/** Vault withdrawal event update. */
|
|
814
|
-
export interface VaultWithdrawUpdate {
|
|
815
|
-
/** Update type. */
|
|
816
|
-
type: "vaultWithdraw";
|
|
817
|
-
/** Vault address. */
|
|
818
|
-
vault: Hex;
|
|
819
|
-
/** Address of the user withdrawing funds. */
|
|
820
|
-
user: Hex;
|
|
821
|
-
/**
|
|
822
|
-
* Withdrawal request amount in USD.
|
|
823
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
824
|
-
*/
|
|
825
|
-
requestedUsd: string;
|
|
826
|
-
/**
|
|
827
|
-
* Withdrawal commission fee.
|
|
828
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
829
|
-
*/
|
|
830
|
-
commission: string;
|
|
831
|
-
/**
|
|
832
|
-
* Closing cost associated with positions.
|
|
833
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
834
|
-
*/
|
|
835
|
-
closingCost: string;
|
|
836
|
-
/**
|
|
837
|
-
* Basis value for withdrawal calculation.
|
|
838
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
839
|
-
*/
|
|
840
|
-
basis: string;
|
|
841
|
-
/**
|
|
842
|
-
* Net withdrawn amount in USD after fees and costs.
|
|
843
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
844
|
-
*/
|
|
845
|
-
netWithdrawnUsd: string;
|
|
846
|
-
}
|
|
847
|
-
/** Withdrawal update from an account. */
|
|
848
|
-
export interface WithdrawUpdate {
|
|
849
|
-
/** Update type. */
|
|
850
|
-
type: "withdraw";
|
|
851
|
-
/**
|
|
852
|
-
* Amount withdrawn in USDC.
|
|
853
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
854
|
-
*/
|
|
855
|
-
usdc: string;
|
|
856
|
-
/** Unique nonce for the withdrawal request. */
|
|
857
|
-
nonce: number;
|
|
858
|
-
/**
|
|
859
|
-
* Withdrawal fee.
|
|
860
|
-
* @pattern ^[0-9]+(\.[0-9]+)?$
|
|
861
|
-
*/
|
|
862
|
-
fee: string;
|
|
863
|
-
}
|
|
864
|
-
//# sourceMappingURL=accounts.d.ts.map
|