zklighter-perps 1.0.326 → 1.0.327
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 +0 -10
- package/apis/EventApi.ts +25 -18
- package/models/EventDetail.ts +8 -8
- package/models/ReqGetAccountPnLV2.ts +0 -8
- package/models/ReqGetEvents.ts +3 -3
- package/openapi.json +19 -36
- package/package.json +1 -1
package/apis/AccountApi.ts
CHANGED
|
@@ -262,8 +262,6 @@ export interface PnlV2Request {
|
|
|
262
262
|
resolution: PnlV2ResolutionEnum;
|
|
263
263
|
start_timestamp: number;
|
|
264
264
|
end_timestamp: number;
|
|
265
|
-
authorization?: string;
|
|
266
|
-
auth?: string;
|
|
267
265
|
}
|
|
268
266
|
|
|
269
267
|
export interface PositionFundingRequest {
|
|
@@ -1671,14 +1669,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1671
1669
|
|
|
1672
1670
|
const queryParameters: any = {};
|
|
1673
1671
|
|
|
1674
|
-
if (requestParameters['authorization'] != null) {
|
|
1675
|
-
queryParameters['authorization'] = requestParameters['authorization'];
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
if (requestParameters['auth'] != null) {
|
|
1679
|
-
queryParameters['auth'] = requestParameters['auth'];
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
1672
|
if (requestParameters['by'] != null) {
|
|
1683
1673
|
queryParameters['by'] = requestParameters['by'];
|
|
1684
1674
|
}
|
package/apis/EventApi.ts
CHANGED
|
@@ -35,13 +35,13 @@ export interface EventCreateRequest {
|
|
|
35
35
|
account_index: number;
|
|
36
36
|
title: string;
|
|
37
37
|
event_kind: EventCreateEventKindEnum;
|
|
38
|
-
|
|
38
|
+
start_at: number;
|
|
39
|
+
end_at: number;
|
|
39
40
|
authorization?: string;
|
|
40
41
|
auth?: string;
|
|
41
42
|
description?: string;
|
|
42
43
|
tag?: string;
|
|
43
44
|
recurrence_period_seconds?: number;
|
|
44
|
-
occurrence_end_at?: number;
|
|
45
45
|
metadata?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -62,8 +62,8 @@ export interface EventUpdateRequest {
|
|
|
62
62
|
tag?: string;
|
|
63
63
|
event_kind?: EventUpdateEventKindEnum;
|
|
64
64
|
recurrence_period_seconds?: number;
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
start_at?: number;
|
|
66
|
+
end_at?: number;
|
|
67
67
|
metadata?: string;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -113,10 +113,17 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
if (requestParameters['
|
|
116
|
+
if (requestParameters['start_at'] == null) {
|
|
117
117
|
throw new runtime.RequiredError(
|
|
118
|
-
'
|
|
119
|
-
'Required parameter "
|
|
118
|
+
'start_at',
|
|
119
|
+
'Required parameter "start_at" was null or undefined when calling eventCreate().'
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (requestParameters['end_at'] == null) {
|
|
124
|
+
throw new runtime.RequiredError(
|
|
125
|
+
'end_at',
|
|
126
|
+
'Required parameter "end_at" was null or undefined when calling eventCreate().'
|
|
120
127
|
);
|
|
121
128
|
}
|
|
122
129
|
|
|
@@ -170,12 +177,12 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
170
177
|
formParams.append('recurrence_period_seconds', requestParameters['recurrence_period_seconds'] as any);
|
|
171
178
|
}
|
|
172
179
|
|
|
173
|
-
if (requestParameters['
|
|
174
|
-
formParams.append('
|
|
180
|
+
if (requestParameters['start_at'] != null) {
|
|
181
|
+
formParams.append('start_at', requestParameters['start_at'] as any);
|
|
175
182
|
}
|
|
176
183
|
|
|
177
|
-
if (requestParameters['
|
|
178
|
-
formParams.append('
|
|
184
|
+
if (requestParameters['end_at'] != null) {
|
|
185
|
+
formParams.append('end_at', requestParameters['end_at'] as any);
|
|
179
186
|
}
|
|
180
187
|
|
|
181
188
|
if (requestParameters['metadata'] != null) {
|
|
@@ -344,12 +351,12 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
344
351
|
formParams.append('recurrence_period_seconds', requestParameters['recurrence_period_seconds'] as any);
|
|
345
352
|
}
|
|
346
353
|
|
|
347
|
-
if (requestParameters['
|
|
348
|
-
formParams.append('
|
|
354
|
+
if (requestParameters['start_at'] != null) {
|
|
355
|
+
formParams.append('start_at', requestParameters['start_at'] as any);
|
|
349
356
|
}
|
|
350
357
|
|
|
351
|
-
if (requestParameters['
|
|
352
|
-
formParams.append('
|
|
358
|
+
if (requestParameters['end_at'] != null) {
|
|
359
|
+
formParams.append('end_at', requestParameters['end_at'] as any);
|
|
353
360
|
}
|
|
354
361
|
|
|
355
362
|
if (requestParameters['metadata'] != null) {
|
|
@@ -381,7 +388,7 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
381
388
|
}
|
|
382
389
|
|
|
383
390
|
/**
|
|
384
|
-
* Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id.
|
|
391
|
+
* Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. start_at sorting uses (start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
|
|
385
392
|
* events
|
|
386
393
|
*/
|
|
387
394
|
async eventsRaw(requestParameters: EventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetEvents>> {
|
|
@@ -448,7 +455,7 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
448
455
|
}
|
|
449
456
|
|
|
450
457
|
/**
|
|
451
|
-
* Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id.
|
|
458
|
+
* Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. start_at sorting uses (start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
|
|
452
459
|
* events
|
|
453
460
|
*/
|
|
454
461
|
async events(requestParameters: EventsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetEvents> {
|
|
@@ -487,7 +494,7 @@ export type EventsEventKindEnum = typeof EventsEventKindEnum[keyof typeof Events
|
|
|
487
494
|
*/
|
|
488
495
|
export const EventsSortEnum = {
|
|
489
496
|
Id: 'id',
|
|
490
|
-
|
|
497
|
+
StartAt: 'start_at'
|
|
491
498
|
} as const;
|
|
492
499
|
export type EventsSortEnum = typeof EventsSortEnum[keyof typeof EventsSortEnum];
|
|
493
500
|
/**
|
package/models/EventDetail.ts
CHANGED
|
@@ -79,13 +79,13 @@ export interface EventDetail {
|
|
|
79
79
|
* @type {number}
|
|
80
80
|
* @memberof EventDetail
|
|
81
81
|
*/
|
|
82
|
-
|
|
82
|
+
start_at: number;
|
|
83
83
|
/**
|
|
84
84
|
*
|
|
85
85
|
* @type {number}
|
|
86
86
|
* @memberof EventDetail
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
end_at: number;
|
|
89
89
|
/**
|
|
90
90
|
*
|
|
91
91
|
* @type {{ [key: string]: any; }}
|
|
@@ -129,8 +129,8 @@ export function instanceOfEventDetail(value: object): value is EventDetail {
|
|
|
129
129
|
if (!('tag' in value) || value['tag'] === undefined) return false;
|
|
130
130
|
if (!('event_kind' in value) || value['event_kind'] === undefined) return false;
|
|
131
131
|
if (!('recurrence_period_seconds' in value) || value['recurrence_period_seconds'] === undefined) return false;
|
|
132
|
-
if (!('
|
|
133
|
-
if (!('
|
|
132
|
+
if (!('start_at' in value) || value['start_at'] === undefined) return false;
|
|
133
|
+
if (!('end_at' in value) || value['end_at'] === undefined) return false;
|
|
134
134
|
if (!('metadata' in value) || value['metadata'] === undefined) return false;
|
|
135
135
|
if (!('order_books' in value) || value['order_books'] === undefined) return false;
|
|
136
136
|
if (!('lifetime_quote_token_volume' in value) || value['lifetime_quote_token_volume'] === undefined) return false;
|
|
@@ -155,8 +155,8 @@ export function EventDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
155
155
|
'tag': json['tag'],
|
|
156
156
|
'event_kind': json['event_kind'],
|
|
157
157
|
'recurrence_period_seconds': json['recurrence_period_seconds'],
|
|
158
|
-
'
|
|
159
|
-
'
|
|
158
|
+
'start_at': json['start_at'],
|
|
159
|
+
'end_at': json['end_at'],
|
|
160
160
|
'metadata': json['metadata'],
|
|
161
161
|
'order_books': ((json['order_books'] as Array<any>).map(EventOrderBookEntryFromJSON)),
|
|
162
162
|
'lifetime_quote_token_volume': json['lifetime_quote_token_volume'],
|
|
@@ -177,8 +177,8 @@ export function EventDetailToJSON(value?: EventDetail | null): any {
|
|
|
177
177
|
'tag': value['tag'],
|
|
178
178
|
'event_kind': value['event_kind'],
|
|
179
179
|
'recurrence_period_seconds': value['recurrence_period_seconds'],
|
|
180
|
-
'
|
|
181
|
-
'
|
|
180
|
+
'start_at': value['start_at'],
|
|
181
|
+
'end_at': value['end_at'],
|
|
182
182
|
'metadata': value['metadata'],
|
|
183
183
|
'order_books': ((value['order_books'] as Array<any>).map(EventOrderBookEntryToJSON)),
|
|
184
184
|
'lifetime_quote_token_volume': value['lifetime_quote_token_volume'],
|
|
@@ -19,12 +19,6 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ReqGetAccountPnLV2
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetAccountPnLV2 {
|
|
22
|
-
/**
|
|
23
|
-
* made optional to support header auth clients
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof ReqGetAccountPnLV2
|
|
26
|
-
*/
|
|
27
|
-
auth?: string;
|
|
28
22
|
/**
|
|
29
23
|
*
|
|
30
24
|
* @type {string}
|
|
@@ -98,7 +92,6 @@ export function ReqGetAccountPnLV2FromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
98
92
|
}
|
|
99
93
|
return {
|
|
100
94
|
|
|
101
|
-
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
102
95
|
'by': json['by'],
|
|
103
96
|
'value': json['value'],
|
|
104
97
|
'resolution': json['resolution'],
|
|
@@ -113,7 +106,6 @@ export function ReqGetAccountPnLV2ToJSON(value?: ReqGetAccountPnLV2 | null): any
|
|
|
113
106
|
}
|
|
114
107
|
return {
|
|
115
108
|
|
|
116
|
-
'auth': value['auth'],
|
|
117
109
|
'by': value['by'],
|
|
118
110
|
'value': value['value'],
|
|
119
111
|
'resolution': value['resolution'],
|
package/models/ReqGetEvents.ts
CHANGED
|
@@ -68,13 +68,13 @@ export interface ReqGetEvents {
|
|
|
68
68
|
*/
|
|
69
69
|
event_kind?: ReqGetEventsEventKindEnum;
|
|
70
70
|
/**
|
|
71
|
-
* inclusive
|
|
71
|
+
* inclusive start_at, Unix milliseconds
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof ReqGetEvents
|
|
74
74
|
*/
|
|
75
75
|
start_from?: number;
|
|
76
76
|
/**
|
|
77
|
-
* exclusive
|
|
77
|
+
* exclusive start_at, Unix milliseconds
|
|
78
78
|
* @type {number}
|
|
79
79
|
* @memberof ReqGetEvents
|
|
80
80
|
*/
|
|
@@ -108,7 +108,7 @@ export type ReqGetEventsEventKindEnum = typeof ReqGetEventsEventKindEnum[keyof t
|
|
|
108
108
|
*/
|
|
109
109
|
export const ReqGetEventsSortEnum = {
|
|
110
110
|
Id: 'id',
|
|
111
|
-
|
|
111
|
+
StartAt: 'start_at'
|
|
112
112
|
} as const;
|
|
113
113
|
export type ReqGetEventsSortEnum = typeof ReqGetEventsSortEnum[keyof typeof ReqGetEventsSortEnum];
|
|
114
114
|
|
package/openapi.json
CHANGED
|
@@ -1843,7 +1843,7 @@
|
|
|
1843
1843
|
},
|
|
1844
1844
|
{
|
|
1845
1845
|
"name": "start_from",
|
|
1846
|
-
"description": " inclusive
|
|
1846
|
+
"description": " inclusive start_at, Unix milliseconds",
|
|
1847
1847
|
"in": "query",
|
|
1848
1848
|
"required": false,
|
|
1849
1849
|
"type": "integer",
|
|
@@ -1851,7 +1851,7 @@
|
|
|
1851
1851
|
},
|
|
1852
1852
|
{
|
|
1853
1853
|
"name": "start_before",
|
|
1854
|
-
"description": " exclusive
|
|
1854
|
+
"description": " exclusive start_at, Unix milliseconds",
|
|
1855
1855
|
"in": "query",
|
|
1856
1856
|
"required": false,
|
|
1857
1857
|
"type": "integer",
|
|
@@ -1864,7 +1864,7 @@
|
|
|
1864
1864
|
"type": "string",
|
|
1865
1865
|
"enum": [
|
|
1866
1866
|
"id",
|
|
1867
|
-
"
|
|
1867
|
+
"start_at"
|
|
1868
1868
|
],
|
|
1869
1869
|
"default": "id"
|
|
1870
1870
|
},
|
|
@@ -1886,7 +1886,7 @@
|
|
|
1886
1886
|
"consumes": [
|
|
1887
1887
|
"multipart/form-data"
|
|
1888
1888
|
],
|
|
1889
|
-
"description": "Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id.
|
|
1889
|
+
"description": "Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. start_at sorting uses (start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events."
|
|
1890
1890
|
}
|
|
1891
1891
|
},
|
|
1892
1892
|
"/api/v1/exchangeMetrics": {
|
|
@@ -7262,20 +7262,6 @@
|
|
|
7262
7262
|
}
|
|
7263
7263
|
},
|
|
7264
7264
|
"parameters": [
|
|
7265
|
-
{
|
|
7266
|
-
"name": "authorization",
|
|
7267
|
-
"description": " make required after integ is done",
|
|
7268
|
-
"in": "query",
|
|
7269
|
-
"required": false,
|
|
7270
|
-
"type": "string"
|
|
7271
|
-
},
|
|
7272
|
-
{
|
|
7273
|
-
"name": "auth",
|
|
7274
|
-
"description": " made optional to support header auth clients",
|
|
7275
|
-
"in": "query",
|
|
7276
|
-
"required": false,
|
|
7277
|
-
"type": "string"
|
|
7278
|
-
},
|
|
7279
7265
|
{
|
|
7280
7266
|
"name": "by",
|
|
7281
7267
|
"in": "query",
|
|
@@ -10042,11 +10028,11 @@
|
|
|
10042
10028
|
"type": "integer",
|
|
10043
10029
|
"format": "int32"
|
|
10044
10030
|
},
|
|
10045
|
-
"
|
|
10031
|
+
"start_at": {
|
|
10046
10032
|
"type": "integer",
|
|
10047
10033
|
"format": "int64"
|
|
10048
10034
|
},
|
|
10049
|
-
"
|
|
10035
|
+
"end_at": {
|
|
10050
10036
|
"type": "integer",
|
|
10051
10037
|
"format": "int64"
|
|
10052
10038
|
},
|
|
@@ -10076,8 +10062,8 @@
|
|
|
10076
10062
|
"tag",
|
|
10077
10063
|
"event_kind",
|
|
10078
10064
|
"recurrence_period_seconds",
|
|
10079
|
-
"
|
|
10080
|
-
"
|
|
10065
|
+
"start_at",
|
|
10066
|
+
"end_at",
|
|
10081
10067
|
"metadata",
|
|
10082
10068
|
"order_books",
|
|
10083
10069
|
"lifetime_quote_token_volume"
|
|
@@ -14689,15 +14675,15 @@
|
|
|
14689
14675
|
"format": "int32",
|
|
14690
14676
|
"description": " 0 for one-off events"
|
|
14691
14677
|
},
|
|
14692
|
-
"
|
|
14678
|
+
"start_at": {
|
|
14693
14679
|
"type": "integer",
|
|
14694
14680
|
"format": "int64",
|
|
14695
14681
|
"description": " Unix milliseconds; observation time, not trading time"
|
|
14696
14682
|
},
|
|
14697
|
-
"
|
|
14683
|
+
"end_at": {
|
|
14698
14684
|
"type": "integer",
|
|
14699
14685
|
"format": "int64",
|
|
14700
|
-
"description": "
|
|
14686
|
+
"description": " Unix milliseconds; must be after start_at"
|
|
14701
14687
|
},
|
|
14702
14688
|
"metadata": {
|
|
14703
14689
|
"type": "string",
|
|
@@ -14709,7 +14695,8 @@
|
|
|
14709
14695
|
"account_index",
|
|
14710
14696
|
"title",
|
|
14711
14697
|
"event_kind",
|
|
14712
|
-
"
|
|
14698
|
+
"start_at",
|
|
14699
|
+
"end_at"
|
|
14713
14700
|
]
|
|
14714
14701
|
},
|
|
14715
14702
|
"ReqCreateGuild": {
|
|
@@ -15339,10 +15326,6 @@
|
|
|
15339
15326
|
"ReqGetAccountPnLV2": {
|
|
15340
15327
|
"type": "object",
|
|
15341
15328
|
"properties": {
|
|
15342
|
-
"auth": {
|
|
15343
|
-
"type": "string",
|
|
15344
|
-
"description": " made optional to support header auth clients"
|
|
15345
|
-
},
|
|
15346
15329
|
"by": {
|
|
15347
15330
|
"type": "string",
|
|
15348
15331
|
"enum": [
|
|
@@ -15713,18 +15696,18 @@
|
|
|
15713
15696
|
"start_from": {
|
|
15714
15697
|
"type": "integer",
|
|
15715
15698
|
"format": "int64",
|
|
15716
|
-
"description": " inclusive
|
|
15699
|
+
"description": " inclusive start_at, Unix milliseconds"
|
|
15717
15700
|
},
|
|
15718
15701
|
"start_before": {
|
|
15719
15702
|
"type": "integer",
|
|
15720
15703
|
"format": "int64",
|
|
15721
|
-
"description": " exclusive
|
|
15704
|
+
"description": " exclusive start_at, Unix milliseconds"
|
|
15722
15705
|
},
|
|
15723
15706
|
"sort": {
|
|
15724
15707
|
"type": "string",
|
|
15725
15708
|
"enum": [
|
|
15726
15709
|
"id",
|
|
15727
|
-
"
|
|
15710
|
+
"start_at"
|
|
15728
15711
|
],
|
|
15729
15712
|
"default": "id"
|
|
15730
15713
|
},
|
|
@@ -17564,15 +17547,15 @@
|
|
|
17564
17547
|
"format": "int32",
|
|
17565
17548
|
"description": " 0 for one-off events"
|
|
17566
17549
|
},
|
|
17567
|
-
"
|
|
17550
|
+
"start_at": {
|
|
17568
17551
|
"type": "integer",
|
|
17569
17552
|
"format": "int64",
|
|
17570
17553
|
"description": " Unix milliseconds; observation time, not trading time"
|
|
17571
17554
|
},
|
|
17572
|
-
"
|
|
17555
|
+
"end_at": {
|
|
17573
17556
|
"type": "integer",
|
|
17574
17557
|
"format": "int64",
|
|
17575
|
-
"description": "
|
|
17558
|
+
"description": " Unix milliseconds; must be after start_at"
|
|
17576
17559
|
},
|
|
17577
17560
|
"metadata": {
|
|
17578
17561
|
"type": "string",
|