zklighter-perps 1.0.114 → 1.0.115
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/apis/AccountApi.ts +2 -16
- package/apis/OrderApi.ts +12 -0
- package/models/ReqGetAccountPnL.ts +2 -3
- package/models/ReqGetPositionFunding.ts +2 -3
- package/models/ReqGetTrades.ts +9 -0
- package/openapi.json +12 -4
- package/package.json +1 -1
package/apis/AccountApi.ts
CHANGED
|
@@ -81,20 +81,20 @@ export interface LeaderboardRequest {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export interface PnlRequest {
|
|
84
|
-
auth: string;
|
|
85
84
|
by: PnlByEnum;
|
|
86
85
|
value: string;
|
|
87
86
|
resolution: PnlResolutionEnum;
|
|
88
87
|
start_timestamp: number;
|
|
89
88
|
end_timestamp: number;
|
|
90
89
|
count_back: number;
|
|
90
|
+
auth?: string;
|
|
91
91
|
ignore_transfers?: boolean;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export interface PositionFundingRequest {
|
|
95
|
-
auth: string;
|
|
96
95
|
account_index: number;
|
|
97
96
|
limit: number;
|
|
97
|
+
auth?: string;
|
|
98
98
|
market_id?: number;
|
|
99
99
|
cursor?: string;
|
|
100
100
|
side?: PositionFundingSideEnum;
|
|
@@ -409,13 +409,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
409
409
|
* pnl
|
|
410
410
|
*/
|
|
411
411
|
async pnlRaw(requestParameters: PnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPnL>> {
|
|
412
|
-
if (requestParameters['auth'] == null) {
|
|
413
|
-
throw new runtime.RequiredError(
|
|
414
|
-
'auth',
|
|
415
|
-
'Required parameter "auth" was null or undefined when calling pnl().'
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
412
|
if (requestParameters['by'] == null) {
|
|
420
413
|
throw new runtime.RequiredError(
|
|
421
414
|
'by',
|
|
@@ -518,13 +511,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
518
511
|
* positionFunding
|
|
519
512
|
*/
|
|
520
513
|
async positionFundingRaw(requestParameters: PositionFundingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PositionFundings>> {
|
|
521
|
-
if (requestParameters['auth'] == null) {
|
|
522
|
-
throw new runtime.RequiredError(
|
|
523
|
-
'auth',
|
|
524
|
-
'Required parameter "auth" was null or undefined when calling positionFunding().'
|
|
525
|
-
);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
514
|
if (requestParameters['account_index'] == null) {
|
|
529
515
|
throw new runtime.RequiredError(
|
|
530
516
|
'account_index',
|
package/apis/OrderApi.ts
CHANGED
|
@@ -83,6 +83,7 @@ export interface RecentTradesRequest {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export interface TradesRequest {
|
|
86
|
+
auth: string;
|
|
86
87
|
sort_by: TradesSortByEnum;
|
|
87
88
|
limit: number;
|
|
88
89
|
market_id?: number;
|
|
@@ -510,6 +511,13 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
510
511
|
* trades
|
|
511
512
|
*/
|
|
512
513
|
async tradesRaw(requestParameters: TradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Trades>> {
|
|
514
|
+
if (requestParameters['auth'] == null) {
|
|
515
|
+
throw new runtime.RequiredError(
|
|
516
|
+
'auth',
|
|
517
|
+
'Required parameter "auth" was null or undefined when calling trades().'
|
|
518
|
+
);
|
|
519
|
+
}
|
|
520
|
+
|
|
513
521
|
if (requestParameters['sort_by'] == null) {
|
|
514
522
|
throw new runtime.RequiredError(
|
|
515
523
|
'sort_by',
|
|
@@ -526,6 +534,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
526
534
|
|
|
527
535
|
const queryParameters: any = {};
|
|
528
536
|
|
|
537
|
+
if (requestParameters['auth'] != null) {
|
|
538
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
539
|
+
}
|
|
540
|
+
|
|
529
541
|
if (requestParameters['market_id'] != null) {
|
|
530
542
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
531
543
|
}
|
|
@@ -24,7 +24,7 @@ export interface ReqGetAccountPnL {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetAccountPnL
|
|
26
26
|
*/
|
|
27
|
-
auth
|
|
27
|
+
auth?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -96,7 +96,6 @@ export type ReqGetAccountPnLResolutionEnum = typeof ReqGetAccountPnLResolutionEn
|
|
|
96
96
|
* Check if a given object implements the ReqGetAccountPnL interface.
|
|
97
97
|
*/
|
|
98
98
|
export function instanceOfReqGetAccountPnL(value: object): value is ReqGetAccountPnL {
|
|
99
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
100
99
|
if (!('by' in value) || value['by'] === undefined) return false;
|
|
101
100
|
if (!('value' in value) || value['value'] === undefined) return false;
|
|
102
101
|
if (!('resolution' in value) || value['resolution'] === undefined) return false;
|
|
@@ -116,7 +115,7 @@ export function ReqGetAccountPnLFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
116
115
|
}
|
|
117
116
|
return {
|
|
118
117
|
|
|
119
|
-
'auth': json['auth'],
|
|
118
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
120
119
|
'by': json['by'],
|
|
121
120
|
'value': json['value'],
|
|
122
121
|
'resolution': json['resolution'],
|
|
@@ -24,7 +24,7 @@ export interface ReqGetPositionFunding {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetPositionFunding
|
|
26
26
|
*/
|
|
27
|
-
auth
|
|
27
|
+
auth?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
@@ -73,7 +73,6 @@ export type ReqGetPositionFundingSideEnum = typeof ReqGetPositionFundingSideEnum
|
|
|
73
73
|
* Check if a given object implements the ReqGetPositionFunding interface.
|
|
74
74
|
*/
|
|
75
75
|
export function instanceOfReqGetPositionFunding(value: object): value is ReqGetPositionFunding {
|
|
76
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
77
76
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
78
77
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
79
78
|
return true;
|
|
@@ -89,7 +88,7 @@ export function ReqGetPositionFundingFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
89
88
|
}
|
|
90
89
|
return {
|
|
91
90
|
|
|
92
|
-
'auth': json['auth'],
|
|
91
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
93
92
|
'account_index': json['account_index'],
|
|
94
93
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
95
94
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
package/models/ReqGetTrades.ts
CHANGED
|
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ReqGetTrades
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetTrades {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetTrades
|
|
26
|
+
*/
|
|
27
|
+
auth: string;
|
|
22
28
|
/**
|
|
23
29
|
*
|
|
24
30
|
* @type {number}
|
|
@@ -100,6 +106,7 @@ export type ReqGetTradesSortDirEnum = typeof ReqGetTradesSortDirEnum[keyof typeo
|
|
|
100
106
|
* Check if a given object implements the ReqGetTrades interface.
|
|
101
107
|
*/
|
|
102
108
|
export function instanceOfReqGetTrades(value: object): value is ReqGetTrades {
|
|
109
|
+
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
103
110
|
if (!('sort_by' in value) || value['sort_by'] === undefined) return false;
|
|
104
111
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
105
112
|
return true;
|
|
@@ -115,6 +122,7 @@ export function ReqGetTradesFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
115
122
|
}
|
|
116
123
|
return {
|
|
117
124
|
|
|
125
|
+
'auth': json['auth'],
|
|
118
126
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
119
127
|
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
120
128
|
'order_index': json['order_index'] == null ? undefined : json['order_index'],
|
|
@@ -133,6 +141,7 @@ export function ReqGetTradesToJSON(value?: ReqGetTrades | null): any {
|
|
|
133
141
|
}
|
|
134
142
|
return {
|
|
135
143
|
|
|
144
|
+
'auth': value['auth'],
|
|
136
145
|
'market_id': value['market_id'],
|
|
137
146
|
'account_index': value['account_index'],
|
|
138
147
|
'order_index': value['order_index'],
|
package/openapi.json
CHANGED
|
@@ -1616,7 +1616,7 @@
|
|
|
1616
1616
|
{
|
|
1617
1617
|
"name": "auth",
|
|
1618
1618
|
"in": "query",
|
|
1619
|
-
"required":
|
|
1619
|
+
"required": false,
|
|
1620
1620
|
"type": "string"
|
|
1621
1621
|
},
|
|
1622
1622
|
{
|
|
@@ -1713,7 +1713,7 @@
|
|
|
1713
1713
|
{
|
|
1714
1714
|
"name": "auth",
|
|
1715
1715
|
"in": "query",
|
|
1716
|
-
"required":
|
|
1716
|
+
"required": false,
|
|
1717
1717
|
"type": "string"
|
|
1718
1718
|
},
|
|
1719
1719
|
{
|
|
@@ -2165,6 +2165,12 @@
|
|
|
2165
2165
|
}
|
|
2166
2166
|
},
|
|
2167
2167
|
"parameters": [
|
|
2168
|
+
{
|
|
2169
|
+
"name": "auth",
|
|
2170
|
+
"in": "query",
|
|
2171
|
+
"required": true,
|
|
2172
|
+
"type": "string"
|
|
2173
|
+
},
|
|
2168
2174
|
{
|
|
2169
2175
|
"name": "market_id",
|
|
2170
2176
|
"in": "query",
|
|
@@ -5633,7 +5639,6 @@
|
|
|
5633
5639
|
},
|
|
5634
5640
|
"title": "ReqGetAccountPnL",
|
|
5635
5641
|
"required": [
|
|
5636
|
-
"auth",
|
|
5637
5642
|
"by",
|
|
5638
5643
|
"value",
|
|
5639
5644
|
"resolution",
|
|
@@ -6022,7 +6027,6 @@
|
|
|
6022
6027
|
},
|
|
6023
6028
|
"title": "ReqGetPositionFunding",
|
|
6024
6029
|
"required": [
|
|
6025
|
-
"auth",
|
|
6026
6030
|
"account_index",
|
|
6027
6031
|
"limit"
|
|
6028
6032
|
]
|
|
@@ -6178,6 +6182,9 @@
|
|
|
6178
6182
|
"ReqGetTrades": {
|
|
6179
6183
|
"type": "object",
|
|
6180
6184
|
"properties": {
|
|
6185
|
+
"auth": {
|
|
6186
|
+
"type": "string"
|
|
6187
|
+
},
|
|
6181
6188
|
"market_id": {
|
|
6182
6189
|
"type": "integer",
|
|
6183
6190
|
"format": "uint8",
|
|
@@ -6230,6 +6237,7 @@
|
|
|
6230
6237
|
},
|
|
6231
6238
|
"title": "ReqGetTrades",
|
|
6232
6239
|
"required": [
|
|
6240
|
+
"auth",
|
|
6233
6241
|
"sort_by",
|
|
6234
6242
|
"limit"
|
|
6235
6243
|
]
|