zklighter-perps 1.0.358 → 1.0.359
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 +3 -0
- package/apis/OrderApi.ts +97 -0
- package/models/OrderFill.ts +136 -0
- package/models/OrderFills.ts +102 -0
- package/models/ReqGetAccountOrderFills.ts +104 -0
- package/models/index.ts +3 -0
- package/openapi.json +207 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -155,6 +155,8 @@ models/OrderBookDetails.ts
|
|
|
155
155
|
models/OrderBookOrders.ts
|
|
156
156
|
models/OrderBookStats.ts
|
|
157
157
|
models/OrderBooks.ts
|
|
158
|
+
models/OrderFill.ts
|
|
159
|
+
models/OrderFills.ts
|
|
158
160
|
models/Orders.ts
|
|
159
161
|
models/PartnerStats.ts
|
|
160
162
|
models/PendingUnlock.ts
|
|
@@ -200,6 +202,7 @@ models/ReqGetAccountByL1Address.ts
|
|
|
200
202
|
models/ReqGetAccountInactiveOrders.ts
|
|
201
203
|
models/ReqGetAccountLimits.ts
|
|
202
204
|
models/ReqGetAccountMetadata.ts
|
|
205
|
+
models/ReqGetAccountOrderFills.ts
|
|
203
206
|
models/ReqGetAccountOrders.ts
|
|
204
207
|
models/ReqGetAccountPnL.ts
|
|
205
208
|
models/ReqGetAccountPnLV2.ts
|
package/apis/OrderApi.ts
CHANGED
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
OrderBookDetails,
|
|
24
24
|
OrderBookOrders,
|
|
25
25
|
OrderBooks,
|
|
26
|
+
OrderFills,
|
|
26
27
|
Orders,
|
|
27
28
|
RespGetBOExecuteStats,
|
|
28
29
|
RespGetExchangeMetrics,
|
|
@@ -48,6 +49,8 @@ import {
|
|
|
48
49
|
OrderBookOrdersToJSON,
|
|
49
50
|
OrderBooksFromJSON,
|
|
50
51
|
OrderBooksToJSON,
|
|
52
|
+
OrderFillsFromJSON,
|
|
53
|
+
OrderFillsToJSON,
|
|
51
54
|
OrdersFromJSON,
|
|
52
55
|
OrdersToJSON,
|
|
53
56
|
RespGetBOExecuteStatsFromJSON,
|
|
@@ -98,6 +101,16 @@ export interface AccountInactiveOrdersRequest {
|
|
|
98
101
|
cursor?: string;
|
|
99
102
|
}
|
|
100
103
|
|
|
104
|
+
export interface AccountOrderFillsRequest {
|
|
105
|
+
account_index: number;
|
|
106
|
+
market_id: number;
|
|
107
|
+
between_timestamps: string;
|
|
108
|
+
limit: number;
|
|
109
|
+
authorization?: string;
|
|
110
|
+
auth?: string;
|
|
111
|
+
cursor?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
101
114
|
export interface AccountOrdersRequest {
|
|
102
115
|
client_order_indexes: string;
|
|
103
116
|
authorization?: string;
|
|
@@ -403,6 +416,90 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
403
416
|
return await response.value();
|
|
404
417
|
}
|
|
405
418
|
|
|
419
|
+
/**
|
|
420
|
+
* Get an account\'s fills in one market and time range, newest first: filled orders (TWAP parents excluded) plus deleverage and market-settlement trades
|
|
421
|
+
* accountOrderFills
|
|
422
|
+
*/
|
|
423
|
+
async accountOrderFillsRaw(requestParameters: AccountOrderFillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderFills>> {
|
|
424
|
+
if (requestParameters['account_index'] == null) {
|
|
425
|
+
throw new runtime.RequiredError(
|
|
426
|
+
'account_index',
|
|
427
|
+
'Required parameter "account_index" was null or undefined when calling accountOrderFills().'
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (requestParameters['market_id'] == null) {
|
|
432
|
+
throw new runtime.RequiredError(
|
|
433
|
+
'market_id',
|
|
434
|
+
'Required parameter "market_id" was null or undefined when calling accountOrderFills().'
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (requestParameters['between_timestamps'] == null) {
|
|
439
|
+
throw new runtime.RequiredError(
|
|
440
|
+
'between_timestamps',
|
|
441
|
+
'Required parameter "between_timestamps" was null or undefined when calling accountOrderFills().'
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if (requestParameters['limit'] == null) {
|
|
446
|
+
throw new runtime.RequiredError(
|
|
447
|
+
'limit',
|
|
448
|
+
'Required parameter "limit" was null or undefined when calling accountOrderFills().'
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const queryParameters: any = {};
|
|
453
|
+
|
|
454
|
+
if (requestParameters['authorization'] != null) {
|
|
455
|
+
queryParameters['authorization'] = requestParameters['authorization'];
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if (requestParameters['auth'] != null) {
|
|
459
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if (requestParameters['account_index'] != null) {
|
|
463
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (requestParameters['market_id'] != null) {
|
|
467
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (requestParameters['between_timestamps'] != null) {
|
|
471
|
+
queryParameters['between_timestamps'] = requestParameters['between_timestamps'];
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (requestParameters['cursor'] != null) {
|
|
475
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (requestParameters['limit'] != null) {
|
|
479
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
483
|
+
|
|
484
|
+
const response = await this.request({
|
|
485
|
+
path: `/api/v1/accountOrderFills`,
|
|
486
|
+
method: 'GET',
|
|
487
|
+
headers: headerParameters,
|
|
488
|
+
query: queryParameters,
|
|
489
|
+
}, initOverrides);
|
|
490
|
+
|
|
491
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFillsFromJSON(jsonValue));
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Get an account\'s fills in one market and time range, newest first: filled orders (TWAP parents excluded) plus deleverage and market-settlement trades
|
|
496
|
+
* accountOrderFills
|
|
497
|
+
*/
|
|
498
|
+
async accountOrderFills(requestParameters: AccountOrderFillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderFills> {
|
|
499
|
+
const response = await this.accountOrderFillsRaw(requestParameters, initOverrides);
|
|
500
|
+
return await response.value();
|
|
501
|
+
}
|
|
502
|
+
|
|
406
503
|
/**
|
|
407
504
|
* Get account orders by client order indexes. Account index defaults to the auth token\'s account.
|
|
408
505
|
* accountOrders
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OrderFill
|
|
20
|
+
*/
|
|
21
|
+
export interface OrderFill {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof OrderFill
|
|
26
|
+
*/
|
|
27
|
+
market_id: number;
|
|
28
|
+
/**
|
|
29
|
+
* milliseconds
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof OrderFill
|
|
32
|
+
*/
|
|
33
|
+
timestamp: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof OrderFill
|
|
38
|
+
*/
|
|
39
|
+
is_ask: boolean;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof OrderFill
|
|
44
|
+
*/
|
|
45
|
+
base_amount: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof OrderFill
|
|
50
|
+
*/
|
|
51
|
+
quote_amount: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof OrderFill
|
|
56
|
+
*/
|
|
57
|
+
type: OrderFillTypeEnum;
|
|
58
|
+
/**
|
|
59
|
+
* "0" for deleverage and market-settlement fills
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof OrderFill
|
|
62
|
+
*/
|
|
63
|
+
order_id: string;
|
|
64
|
+
/**
|
|
65
|
+
* "0" for order fills
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof OrderFill
|
|
68
|
+
*/
|
|
69
|
+
trade_id: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export const OrderFillTypeEnum = {
|
|
77
|
+
Order: 'order',
|
|
78
|
+
Deleverage: 'deleverage',
|
|
79
|
+
MarketSettlement: 'market-settlement'
|
|
80
|
+
} as const;
|
|
81
|
+
export type OrderFillTypeEnum = typeof OrderFillTypeEnum[keyof typeof OrderFillTypeEnum];
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if a given object implements the OrderFill interface.
|
|
86
|
+
*/
|
|
87
|
+
export function instanceOfOrderFill(value: object): value is OrderFill {
|
|
88
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
89
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
90
|
+
if (!('is_ask' in value) || value['is_ask'] === undefined) return false;
|
|
91
|
+
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
92
|
+
if (!('quote_amount' in value) || value['quote_amount'] === undefined) return false;
|
|
93
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
94
|
+
if (!('order_id' in value) || value['order_id'] === undefined) return false;
|
|
95
|
+
if (!('trade_id' in value) || value['trade_id'] === undefined) return false;
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function OrderFillFromJSON(json: any): OrderFill {
|
|
100
|
+
return OrderFillFromJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function OrderFillFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFill {
|
|
104
|
+
if (json == null) {
|
|
105
|
+
return json;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'market_id': json['market_id'],
|
|
110
|
+
'timestamp': json['timestamp'],
|
|
111
|
+
'is_ask': json['is_ask'],
|
|
112
|
+
'base_amount': json['base_amount'],
|
|
113
|
+
'quote_amount': json['quote_amount'],
|
|
114
|
+
'type': json['type'],
|
|
115
|
+
'order_id': json['order_id'],
|
|
116
|
+
'trade_id': json['trade_id'],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function OrderFillToJSON(value?: OrderFill | null): any {
|
|
121
|
+
if (value == null) {
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'market_id': value['market_id'],
|
|
127
|
+
'timestamp': value['timestamp'],
|
|
128
|
+
'is_ask': value['is_ask'],
|
|
129
|
+
'base_amount': value['base_amount'],
|
|
130
|
+
'quote_amount': value['quote_amount'],
|
|
131
|
+
'type': value['type'],
|
|
132
|
+
'order_id': value['order_id'],
|
|
133
|
+
'trade_id': value['trade_id'],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { OrderFill } from './OrderFill';
|
|
17
|
+
import {
|
|
18
|
+
OrderFillFromJSON,
|
|
19
|
+
OrderFillFromJSONTyped,
|
|
20
|
+
OrderFillToJSON,
|
|
21
|
+
} from './OrderFill';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface OrderFills
|
|
27
|
+
*/
|
|
28
|
+
export interface OrderFills {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof OrderFills
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof OrderFills
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof OrderFills
|
|
45
|
+
*/
|
|
46
|
+
next_cursor?: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof OrderFills
|
|
51
|
+
*/
|
|
52
|
+
market_id: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Array<OrderFill>}
|
|
56
|
+
* @memberof OrderFills
|
|
57
|
+
*/
|
|
58
|
+
fills: Array<OrderFill>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the OrderFills interface.
|
|
63
|
+
*/
|
|
64
|
+
export function instanceOfOrderFills(value: object): value is OrderFills {
|
|
65
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
66
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
67
|
+
if (!('fills' in value) || value['fills'] === undefined) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function OrderFillsFromJSON(json: any): OrderFills {
|
|
72
|
+
return OrderFillsFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function OrderFillsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFills {
|
|
76
|
+
if (json == null) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'code': json['code'],
|
|
82
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
83
|
+
'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
|
|
84
|
+
'market_id': json['market_id'],
|
|
85
|
+
'fills': ((json['fills'] as Array<any>).map(OrderFillFromJSON)),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function OrderFillsToJSON(value?: OrderFills | null): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'code': value['code'],
|
|
96
|
+
'message': value['message'],
|
|
97
|
+
'next_cursor': value['next_cursor'],
|
|
98
|
+
'market_id': value['market_id'],
|
|
99
|
+
'fills': ((value['fills'] as Array<any>).map(OrderFillToJSON)),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ReqGetAccountOrderFills
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetAccountOrderFills {
|
|
22
|
+
/**
|
|
23
|
+
* made optional to support header auth clients
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetAccountOrderFills
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqGetAccountOrderFills
|
|
32
|
+
*/
|
|
33
|
+
account_index: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ReqGetAccountOrderFills
|
|
38
|
+
*/
|
|
39
|
+
market_id: number;
|
|
40
|
+
/**
|
|
41
|
+
* "start-end" in unix seconds, same format as accountInactiveOrders
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ReqGetAccountOrderFills
|
|
44
|
+
*/
|
|
45
|
+
between_timestamps: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ReqGetAccountOrderFills
|
|
50
|
+
*/
|
|
51
|
+
cursor?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ReqGetAccountOrderFills
|
|
56
|
+
*/
|
|
57
|
+
limit: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ReqGetAccountOrderFills interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfReqGetAccountOrderFills(value: object): value is ReqGetAccountOrderFills {
|
|
64
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
65
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
66
|
+
if (!('between_timestamps' in value) || value['between_timestamps'] === undefined) return false;
|
|
67
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ReqGetAccountOrderFillsFromJSON(json: any): ReqGetAccountOrderFills {
|
|
72
|
+
return ReqGetAccountOrderFillsFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ReqGetAccountOrderFillsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountOrderFills {
|
|
76
|
+
if (json == null) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
82
|
+
'account_index': json['account_index'],
|
|
83
|
+
'market_id': json['market_id'],
|
|
84
|
+
'between_timestamps': json['between_timestamps'],
|
|
85
|
+
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
86
|
+
'limit': json['limit'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function ReqGetAccountOrderFillsToJSON(value?: ReqGetAccountOrderFills | null): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'auth': value['auth'],
|
|
97
|
+
'account_index': value['account_index'],
|
|
98
|
+
'market_id': value['market_id'],
|
|
99
|
+
'between_timestamps': value['between_timestamps'],
|
|
100
|
+
'cursor': value['cursor'],
|
|
101
|
+
'limit': value['limit'],
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
package/models/index.ts
CHANGED
|
@@ -126,6 +126,8 @@ export * from './OrderBookDetails';
|
|
|
126
126
|
export * from './OrderBookOrders';
|
|
127
127
|
export * from './OrderBookStats';
|
|
128
128
|
export * from './OrderBooks';
|
|
129
|
+
export * from './OrderFill';
|
|
130
|
+
export * from './OrderFills';
|
|
129
131
|
export * from './Orders';
|
|
130
132
|
export * from './PartnerStats';
|
|
131
133
|
export * from './PendingUnlock';
|
|
@@ -171,6 +173,7 @@ export * from './ReqGetAccountByL1Address';
|
|
|
171
173
|
export * from './ReqGetAccountInactiveOrders';
|
|
172
174
|
export * from './ReqGetAccountLimits';
|
|
173
175
|
export * from './ReqGetAccountMetadata';
|
|
176
|
+
export * from './ReqGetAccountOrderFills';
|
|
174
177
|
export * from './ReqGetAccountOrders';
|
|
175
178
|
export * from './ReqGetAccountPnL';
|
|
176
179
|
export * from './ReqGetAccountPnLV2';
|
package/openapi.json
CHANGED
|
@@ -386,6 +386,85 @@
|
|
|
386
386
|
"description": "Get account metadatas"
|
|
387
387
|
}
|
|
388
388
|
},
|
|
389
|
+
"/api/v1/accountOrderFills": {
|
|
390
|
+
"get": {
|
|
391
|
+
"summary": "accountOrderFills",
|
|
392
|
+
"operationId": "accountOrderFills",
|
|
393
|
+
"responses": {
|
|
394
|
+
"200": {
|
|
395
|
+
"description": "A successful response.",
|
|
396
|
+
"schema": {
|
|
397
|
+
"$ref": "#/definitions/OrderFills"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"400": {
|
|
401
|
+
"description": "Bad request",
|
|
402
|
+
"schema": {
|
|
403
|
+
"$ref": "#/definitions/ResultCode"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"parameters": [
|
|
408
|
+
{
|
|
409
|
+
"name": "authorization",
|
|
410
|
+
"description": " make required after integ is done",
|
|
411
|
+
"in": "query",
|
|
412
|
+
"required": false,
|
|
413
|
+
"type": "string"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "auth",
|
|
417
|
+
"description": " made optional to support header auth clients",
|
|
418
|
+
"in": "query",
|
|
419
|
+
"required": false,
|
|
420
|
+
"type": "string"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "account_index",
|
|
424
|
+
"in": "query",
|
|
425
|
+
"required": true,
|
|
426
|
+
"type": "integer",
|
|
427
|
+
"format": "int64"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "market_id",
|
|
431
|
+
"in": "query",
|
|
432
|
+
"required": true,
|
|
433
|
+
"type": "integer",
|
|
434
|
+
"format": "int64"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "between_timestamps",
|
|
438
|
+
"description": " \"start-end\" in unix seconds, same format as accountInactiveOrders",
|
|
439
|
+
"in": "query",
|
|
440
|
+
"required": true,
|
|
441
|
+
"type": "string"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "cursor",
|
|
445
|
+
"in": "query",
|
|
446
|
+
"required": false,
|
|
447
|
+
"type": "string"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "limit",
|
|
451
|
+
"in": "query",
|
|
452
|
+
"required": true,
|
|
453
|
+
"type": "integer",
|
|
454
|
+
"format": "int64",
|
|
455
|
+
"minimum": 1,
|
|
456
|
+
"maximum": 1000
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"tags": [
|
|
460
|
+
"order"
|
|
461
|
+
],
|
|
462
|
+
"consumes": [
|
|
463
|
+
"multipart/form-data"
|
|
464
|
+
],
|
|
465
|
+
"description": "Get an account's fills in one market and time range, newest first: filled orders (TWAP parents excluded) plus deleverage and market-settlement trades"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
389
468
|
"/api/v1/accountOrders": {
|
|
390
469
|
"get": {
|
|
391
470
|
"summary": "accountOrders",
|
|
@@ -14900,6 +14979,97 @@
|
|
|
14900
14979
|
"order_books"
|
|
14901
14980
|
]
|
|
14902
14981
|
},
|
|
14982
|
+
"OrderFill": {
|
|
14983
|
+
"type": "object",
|
|
14984
|
+
"properties": {
|
|
14985
|
+
"market_id": {
|
|
14986
|
+
"type": "integer",
|
|
14987
|
+
"format": "int64",
|
|
14988
|
+
"example": "1"
|
|
14989
|
+
},
|
|
14990
|
+
"timestamp": {
|
|
14991
|
+
"type": "integer",
|
|
14992
|
+
"format": "int64",
|
|
14993
|
+
"example": "1640995200000",
|
|
14994
|
+
"description": " milliseconds"
|
|
14995
|
+
},
|
|
14996
|
+
"is_ask": {
|
|
14997
|
+
"type": "boolean",
|
|
14998
|
+
"format": "boolean",
|
|
14999
|
+
"example": "true"
|
|
15000
|
+
},
|
|
15001
|
+
"base_amount": {
|
|
15002
|
+
"type": "string",
|
|
15003
|
+
"example": "0.1"
|
|
15004
|
+
},
|
|
15005
|
+
"quote_amount": {
|
|
15006
|
+
"type": "string",
|
|
15007
|
+
"example": "302.46"
|
|
15008
|
+
},
|
|
15009
|
+
"type": {
|
|
15010
|
+
"type": "string",
|
|
15011
|
+
"enum": [
|
|
15012
|
+
"order",
|
|
15013
|
+
"deleverage",
|
|
15014
|
+
"market-settlement"
|
|
15015
|
+
]
|
|
15016
|
+
},
|
|
15017
|
+
"order_id": {
|
|
15018
|
+
"type": "string",
|
|
15019
|
+
"example": "1",
|
|
15020
|
+
"description": " \"0\" for deleverage and market-settlement fills"
|
|
15021
|
+
},
|
|
15022
|
+
"trade_id": {
|
|
15023
|
+
"type": "string",
|
|
15024
|
+
"example": "145",
|
|
15025
|
+
"description": " \"0\" for order fills"
|
|
15026
|
+
}
|
|
15027
|
+
},
|
|
15028
|
+
"title": "OrderFill",
|
|
15029
|
+
"required": [
|
|
15030
|
+
"market_id",
|
|
15031
|
+
"timestamp",
|
|
15032
|
+
"is_ask",
|
|
15033
|
+
"base_amount",
|
|
15034
|
+
"quote_amount",
|
|
15035
|
+
"type",
|
|
15036
|
+
"order_id",
|
|
15037
|
+
"trade_id"
|
|
15038
|
+
]
|
|
15039
|
+
},
|
|
15040
|
+
"OrderFills": {
|
|
15041
|
+
"type": "object",
|
|
15042
|
+
"properties": {
|
|
15043
|
+
"code": {
|
|
15044
|
+
"type": "integer",
|
|
15045
|
+
"format": "int32",
|
|
15046
|
+
"example": "200"
|
|
15047
|
+
},
|
|
15048
|
+
"message": {
|
|
15049
|
+
"type": "string"
|
|
15050
|
+
},
|
|
15051
|
+
"next_cursor": {
|
|
15052
|
+
"type": "string"
|
|
15053
|
+
},
|
|
15054
|
+
"market_id": {
|
|
15055
|
+
"type": "integer",
|
|
15056
|
+
"format": "int64",
|
|
15057
|
+
"example": "1"
|
|
15058
|
+
},
|
|
15059
|
+
"fills": {
|
|
15060
|
+
"type": "array",
|
|
15061
|
+
"items": {
|
|
15062
|
+
"$ref": "#/definitions/OrderFill"
|
|
15063
|
+
}
|
|
15064
|
+
}
|
|
15065
|
+
},
|
|
15066
|
+
"title": "OrderFills",
|
|
15067
|
+
"required": [
|
|
15068
|
+
"code",
|
|
15069
|
+
"market_id",
|
|
15070
|
+
"fills"
|
|
15071
|
+
]
|
|
15072
|
+
},
|
|
14903
15073
|
"Orders": {
|
|
14904
15074
|
"type": "object",
|
|
14905
15075
|
"properties": {
|
|
@@ -17886,6 +18056,43 @@
|
|
|
17886
18056
|
"value"
|
|
17887
18057
|
]
|
|
17888
18058
|
},
|
|
18059
|
+
"ReqGetAccountOrderFills": {
|
|
18060
|
+
"type": "object",
|
|
18061
|
+
"properties": {
|
|
18062
|
+
"auth": {
|
|
18063
|
+
"type": "string",
|
|
18064
|
+
"description": " made optional to support header auth clients"
|
|
18065
|
+
},
|
|
18066
|
+
"account_index": {
|
|
18067
|
+
"type": "integer",
|
|
18068
|
+
"format": "int64"
|
|
18069
|
+
},
|
|
18070
|
+
"market_id": {
|
|
18071
|
+
"type": "integer",
|
|
18072
|
+
"format": "int64"
|
|
18073
|
+
},
|
|
18074
|
+
"between_timestamps": {
|
|
18075
|
+
"type": "string",
|
|
18076
|
+
"description": " \"start-end\" in unix seconds, same format as accountInactiveOrders"
|
|
18077
|
+
},
|
|
18078
|
+
"cursor": {
|
|
18079
|
+
"type": "string"
|
|
18080
|
+
},
|
|
18081
|
+
"limit": {
|
|
18082
|
+
"type": "integer",
|
|
18083
|
+
"format": "int64",
|
|
18084
|
+
"maximum": 1000,
|
|
18085
|
+
"minimum": 1
|
|
18086
|
+
}
|
|
18087
|
+
},
|
|
18088
|
+
"title": "ReqGetAccountOrderFills",
|
|
18089
|
+
"required": [
|
|
18090
|
+
"account_index",
|
|
18091
|
+
"market_id",
|
|
18092
|
+
"between_timestamps",
|
|
18093
|
+
"limit"
|
|
18094
|
+
]
|
|
18095
|
+
},
|
|
17889
18096
|
"ReqGetAccountOrders": {
|
|
17890
18097
|
"type": "object",
|
|
17891
18098
|
"properties": {
|