zklighter-perps 1.0.311 → 1.0.312
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/.openapi-generator/FILES +0 -1
- package/apis/EventApi.ts +10 -68
- package/apis/OrderApi.ts +8 -7
- package/models/EventOrderBookEntry.ts +18 -0
- package/models/NotificationPreferences.ts +9 -0
- package/models/PnLV2Entry.ts +9 -0
- package/models/ReqGetAccountActiveOrders.ts +2 -1
- package/models/ReqGetAccountInactiveOrders.ts +2 -1
- package/models/ReqGetEvents.ts +13 -5
- package/models/ReqGetOrderBookDetails.ts +1 -2
- package/models/ReqGetOrderBooks.ts +1 -2
- package/models/ReqGetTrades.ts +2 -1
- package/models/index.ts +0 -1
- package/openapi.json +58 -124
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -169,7 +169,6 @@ models/ReqGetAccount.ts
|
|
|
169
169
|
models/ReqGetAccountActiveOrders.ts
|
|
170
170
|
models/ReqGetAccountApiKeys.ts
|
|
171
171
|
models/ReqGetAccountByL1Address.ts
|
|
172
|
-
models/ReqGetAccountEvents.ts
|
|
173
172
|
models/ReqGetAccountInactiveOrders.ts
|
|
174
173
|
models/ReqGetAccountLimits.ts
|
|
175
174
|
models/ReqGetAccountMetadata.ts
|
package/apis/EventApi.ts
CHANGED
|
@@ -31,14 +31,6 @@ import {
|
|
|
31
31
|
ResultCodeToJSON,
|
|
32
32
|
} from '../models/index';
|
|
33
33
|
|
|
34
|
-
export interface AccountEventsRequest {
|
|
35
|
-
account_index: number;
|
|
36
|
-
authorization?: string;
|
|
37
|
-
auth?: string;
|
|
38
|
-
cursor?: number;
|
|
39
|
-
limit?: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
34
|
export interface EventCreateRequest {
|
|
43
35
|
account_index: number;
|
|
44
36
|
title: string;
|
|
@@ -76,7 +68,8 @@ export interface EventUpdateRequest {
|
|
|
76
68
|
}
|
|
77
69
|
|
|
78
70
|
export interface EventsRequest {
|
|
79
|
-
|
|
71
|
+
event_ids?: string;
|
|
72
|
+
market_ids?: string;
|
|
80
73
|
creator_account_index?: number;
|
|
81
74
|
cursor?: number;
|
|
82
75
|
active?: boolean;
|
|
@@ -94,61 +87,6 @@ export interface EventsRequest {
|
|
|
94
87
|
*/
|
|
95
88
|
export class EventApi extends runtime.BaseAPI {
|
|
96
89
|
|
|
97
|
-
/**
|
|
98
|
-
* Get registered events present in an authenticated account\'s retained trade history. Events disappear once all of their account trades are pruned. Ordered by descending event id; cursor is exclusive. Returns the same event details and registered outcomes as /api/v1/events. next_cursor is 0 when no more events remain. Participation is indexed asynchronously; orders with no fills are excluded. Missing cached event metadata is loaded from the database.
|
|
99
|
-
* accountEvents
|
|
100
|
-
*/
|
|
101
|
-
async accountEventsRaw(requestParameters: AccountEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetEvents>> {
|
|
102
|
-
if (requestParameters['account_index'] == null) {
|
|
103
|
-
throw new runtime.RequiredError(
|
|
104
|
-
'account_index',
|
|
105
|
-
'Required parameter "account_index" was null or undefined when calling accountEvents().'
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const queryParameters: any = {};
|
|
110
|
-
|
|
111
|
-
if (requestParameters['authorization'] != null) {
|
|
112
|
-
queryParameters['authorization'] = requestParameters['authorization'];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (requestParameters['auth'] != null) {
|
|
116
|
-
queryParameters['auth'] = requestParameters['auth'];
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (requestParameters['account_index'] != null) {
|
|
120
|
-
queryParameters['account_index'] = requestParameters['account_index'];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (requestParameters['cursor'] != null) {
|
|
124
|
-
queryParameters['cursor'] = requestParameters['cursor'];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (requestParameters['limit'] != null) {
|
|
128
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
132
|
-
|
|
133
|
-
const response = await this.request({
|
|
134
|
-
path: `/api/v1/accountEvents`,
|
|
135
|
-
method: 'GET',
|
|
136
|
-
headers: headerParameters,
|
|
137
|
-
query: queryParameters,
|
|
138
|
-
}, initOverrides);
|
|
139
|
-
|
|
140
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetEventsFromJSON(jsonValue));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Get registered events present in an authenticated account\'s retained trade history. Events disappear once all of their account trades are pruned. Ordered by descending event id; cursor is exclusive. Returns the same event details and registered outcomes as /api/v1/events. next_cursor is 0 when no more events remain. Participation is indexed asynchronously; orders with no fills are excluded. Missing cached event metadata is loaded from the database.
|
|
145
|
-
* accountEvents
|
|
146
|
-
*/
|
|
147
|
-
async accountEvents(requestParameters: AccountEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetEvents> {
|
|
148
|
-
const response = await this.accountEventsRaw(requestParameters, initOverrides);
|
|
149
|
-
return await response.value();
|
|
150
|
-
}
|
|
151
|
-
|
|
152
90
|
/**
|
|
153
91
|
* Create a binary options event
|
|
154
92
|
* event_create
|
|
@@ -443,14 +381,18 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
443
381
|
}
|
|
444
382
|
|
|
445
383
|
/**
|
|
446
|
-
* Get events and registered order books, including scheduled events with no books. Defaults to descending id. Occurrence sorting uses (occurrence_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.
|
|
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. Occurrence sorting uses (occurrence_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.
|
|
447
385
|
* events
|
|
448
386
|
*/
|
|
449
387
|
async eventsRaw(requestParameters: EventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetEvents>> {
|
|
450
388
|
const queryParameters: any = {};
|
|
451
389
|
|
|
452
|
-
if (requestParameters['
|
|
453
|
-
queryParameters['
|
|
390
|
+
if (requestParameters['event_ids'] != null) {
|
|
391
|
+
queryParameters['event_ids'] = requestParameters['event_ids'];
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (requestParameters['market_ids'] != null) {
|
|
395
|
+
queryParameters['market_ids'] = requestParameters['market_ids'];
|
|
454
396
|
}
|
|
455
397
|
|
|
456
398
|
if (requestParameters['creator_account_index'] != null) {
|
|
@@ -506,7 +448,7 @@ export class EventApi extends runtime.BaseAPI {
|
|
|
506
448
|
}
|
|
507
449
|
|
|
508
450
|
/**
|
|
509
|
-
* Get events and registered order books, including scheduled events with no books. Defaults to descending id. Occurrence sorting uses (occurrence_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.
|
|
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. Occurrence sorting uses (occurrence_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.
|
|
510
452
|
* events
|
|
511
453
|
*/
|
|
512
454
|
async events(requestParameters: EventsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetEvents> {
|
package/apis/OrderApi.ts
CHANGED
|
@@ -1031,7 +1031,8 @@ export type ExportTradeTypeEnum = typeof ExportTradeTypeEnum[keyof typeof Export
|
|
|
1031
1031
|
export const AccountActiveOrdersMarketTypeEnum = {
|
|
1032
1032
|
All: 'all',
|
|
1033
1033
|
Spot: 'spot',
|
|
1034
|
-
Perp: 'perp'
|
|
1034
|
+
Perp: 'perp',
|
|
1035
|
+
Bo: 'bo'
|
|
1035
1036
|
} as const;
|
|
1036
1037
|
export type AccountActiveOrdersMarketTypeEnum = typeof AccountActiveOrdersMarketTypeEnum[keyof typeof AccountActiveOrdersMarketTypeEnum];
|
|
1037
1038
|
/**
|
|
@@ -1040,7 +1041,8 @@ export type AccountActiveOrdersMarketTypeEnum = typeof AccountActiveOrdersMarket
|
|
|
1040
1041
|
export const AccountInactiveOrdersMarketTypeEnum = {
|
|
1041
1042
|
All: 'all',
|
|
1042
1043
|
Spot: 'spot',
|
|
1043
|
-
Perp: 'perp'
|
|
1044
|
+
Perp: 'perp',
|
|
1045
|
+
Bo: 'bo'
|
|
1044
1046
|
} as const;
|
|
1045
1047
|
export type AccountInactiveOrdersMarketTypeEnum = typeof AccountInactiveOrdersMarketTypeEnum[keyof typeof AccountInactiveOrdersMarketTypeEnum];
|
|
1046
1048
|
/**
|
|
@@ -1113,8 +1115,7 @@ export type MarketMetricsKindEnum = typeof MarketMetricsKindEnum[keyof typeof Ma
|
|
|
1113
1115
|
export const OrderBookDetailsFilterEnum = {
|
|
1114
1116
|
All: 'all',
|
|
1115
1117
|
Spot: 'spot',
|
|
1116
|
-
Perp: 'perp'
|
|
1117
|
-
BinaryOptions: 'binary_options'
|
|
1118
|
+
Perp: 'perp'
|
|
1118
1119
|
} as const;
|
|
1119
1120
|
export type OrderBookDetailsFilterEnum = typeof OrderBookDetailsFilterEnum[keyof typeof OrderBookDetailsFilterEnum];
|
|
1120
1121
|
/**
|
|
@@ -1123,8 +1124,7 @@ export type OrderBookDetailsFilterEnum = typeof OrderBookDetailsFilterEnum[keyof
|
|
|
1123
1124
|
export const OrderBooksFilterEnum = {
|
|
1124
1125
|
All: 'all',
|
|
1125
1126
|
Spot: 'spot',
|
|
1126
|
-
Perp: 'perp'
|
|
1127
|
-
BinaryOptions: 'binary_options'
|
|
1127
|
+
Perp: 'perp'
|
|
1128
1128
|
} as const;
|
|
1129
1129
|
export type OrderBooksFilterEnum = typeof OrderBooksFilterEnum[keyof typeof OrderBooksFilterEnum];
|
|
1130
1130
|
/**
|
|
@@ -1142,7 +1142,8 @@ export type TradesSortByEnum = typeof TradesSortByEnum[keyof typeof TradesSortBy
|
|
|
1142
1142
|
export const TradesMarketTypeEnum = {
|
|
1143
1143
|
All: 'all',
|
|
1144
1144
|
Spot: 'spot',
|
|
1145
|
-
Perp: 'perp'
|
|
1145
|
+
Perp: 'perp',
|
|
1146
|
+
Bo: 'bo'
|
|
1146
1147
|
} as const;
|
|
1147
1148
|
export type TradesMarketTypeEnum = typeof TradesMarketTypeEnum[keyof typeof TradesMarketTypeEnum];
|
|
1148
1149
|
/**
|
|
@@ -206,6 +206,18 @@ export interface EventOrderBookEntry {
|
|
|
206
206
|
* @memberof EventOrderBookEntry
|
|
207
207
|
*/
|
|
208
208
|
is_frozen: boolean;
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @type {number}
|
|
212
|
+
* @memberof EventOrderBookEntry
|
|
213
|
+
*/
|
|
214
|
+
size_decimals: number;
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* @type {number}
|
|
218
|
+
* @memberof EventOrderBookEntry
|
|
219
|
+
*/
|
|
220
|
+
price_decimals: number;
|
|
209
221
|
/**
|
|
210
222
|
*
|
|
211
223
|
* @type {BinaryOptionMarketStats}
|
|
@@ -288,6 +300,8 @@ export function instanceOfEventOrderBookEntry(value: object): value is EventOrde
|
|
|
288
300
|
if (!('settlement_price' in value) || value['settlement_price'] === undefined) return false;
|
|
289
301
|
if (!('default_price' in value) || value['default_price'] === undefined) return false;
|
|
290
302
|
if (!('is_frozen' in value) || value['is_frozen'] === undefined) return false;
|
|
303
|
+
if (!('size_decimals' in value) || value['size_decimals'] === undefined) return false;
|
|
304
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
291
305
|
if (!('stats' in value) || value['stats'] === undefined) return false;
|
|
292
306
|
return true;
|
|
293
307
|
}
|
|
@@ -332,6 +346,8 @@ export function EventOrderBookEntryFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
332
346
|
'settlement_price': json['settlement_price'],
|
|
333
347
|
'default_price': json['default_price'],
|
|
334
348
|
'is_frozen': json['is_frozen'],
|
|
349
|
+
'size_decimals': json['size_decimals'],
|
|
350
|
+
'price_decimals': json['price_decimals'],
|
|
335
351
|
'stats': BinaryOptionMarketStatsFromJSON(json['stats']),
|
|
336
352
|
};
|
|
337
353
|
}
|
|
@@ -372,6 +388,8 @@ export function EventOrderBookEntryToJSON(value?: EventOrderBookEntry | null): a
|
|
|
372
388
|
'settlement_price': value['settlement_price'],
|
|
373
389
|
'default_price': value['default_price'],
|
|
374
390
|
'is_frozen': value['is_frozen'],
|
|
391
|
+
'size_decimals': value['size_decimals'],
|
|
392
|
+
'price_decimals': value['price_decimals'],
|
|
375
393
|
'stats': BinaryOptionMarketStatsToJSON(value['stats']),
|
|
376
394
|
};
|
|
377
395
|
}
|
|
@@ -49,6 +49,12 @@ export interface NotificationPreferences {
|
|
|
49
49
|
* @memberof NotificationPreferences
|
|
50
50
|
*/
|
|
51
51
|
order_filled_enabled: boolean;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof NotificationPreferences
|
|
56
|
+
*/
|
|
57
|
+
cashflow_enabled: boolean;
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
/**
|
|
@@ -60,6 +66,7 @@ export function instanceOfNotificationPreferences(value: object): value is Notif
|
|
|
60
66
|
if (!('private_announcements_enabled' in value) || value['private_announcements_enabled'] === undefined) return false;
|
|
61
67
|
if (!('price_alerts_enabled' in value) || value['price_alerts_enabled'] === undefined) return false;
|
|
62
68
|
if (!('order_filled_enabled' in value) || value['order_filled_enabled'] === undefined) return false;
|
|
69
|
+
if (!('cashflow_enabled' in value) || value['cashflow_enabled'] === undefined) return false;
|
|
63
70
|
return true;
|
|
64
71
|
}
|
|
65
72
|
|
|
@@ -78,6 +85,7 @@ export function NotificationPreferencesFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
78
85
|
'private_announcements_enabled': json['private_announcements_enabled'],
|
|
79
86
|
'price_alerts_enabled': json['price_alerts_enabled'],
|
|
80
87
|
'order_filled_enabled': json['order_filled_enabled'],
|
|
88
|
+
'cashflow_enabled': json['cashflow_enabled'],
|
|
81
89
|
};
|
|
82
90
|
}
|
|
83
91
|
|
|
@@ -92,6 +100,7 @@ export function NotificationPreferencesToJSON(value?: NotificationPreferences |
|
|
|
92
100
|
'private_announcements_enabled': value['private_announcements_enabled'],
|
|
93
101
|
'price_alerts_enabled': value['price_alerts_enabled'],
|
|
94
102
|
'order_filled_enabled': value['order_filled_enabled'],
|
|
103
|
+
'cashflow_enabled': value['cashflow_enabled'],
|
|
95
104
|
};
|
|
96
105
|
}
|
|
97
106
|
|
package/models/PnLV2Entry.ts
CHANGED
|
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface PnLV2Entry
|
|
20
20
|
*/
|
|
21
21
|
export interface PnLV2Entry {
|
|
22
|
+
/**
|
|
23
|
+
* quote volume in USDC for this bucket; summary.volume is the sum
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PnLV2Entry
|
|
26
|
+
*/
|
|
27
|
+
volume: number;
|
|
22
28
|
/**
|
|
23
29
|
*
|
|
24
30
|
* @type {number}
|
|
@@ -133,6 +139,7 @@ export interface PnLV2Entry {
|
|
|
133
139
|
* Check if a given object implements the PnLV2Entry interface.
|
|
134
140
|
*/
|
|
135
141
|
export function instanceOfPnLV2Entry(value: object): value is PnLV2Entry {
|
|
142
|
+
if (!('volume' in value) || value['volume'] === undefined) return false;
|
|
136
143
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
137
144
|
if (!('interval_start_timestamp' in value) || value['interval_start_timestamp'] === undefined) return false;
|
|
138
145
|
if (!('is_final' in value) || value['is_final'] === undefined) return false;
|
|
@@ -164,6 +171,7 @@ export function PnLV2EntryFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
164
171
|
}
|
|
165
172
|
return {
|
|
166
173
|
|
|
174
|
+
'volume': json['volume'],
|
|
167
175
|
'timestamp': json['timestamp'],
|
|
168
176
|
'interval_start_timestamp': json['interval_start_timestamp'],
|
|
169
177
|
'is_final': json['is_final'],
|
|
@@ -191,6 +199,7 @@ export function PnLV2EntryToJSON(value?: PnLV2Entry | null): any {
|
|
|
191
199
|
}
|
|
192
200
|
return {
|
|
193
201
|
|
|
202
|
+
'volume': value['volume'],
|
|
194
203
|
'timestamp': value['timestamp'],
|
|
195
204
|
'interval_start_timestamp': value['interval_start_timestamp'],
|
|
196
205
|
'is_final': value['is_final'],
|
|
@@ -52,7 +52,8 @@ export interface ReqGetAccountActiveOrders {
|
|
|
52
52
|
export const ReqGetAccountActiveOrdersMarketTypeEnum = {
|
|
53
53
|
All: 'all',
|
|
54
54
|
Spot: 'spot',
|
|
55
|
-
Perp: 'perp'
|
|
55
|
+
Perp: 'perp',
|
|
56
|
+
Bo: 'bo'
|
|
56
57
|
} as const;
|
|
57
58
|
export type ReqGetAccountActiveOrdersMarketTypeEnum = typeof ReqGetAccountActiveOrdersMarketTypeEnum[keyof typeof ReqGetAccountActiveOrdersMarketTypeEnum];
|
|
58
59
|
|
|
@@ -76,7 +76,8 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
76
76
|
export const ReqGetAccountInactiveOrdersMarketTypeEnum = {
|
|
77
77
|
All: 'all',
|
|
78
78
|
Spot: 'spot',
|
|
79
|
-
Perp: 'perp'
|
|
79
|
+
Perp: 'perp',
|
|
80
|
+
Bo: 'bo'
|
|
80
81
|
} as const;
|
|
81
82
|
export type ReqGetAccountInactiveOrdersMarketTypeEnum = typeof ReqGetAccountInactiveOrdersMarketTypeEnum[keyof typeof ReqGetAccountInactiveOrdersMarketTypeEnum];
|
|
82
83
|
|
package/models/ReqGetEvents.ts
CHANGED
|
@@ -20,11 +20,17 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetEvents {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {
|
|
23
|
+
* comma-separated positive IDs, max 50
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetEvents
|
|
26
|
+
*/
|
|
27
|
+
event_ids?: string;
|
|
28
|
+
/**
|
|
29
|
+
* comma-separated positive IDs, max 50
|
|
30
|
+
* @type {string}
|
|
25
31
|
* @memberof ReqGetEvents
|
|
26
32
|
*/
|
|
27
|
-
|
|
33
|
+
market_ids?: string;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* @type {number}
|
|
@@ -133,7 +139,8 @@ export function ReqGetEventsFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
133
139
|
}
|
|
134
140
|
return {
|
|
135
141
|
|
|
136
|
-
'
|
|
142
|
+
'event_ids': json['event_ids'] == null ? undefined : json['event_ids'],
|
|
143
|
+
'market_ids': json['market_ids'] == null ? undefined : json['market_ids'],
|
|
137
144
|
'creator_account_index': json['creator_account_index'] == null ? undefined : json['creator_account_index'],
|
|
138
145
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
139
146
|
'active': json['active'] == null ? undefined : json['active'],
|
|
@@ -153,7 +160,8 @@ export function ReqGetEventsToJSON(value?: ReqGetEvents | null): any {
|
|
|
153
160
|
}
|
|
154
161
|
return {
|
|
155
162
|
|
|
156
|
-
'
|
|
163
|
+
'event_ids': value['event_ids'],
|
|
164
|
+
'market_ids': value['market_ids'],
|
|
157
165
|
'creator_account_index': value['creator_account_index'],
|
|
158
166
|
'cursor': value['cursor'],
|
|
159
167
|
'active': value['active'],
|
|
@@ -40,8 +40,7 @@ export interface ReqGetOrderBookDetails {
|
|
|
40
40
|
export const ReqGetOrderBookDetailsFilterEnum = {
|
|
41
41
|
All: 'all',
|
|
42
42
|
Spot: 'spot',
|
|
43
|
-
Perp: 'perp'
|
|
44
|
-
BinaryOptions: 'binary_options'
|
|
43
|
+
Perp: 'perp'
|
|
45
44
|
} as const;
|
|
46
45
|
export type ReqGetOrderBookDetailsFilterEnum = typeof ReqGetOrderBookDetailsFilterEnum[keyof typeof ReqGetOrderBookDetailsFilterEnum];
|
|
47
46
|
|
|
@@ -40,8 +40,7 @@ export interface ReqGetOrderBooks {
|
|
|
40
40
|
export const ReqGetOrderBooksFilterEnum = {
|
|
41
41
|
All: 'all',
|
|
42
42
|
Spot: 'spot',
|
|
43
|
-
Perp: 'perp'
|
|
44
|
-
BinaryOptions: 'binary_options'
|
|
43
|
+
Perp: 'perp'
|
|
45
44
|
} as const;
|
|
46
45
|
export type ReqGetOrderBooksFilterEnum = typeof ReqGetOrderBooksFilterEnum[keyof typeof ReqGetOrderBooksFilterEnum];
|
|
47
46
|
|
package/models/ReqGetTrades.ts
CHANGED
|
@@ -130,7 +130,8 @@ export interface ReqGetTrades {
|
|
|
130
130
|
export const ReqGetTradesMarketTypeEnum = {
|
|
131
131
|
All: 'all',
|
|
132
132
|
Spot: 'spot',
|
|
133
|
-
Perp: 'perp'
|
|
133
|
+
Perp: 'perp',
|
|
134
|
+
Bo: 'bo'
|
|
134
135
|
} as const;
|
|
135
136
|
export type ReqGetTradesMarketTypeEnum = typeof ReqGetTradesMarketTypeEnum[keyof typeof ReqGetTradesMarketTypeEnum];
|
|
136
137
|
|
package/models/index.ts
CHANGED
|
@@ -143,7 +143,6 @@ export * from './ReqGetAccount';
|
|
|
143
143
|
export * from './ReqGetAccountActiveOrders';
|
|
144
144
|
export * from './ReqGetAccountApiKeys';
|
|
145
145
|
export * from './ReqGetAccountByL1Address';
|
|
146
|
-
export * from './ReqGetAccountEvents';
|
|
147
146
|
export * from './ReqGetAccountInactiveOrders';
|
|
148
147
|
export * from './ReqGetAccountLimits';
|
|
149
148
|
export * from './ReqGetAccountMetadata';
|
package/openapi.json
CHANGED
|
@@ -154,7 +154,8 @@
|
|
|
154
154
|
"enum": [
|
|
155
155
|
"all",
|
|
156
156
|
"spot",
|
|
157
|
-
"perp"
|
|
157
|
+
"perp",
|
|
158
|
+
"bo"
|
|
158
159
|
],
|
|
159
160
|
"default": "all"
|
|
160
161
|
}
|
|
@@ -168,77 +169,6 @@
|
|
|
168
169
|
"description": "Get account active orders. `auth` can be generated using the SDK."
|
|
169
170
|
}
|
|
170
171
|
},
|
|
171
|
-
"/api/v1/accountEvents": {
|
|
172
|
-
"get": {
|
|
173
|
-
"summary": "accountEvents",
|
|
174
|
-
"operationId": "accountEvents",
|
|
175
|
-
"responses": {
|
|
176
|
-
"200": {
|
|
177
|
-
"description": "A successful response.",
|
|
178
|
-
"schema": {
|
|
179
|
-
"$ref": "#/definitions/RespGetEvents"
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
"400": {
|
|
183
|
-
"description": "Bad request",
|
|
184
|
-
"schema": {
|
|
185
|
-
"$ref": "#/definitions/ResultCode"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
"parameters": [
|
|
190
|
-
{
|
|
191
|
-
"name": "authorization",
|
|
192
|
-
"description": " make required after integ is done",
|
|
193
|
-
"in": "query",
|
|
194
|
-
"required": false,
|
|
195
|
-
"type": "string"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"name": "auth",
|
|
199
|
-
"description": " made optional to support header auth clients",
|
|
200
|
-
"in": "query",
|
|
201
|
-
"required": false,
|
|
202
|
-
"type": "string"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"name": "account_index",
|
|
206
|
-
"in": "query",
|
|
207
|
-
"required": true,
|
|
208
|
-
"type": "integer",
|
|
209
|
-
"format": "int64",
|
|
210
|
-
"minimum": 0,
|
|
211
|
-
"maximum": 281474976710654
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"name": "cursor",
|
|
215
|
-
"in": "query",
|
|
216
|
-
"required": false,
|
|
217
|
-
"type": "integer",
|
|
218
|
-
"format": "int64",
|
|
219
|
-
"minimum": 1,
|
|
220
|
-
"maximum": 9223372036854776000
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"name": "limit",
|
|
224
|
-
"in": "query",
|
|
225
|
-
"required": false,
|
|
226
|
-
"type": "integer",
|
|
227
|
-
"format": "int64",
|
|
228
|
-
"default": "100",
|
|
229
|
-
"minimum": 1,
|
|
230
|
-
"maximum": 100
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
"tags": [
|
|
234
|
-
"event"
|
|
235
|
-
],
|
|
236
|
-
"consumes": [
|
|
237
|
-
"multipart/form-data"
|
|
238
|
-
],
|
|
239
|
-
"description": "Get registered events present in an authenticated account's retained trade history. Events disappear once all of their account trades are pruned. Ordered by descending event id; cursor is exclusive. Returns the same event details and registered outcomes as /api/v1/events. next_cursor is 0 when no more events remain. Participation is indexed asynchronously; orders with no fills are excluded. Missing cached event metadata is loaded from the database."
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
172
|
"/api/v1/accountInactiveOrders": {
|
|
243
173
|
"get": {
|
|
244
174
|
"summary": "accountInactiveOrders",
|
|
@@ -295,7 +225,8 @@
|
|
|
295
225
|
"enum": [
|
|
296
226
|
"all",
|
|
297
227
|
"spot",
|
|
298
|
-
"perp"
|
|
228
|
+
"perp",
|
|
229
|
+
"bo"
|
|
299
230
|
],
|
|
300
231
|
"default": "all"
|
|
301
232
|
},
|
|
@@ -1841,11 +1772,18 @@
|
|
|
1841
1772
|
},
|
|
1842
1773
|
"parameters": [
|
|
1843
1774
|
{
|
|
1844
|
-
"name": "
|
|
1775
|
+
"name": "event_ids",
|
|
1776
|
+
"description": " comma-separated positive IDs, max 50",
|
|
1845
1777
|
"in": "query",
|
|
1846
1778
|
"required": false,
|
|
1847
|
-
"type": "
|
|
1848
|
-
|
|
1779
|
+
"type": "string"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"name": "market_ids",
|
|
1783
|
+
"description": " comma-separated positive IDs, max 50",
|
|
1784
|
+
"in": "query",
|
|
1785
|
+
"required": false,
|
|
1786
|
+
"type": "string"
|
|
1849
1787
|
},
|
|
1850
1788
|
{
|
|
1851
1789
|
"name": "creator_account_index",
|
|
@@ -1940,7 +1878,7 @@
|
|
|
1940
1878
|
"consumes": [
|
|
1941
1879
|
"multipart/form-data"
|
|
1942
1880
|
],
|
|
1943
|
-
"description": "Get events and registered order books, including scheduled events with no books. Defaults to descending id. Occurrence sorting uses (occurrence_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."
|
|
1881
|
+
"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. Occurrence sorting uses (occurrence_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."
|
|
1944
1882
|
}
|
|
1945
1883
|
},
|
|
1946
1884
|
"/api/v1/exchangeMetrics": {
|
|
@@ -4427,8 +4365,7 @@
|
|
|
4427
4365
|
"enum": [
|
|
4428
4366
|
"all",
|
|
4429
4367
|
"spot",
|
|
4430
|
-
"perp"
|
|
4431
|
-
"binary_options"
|
|
4368
|
+
"perp"
|
|
4432
4369
|
],
|
|
4433
4370
|
"default": "all"
|
|
4434
4371
|
}
|
|
@@ -4522,8 +4459,7 @@
|
|
|
4522
4459
|
"enum": [
|
|
4523
4460
|
"all",
|
|
4524
4461
|
"spot",
|
|
4525
|
-
"perp"
|
|
4526
|
-
"binary_options"
|
|
4462
|
+
"perp"
|
|
4527
4463
|
],
|
|
4528
4464
|
"default": "all"
|
|
4529
4465
|
}
|
|
@@ -6416,7 +6352,8 @@
|
|
|
6416
6352
|
"enum": [
|
|
6417
6353
|
"all",
|
|
6418
6354
|
"spot",
|
|
6419
|
-
"perp"
|
|
6355
|
+
"perp",
|
|
6356
|
+
"bo"
|
|
6420
6357
|
],
|
|
6421
6358
|
"default": "all"
|
|
6422
6359
|
},
|
|
@@ -10041,6 +9978,16 @@
|
|
|
10041
9978
|
"format": "boolean",
|
|
10042
9979
|
"example": "false"
|
|
10043
9980
|
},
|
|
9981
|
+
"size_decimals": {
|
|
9982
|
+
"type": "integer",
|
|
9983
|
+
"format": "uint8",
|
|
9984
|
+
"example": "4"
|
|
9985
|
+
},
|
|
9986
|
+
"price_decimals": {
|
|
9987
|
+
"type": "integer",
|
|
9988
|
+
"format": "uint8",
|
|
9989
|
+
"example": "4"
|
|
9990
|
+
},
|
|
10044
9991
|
"stats": {
|
|
10045
9992
|
"$ref": "#/definitions/BinaryOptionMarketStats"
|
|
10046
9993
|
}
|
|
@@ -10077,6 +10024,8 @@
|
|
|
10077
10024
|
"settlement_price",
|
|
10078
10025
|
"default_price",
|
|
10079
10026
|
"is_frozen",
|
|
10027
|
+
"size_decimals",
|
|
10028
|
+
"price_decimals",
|
|
10080
10029
|
"stats"
|
|
10081
10030
|
]
|
|
10082
10031
|
},
|
|
@@ -11691,6 +11640,10 @@
|
|
|
11691
11640
|
"order_filled_enabled": {
|
|
11692
11641
|
"type": "boolean",
|
|
11693
11642
|
"format": "boolean"
|
|
11643
|
+
},
|
|
11644
|
+
"cashflow_enabled": {
|
|
11645
|
+
"type": "boolean",
|
|
11646
|
+
"format": "boolean"
|
|
11694
11647
|
}
|
|
11695
11648
|
},
|
|
11696
11649
|
"title": "NotificationPreferences",
|
|
@@ -11699,7 +11652,8 @@
|
|
|
11699
11652
|
"global_announcements_enabled",
|
|
11700
11653
|
"private_announcements_enabled",
|
|
11701
11654
|
"price_alerts_enabled",
|
|
11702
|
-
"order_filled_enabled"
|
|
11655
|
+
"order_filled_enabled",
|
|
11656
|
+
"cashflow_enabled"
|
|
11703
11657
|
]
|
|
11704
11658
|
},
|
|
11705
11659
|
"Order": {
|
|
@@ -13100,6 +13054,11 @@
|
|
|
13100
13054
|
"PnLV2Entry": {
|
|
13101
13055
|
"type": "object",
|
|
13102
13056
|
"properties": {
|
|
13057
|
+
"volume": {
|
|
13058
|
+
"type": "number",
|
|
13059
|
+
"format": "double",
|
|
13060
|
+
"description": " quote volume in USDC for this bucket; summary.volume is the sum"
|
|
13061
|
+
},
|
|
13103
13062
|
"timestamp": {
|
|
13104
13063
|
"type": "integer",
|
|
13105
13064
|
"format": "int64"
|
|
@@ -13175,6 +13134,7 @@
|
|
|
13175
13134
|
},
|
|
13176
13135
|
"title": "PnLV2Entry",
|
|
13177
13136
|
"required": [
|
|
13137
|
+
"volume",
|
|
13178
13138
|
"timestamp",
|
|
13179
13139
|
"interval_start_timestamp",
|
|
13180
13140
|
"is_final",
|
|
@@ -14702,7 +14662,8 @@
|
|
|
14702
14662
|
"enum": [
|
|
14703
14663
|
"all",
|
|
14704
14664
|
"spot",
|
|
14705
|
-
"perp"
|
|
14665
|
+
"perp",
|
|
14666
|
+
"bo"
|
|
14706
14667
|
],
|
|
14707
14668
|
"default": "all"
|
|
14708
14669
|
}
|
|
@@ -14745,37 +14706,6 @@
|
|
|
14745
14706
|
"l1_address"
|
|
14746
14707
|
]
|
|
14747
14708
|
},
|
|
14748
|
-
"ReqGetAccountEvents": {
|
|
14749
|
-
"type": "object",
|
|
14750
|
-
"properties": {
|
|
14751
|
-
"auth": {
|
|
14752
|
-
"type": "string",
|
|
14753
|
-
"description": " made optional to support header auth clients"
|
|
14754
|
-
},
|
|
14755
|
-
"account_index": {
|
|
14756
|
-
"type": "integer",
|
|
14757
|
-
"format": "int64",
|
|
14758
|
-
"maximum": 281474976710654
|
|
14759
|
-
},
|
|
14760
|
-
"cursor": {
|
|
14761
|
-
"type": "integer",
|
|
14762
|
-
"format": "int64",
|
|
14763
|
-
"maximum": 9223372036854776000,
|
|
14764
|
-
"minimum": 1
|
|
14765
|
-
},
|
|
14766
|
-
"limit": {
|
|
14767
|
-
"type": "integer",
|
|
14768
|
-
"format": "int64",
|
|
14769
|
-
"default": "100",
|
|
14770
|
-
"maximum": 100,
|
|
14771
|
-
"minimum": 1
|
|
14772
|
-
}
|
|
14773
|
-
},
|
|
14774
|
-
"title": "ReqGetAccountEvents",
|
|
14775
|
-
"required": [
|
|
14776
|
-
"account_index"
|
|
14777
|
-
]
|
|
14778
|
-
},
|
|
14779
14709
|
"ReqGetAccountInactiveOrders": {
|
|
14780
14710
|
"type": "object",
|
|
14781
14711
|
"properties": {
|
|
@@ -14797,7 +14727,8 @@
|
|
|
14797
14727
|
"enum": [
|
|
14798
14728
|
"all",
|
|
14799
14729
|
"spot",
|
|
14800
|
-
"perp"
|
|
14730
|
+
"perp",
|
|
14731
|
+
"bo"
|
|
14801
14732
|
],
|
|
14802
14733
|
"default": "all"
|
|
14803
14734
|
},
|
|
@@ -15274,9 +15205,13 @@
|
|
|
15274
15205
|
"ReqGetEvents": {
|
|
15275
15206
|
"type": "object",
|
|
15276
15207
|
"properties": {
|
|
15277
|
-
"
|
|
15278
|
-
"type": "
|
|
15279
|
-
"
|
|
15208
|
+
"event_ids": {
|
|
15209
|
+
"type": "string",
|
|
15210
|
+
"description": " comma-separated positive IDs, max 50"
|
|
15211
|
+
},
|
|
15212
|
+
"market_ids": {
|
|
15213
|
+
"type": "string",
|
|
15214
|
+
"description": " comma-separated positive IDs, max 50"
|
|
15280
15215
|
},
|
|
15281
15216
|
"creator_account_index": {
|
|
15282
15217
|
"type": "integer",
|
|
@@ -15839,8 +15774,7 @@
|
|
|
15839
15774
|
"enum": [
|
|
15840
15775
|
"all",
|
|
15841
15776
|
"spot",
|
|
15842
|
-
"perp"
|
|
15843
|
-
"binary_options"
|
|
15777
|
+
"perp"
|
|
15844
15778
|
],
|
|
15845
15779
|
"default": "all"
|
|
15846
15780
|
}
|
|
@@ -15880,8 +15814,7 @@
|
|
|
15880
15814
|
"enum": [
|
|
15881
15815
|
"all",
|
|
15882
15816
|
"spot",
|
|
15883
|
-
"perp"
|
|
15884
|
-
"binary_options"
|
|
15817
|
+
"perp"
|
|
15885
15818
|
],
|
|
15886
15819
|
"default": "all"
|
|
15887
15820
|
}
|
|
@@ -16291,7 +16224,8 @@
|
|
|
16291
16224
|
"enum": [
|
|
16292
16225
|
"all",
|
|
16293
16226
|
"spot",
|
|
16294
|
-
"perp"
|
|
16227
|
+
"perp",
|
|
16228
|
+
"bo"
|
|
16295
16229
|
],
|
|
16296
16230
|
"default": "all"
|
|
16297
16231
|
},
|