zklighter-perps 1.0.45 → 1.0.46
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/OrderApi.ts +25 -0
- package/models/ReqGetTrades.ts +26 -0
- package/openapi.json +29 -0
- package/package.json +1 -1
package/apis/OrderApi.ts
CHANGED
|
@@ -83,9 +83,11 @@ export interface RecentTradesRequest {
|
|
|
83
83
|
export interface TradesRequest {
|
|
84
84
|
market_id: number;
|
|
85
85
|
by: TradesByEnum;
|
|
86
|
+
filter: TradesFilterEnum;
|
|
86
87
|
from: number;
|
|
87
88
|
limit: number;
|
|
88
89
|
order_index?: number;
|
|
90
|
+
account_index?: number;
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/**
|
|
@@ -510,6 +512,13 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
510
512
|
);
|
|
511
513
|
}
|
|
512
514
|
|
|
515
|
+
if (requestParameters['filter'] == null) {
|
|
516
|
+
throw new runtime.RequiredError(
|
|
517
|
+
'filter',
|
|
518
|
+
'Required parameter "filter" was null or undefined when calling trades().'
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
513
522
|
if (requestParameters['from'] == null) {
|
|
514
523
|
throw new runtime.RequiredError(
|
|
515
524
|
'from',
|
|
@@ -538,6 +547,14 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
538
547
|
queryParameters['by'] = requestParameters['by'];
|
|
539
548
|
}
|
|
540
549
|
|
|
550
|
+
if (requestParameters['filter'] != null) {
|
|
551
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if (requestParameters['account_index'] != null) {
|
|
555
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
556
|
+
}
|
|
557
|
+
|
|
541
558
|
if (requestParameters['from'] != null) {
|
|
542
559
|
queryParameters['from'] = requestParameters['from'];
|
|
543
560
|
}
|
|
@@ -602,3 +619,11 @@ export const TradesByEnum = {
|
|
|
602
619
|
TradeId: 'trade_id'
|
|
603
620
|
} as const;
|
|
604
621
|
export type TradesByEnum = typeof TradesByEnum[keyof typeof TradesByEnum];
|
|
622
|
+
/**
|
|
623
|
+
* @export
|
|
624
|
+
*/
|
|
625
|
+
export const TradesFilterEnum = {
|
|
626
|
+
AccountIndex: 'account_index',
|
|
627
|
+
All: 'all'
|
|
628
|
+
} as const;
|
|
629
|
+
export type TradesFilterEnum = typeof TradesFilterEnum[keyof typeof TradesFilterEnum];
|
package/models/ReqGetTrades.ts
CHANGED
|
@@ -37,6 +37,18 @@ export interface ReqGetTrades {
|
|
|
37
37
|
* @memberof ReqGetTrades
|
|
38
38
|
*/
|
|
39
39
|
by: ReqGetTradesByEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ReqGetTrades
|
|
44
|
+
*/
|
|
45
|
+
filter: ReqGetTradesFilterEnum;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ReqGetTrades
|
|
50
|
+
*/
|
|
51
|
+
account_index?: number;
|
|
40
52
|
/**
|
|
41
53
|
*
|
|
42
54
|
* @type {number}
|
|
@@ -62,6 +74,15 @@ export const ReqGetTradesByEnum = {
|
|
|
62
74
|
} as const;
|
|
63
75
|
export type ReqGetTradesByEnum = typeof ReqGetTradesByEnum[keyof typeof ReqGetTradesByEnum];
|
|
64
76
|
|
|
77
|
+
/**
|
|
78
|
+
* @export
|
|
79
|
+
*/
|
|
80
|
+
export const ReqGetTradesFilterEnum = {
|
|
81
|
+
AccountIndex: 'account_index',
|
|
82
|
+
All: 'all'
|
|
83
|
+
} as const;
|
|
84
|
+
export type ReqGetTradesFilterEnum = typeof ReqGetTradesFilterEnum[keyof typeof ReqGetTradesFilterEnum];
|
|
85
|
+
|
|
65
86
|
|
|
66
87
|
/**
|
|
67
88
|
* Check if a given object implements the ReqGetTrades interface.
|
|
@@ -69,6 +90,7 @@ export type ReqGetTradesByEnum = typeof ReqGetTradesByEnum[keyof typeof ReqGetTr
|
|
|
69
90
|
export function instanceOfReqGetTrades(value: object): value is ReqGetTrades {
|
|
70
91
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
71
92
|
if (!('by' in value) || value['by'] === undefined) return false;
|
|
93
|
+
if (!('filter' in value) || value['filter'] === undefined) return false;
|
|
72
94
|
if (!('from' in value) || value['from'] === undefined) return false;
|
|
73
95
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
74
96
|
return true;
|
|
@@ -87,6 +109,8 @@ export function ReqGetTradesFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
87
109
|
'market_id': json['market_id'],
|
|
88
110
|
'order_index': json['order_index'] == null ? undefined : json['order_index'],
|
|
89
111
|
'by': json['by'],
|
|
112
|
+
'filter': json['filter'],
|
|
113
|
+
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
90
114
|
'from': json['from'],
|
|
91
115
|
'limit': json['limit'],
|
|
92
116
|
};
|
|
@@ -101,6 +125,8 @@ export function ReqGetTradesToJSON(value?: ReqGetTrades | null): any {
|
|
|
101
125
|
'market_id': value['market_id'],
|
|
102
126
|
'order_index': value['order_index'],
|
|
103
127
|
'by': value['by'],
|
|
128
|
+
'filter': value['filter'],
|
|
129
|
+
'account_index': value['account_index'],
|
|
104
130
|
'from': value['from'],
|
|
105
131
|
'limit': value['limit'],
|
|
106
132
|
};
|
package/openapi.json
CHANGED
|
@@ -1595,6 +1595,23 @@
|
|
|
1595
1595
|
"trade_id"
|
|
1596
1596
|
]
|
|
1597
1597
|
},
|
|
1598
|
+
{
|
|
1599
|
+
"name": "filter",
|
|
1600
|
+
"in": "query",
|
|
1601
|
+
"required": true,
|
|
1602
|
+
"type": "string",
|
|
1603
|
+
"enum": [
|
|
1604
|
+
"account_index",
|
|
1605
|
+
"all"
|
|
1606
|
+
]
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
"name": "account_index",
|
|
1610
|
+
"in": "query",
|
|
1611
|
+
"required": false,
|
|
1612
|
+
"type": "integer",
|
|
1613
|
+
"format": "int64"
|
|
1614
|
+
},
|
|
1598
1615
|
{
|
|
1599
1616
|
"name": "from",
|
|
1600
1617
|
"in": "query",
|
|
@@ -4384,6 +4401,17 @@
|
|
|
4384
4401
|
"trade_id"
|
|
4385
4402
|
]
|
|
4386
4403
|
},
|
|
4404
|
+
"filter": {
|
|
4405
|
+
"type": "string",
|
|
4406
|
+
"enum": [
|
|
4407
|
+
"account_index",
|
|
4408
|
+
"all"
|
|
4409
|
+
]
|
|
4410
|
+
},
|
|
4411
|
+
"account_index": {
|
|
4412
|
+
"type": "integer",
|
|
4413
|
+
"format": "int64"
|
|
4414
|
+
},
|
|
4387
4415
|
"from": {
|
|
4388
4416
|
"type": "integer",
|
|
4389
4417
|
"format": "int64"
|
|
@@ -4399,6 +4427,7 @@
|
|
|
4399
4427
|
"required": [
|
|
4400
4428
|
"market_id",
|
|
4401
4429
|
"by",
|
|
4430
|
+
"filter",
|
|
4402
4431
|
"from",
|
|
4403
4432
|
"limit"
|
|
4404
4433
|
]
|