zklighter-perps 1.0.98 → 1.0.99
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/models/DetailedAccount.ts +15 -0
- package/models/PnLEntry.ts +18 -0
- package/openapi.json +20 -1
- package/package.json +1 -1
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
AccountMarketStatsFromJSONTyped,
|
|
20
20
|
AccountMarketStatsToJSON,
|
|
21
21
|
} from './AccountMarketStats';
|
|
22
|
+
import type { AccountTradeStats } from './AccountTradeStats';
|
|
23
|
+
import {
|
|
24
|
+
AccountTradeStatsFromJSON,
|
|
25
|
+
AccountTradeStatsFromJSONTyped,
|
|
26
|
+
AccountTradeStatsToJSON,
|
|
27
|
+
} from './AccountTradeStats';
|
|
22
28
|
import type { AccountPosition } from './AccountPosition';
|
|
23
29
|
import {
|
|
24
30
|
AccountPositionFromJSON,
|
|
@@ -140,6 +146,12 @@ export interface DetailedAccount {
|
|
|
140
146
|
* @memberof DetailedAccount
|
|
141
147
|
*/
|
|
142
148
|
positions: Array<AccountPosition>;
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* @type {Array<AccountTradeStats>}
|
|
152
|
+
* @memberof DetailedAccount
|
|
153
|
+
*/
|
|
154
|
+
trade_stats: Array<AccountTradeStats>;
|
|
143
155
|
/**
|
|
144
156
|
*
|
|
145
157
|
* @type {string}
|
|
@@ -185,6 +197,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
185
197
|
if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false;
|
|
186
198
|
if (!('max_referral_usage_limit' in value) || value['max_referral_usage_limit'] === undefined) return false;
|
|
187
199
|
if (!('positions' in value) || value['positions'] === undefined) return false;
|
|
200
|
+
if (!('trade_stats' in value) || value['trade_stats'] === undefined) return false;
|
|
188
201
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
189
202
|
if (!('market_stats' in value) || value['market_stats'] === undefined) return false;
|
|
190
203
|
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
@@ -218,6 +231,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
218
231
|
'referral_points_percentage': json['referral_points_percentage'],
|
|
219
232
|
'max_referral_usage_limit': json['max_referral_usage_limit'],
|
|
220
233
|
'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
234
|
+
'trade_stats': ((json['trade_stats'] as Array<any>).map(AccountTradeStatsFromJSON)),
|
|
221
235
|
'total_asset_value': json['total_asset_value'],
|
|
222
236
|
'market_stats': ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
|
|
223
237
|
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
@@ -247,6 +261,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
247
261
|
'referral_points_percentage': value['referral_points_percentage'],
|
|
248
262
|
'max_referral_usage_limit': value['max_referral_usage_limit'],
|
|
249
263
|
'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
264
|
+
'trade_stats': ((value['trade_stats'] as Array<any>).map(AccountTradeStatsToJSON)),
|
|
250
265
|
'total_asset_value': value['total_asset_value'],
|
|
251
266
|
'market_stats': ((value['market_stats'] as Array<any>).map(AccountMarketStatsToJSON)),
|
|
252
267
|
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
package/models/PnLEntry.ts
CHANGED
|
@@ -43,6 +43,18 @@ export interface PnLEntry {
|
|
|
43
43
|
* @memberof PnLEntry
|
|
44
44
|
*/
|
|
45
45
|
pool_pnl: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PnLEntry
|
|
50
|
+
*/
|
|
51
|
+
inflow: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof PnLEntry
|
|
56
|
+
*/
|
|
57
|
+
outflow: number;
|
|
46
58
|
}
|
|
47
59
|
|
|
48
60
|
/**
|
|
@@ -53,6 +65,8 @@ export function instanceOfPnLEntry(value: object): value is PnLEntry {
|
|
|
53
65
|
if (!('value' in value) || value['value'] === undefined) return false;
|
|
54
66
|
if (!('trade_pnl' in value) || value['trade_pnl'] === undefined) return false;
|
|
55
67
|
if (!('pool_pnl' in value) || value['pool_pnl'] === undefined) return false;
|
|
68
|
+
if (!('inflow' in value) || value['inflow'] === undefined) return false;
|
|
69
|
+
if (!('outflow' in value) || value['outflow'] === undefined) return false;
|
|
56
70
|
return true;
|
|
57
71
|
}
|
|
58
72
|
|
|
@@ -70,6 +84,8 @@ export function PnLEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
70
84
|
'value': json['value'],
|
|
71
85
|
'trade_pnl': json['trade_pnl'],
|
|
72
86
|
'pool_pnl': json['pool_pnl'],
|
|
87
|
+
'inflow': json['inflow'],
|
|
88
|
+
'outflow': json['outflow'],
|
|
73
89
|
};
|
|
74
90
|
}
|
|
75
91
|
|
|
@@ -83,6 +99,8 @@ export function PnLEntryToJSON(value?: PnLEntry | null): any {
|
|
|
83
99
|
'value': value['value'],
|
|
84
100
|
'trade_pnl': value['trade_pnl'],
|
|
85
101
|
'pool_pnl': value['pool_pnl'],
|
|
102
|
+
'inflow': value['inflow'],
|
|
103
|
+
'outflow': value['outflow'],
|
|
86
104
|
};
|
|
87
105
|
}
|
|
88
106
|
|
package/openapi.json
CHANGED
|
@@ -3387,6 +3387,12 @@
|
|
|
3387
3387
|
"$ref": "#/definitions/AccountPosition"
|
|
3388
3388
|
}
|
|
3389
3389
|
},
|
|
3390
|
+
"trade_stats": {
|
|
3391
|
+
"type": "array",
|
|
3392
|
+
"items": {
|
|
3393
|
+
"$ref": "#/definitions/AccountTradeStats"
|
|
3394
|
+
}
|
|
3395
|
+
},
|
|
3390
3396
|
"total_asset_value": {
|
|
3391
3397
|
"type": "string",
|
|
3392
3398
|
"example": "19995"
|
|
@@ -3424,6 +3430,7 @@
|
|
|
3424
3430
|
"referral_points_percentage",
|
|
3425
3431
|
"max_referral_usage_limit",
|
|
3426
3432
|
"positions",
|
|
3433
|
+
"trade_stats",
|
|
3427
3434
|
"total_asset_value",
|
|
3428
3435
|
"market_stats",
|
|
3429
3436
|
"pool_info",
|
|
@@ -4701,6 +4708,16 @@
|
|
|
4701
4708
|
"type": "number",
|
|
4702
4709
|
"format": "double",
|
|
4703
4710
|
"example": "12.0"
|
|
4711
|
+
},
|
|
4712
|
+
"inflow": {
|
|
4713
|
+
"type": "number",
|
|
4714
|
+
"format": "double",
|
|
4715
|
+
"example": "12.0"
|
|
4716
|
+
},
|
|
4717
|
+
"outflow": {
|
|
4718
|
+
"type": "number",
|
|
4719
|
+
"format": "double",
|
|
4720
|
+
"example": "12.0"
|
|
4704
4721
|
}
|
|
4705
4722
|
},
|
|
4706
4723
|
"title": "PnLEntry",
|
|
@@ -4708,7 +4725,9 @@
|
|
|
4708
4725
|
"timestamp",
|
|
4709
4726
|
"value",
|
|
4710
4727
|
"trade_pnl",
|
|
4711
|
-
"pool_pnl"
|
|
4728
|
+
"pool_pnl",
|
|
4729
|
+
"inflow",
|
|
4730
|
+
"outflow"
|
|
4712
4731
|
]
|
|
4713
4732
|
},
|
|
4714
4733
|
"PositionFunding": {
|