zklighter-perps 1.0.82 → 1.0.84

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 CHANGED
@@ -51,6 +51,7 @@ export interface AccountInactiveOrdersRequest {
51
51
  limit: number;
52
52
  market_id?: number;
53
53
  ask_filter?: number;
54
+ between_timestamps?: string;
54
55
  cursor?: string;
55
56
  }
56
57
 
@@ -190,6 +191,10 @@ export class OrderApi extends runtime.BaseAPI {
190
191
  queryParameters['ask_filter'] = requestParameters['ask_filter'];
191
192
  }
192
193
 
194
+ if (requestParameters['between_timestamps'] != null) {
195
+ queryParameters['between_timestamps'] = requestParameters['between_timestamps'];
196
+ }
197
+
193
198
  if (requestParameters['cursor'] != null) {
194
199
  queryParameters['cursor'] = requestParameters['cursor'];
195
200
  }
@@ -49,6 +49,12 @@ export interface MarketInfo {
49
49
  * @memberof MarketInfo
50
50
  */
51
51
  last_trade_price: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof MarketInfo
56
+ */
57
+ current_funding_rate: string;
52
58
  /**
53
59
  *
54
60
  * @type {string}
@@ -102,6 +108,7 @@ export function instanceOfMarketInfo(value: object): value is MarketInfo {
102
108
  if (!('mark_price' in value) || value['mark_price'] === undefined) return false;
103
109
  if (!('open_interest' in value) || value['open_interest'] === undefined) return false;
104
110
  if (!('last_trade_price' in value) || value['last_trade_price'] === undefined) return false;
111
+ if (!('current_funding_rate' in value) || value['current_funding_rate'] === undefined) return false;
105
112
  if (!('funding_rate' in value) || value['funding_rate'] === undefined) return false;
106
113
  if (!('funding_timestamp' in value) || value['funding_timestamp'] === undefined) return false;
107
114
  if (!('daily_base_token_volume' in value) || value['daily_base_token_volume'] === undefined) return false;
@@ -127,6 +134,7 @@ export function MarketInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
127
134
  'mark_price': json['mark_price'],
128
135
  'open_interest': json['open_interest'],
129
136
  'last_trade_price': json['last_trade_price'],
137
+ 'current_funding_rate': json['current_funding_rate'],
130
138
  'funding_rate': json['funding_rate'],
131
139
  'funding_timestamp': json['funding_timestamp'],
132
140
  'daily_base_token_volume': json['daily_base_token_volume'],
@@ -148,6 +156,7 @@ export function MarketInfoToJSON(value?: MarketInfo | null): any {
148
156
  'mark_price': value['mark_price'],
149
157
  'open_interest': value['open_interest'],
150
158
  'last_trade_price': value['last_trade_price'],
159
+ 'current_funding_rate': value['current_funding_rate'],
151
160
  'funding_rate': value['funding_rate'],
152
161
  'funding_timestamp': value['funding_timestamp'],
153
162
  'daily_base_token_volume': value['daily_base_token_volume'],
@@ -60,9 +60,20 @@ export interface PositionFunding {
60
60
  * @type {string}
61
61
  * @memberof PositionFunding
62
62
  */
63
- position_side: string;
63
+ position_side: PositionFundingPositionSideEnum;
64
64
  }
65
65
 
66
+
67
+ /**
68
+ * @export
69
+ */
70
+ export const PositionFundingPositionSideEnum = {
71
+ Long: 'long',
72
+ Short: 'short'
73
+ } as const;
74
+ export type PositionFundingPositionSideEnum = typeof PositionFundingPositionSideEnum[keyof typeof PositionFundingPositionSideEnum];
75
+
76
+
66
77
  /**
67
78
  * Check if a given object implements the PositionFunding interface.
68
79
  */
@@ -37,6 +37,12 @@ export interface ReqGetAccountInactiveOrders {
37
37
  * @memberof ReqGetAccountInactiveOrders
38
38
  */
39
39
  ask_filter?: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ReqGetAccountInactiveOrders
44
+ */
45
+ between_timestamps?: string;
40
46
  /**
41
47
  *
42
48
  * @type {string}
@@ -73,6 +79,7 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
73
79
  'account_index': json['account_index'],
74
80
  'market_id': json['market_id'] == null ? undefined : json['market_id'],
75
81
  'ask_filter': json['ask_filter'] == null ? undefined : json['ask_filter'],
82
+ 'between_timestamps': json['between_timestamps'] == null ? undefined : json['between_timestamps'],
76
83
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
77
84
  'limit': json['limit'],
78
85
  };
@@ -87,6 +94,7 @@ export function ReqGetAccountInactiveOrdersToJSON(value?: ReqGetAccountInactiveO
87
94
  'account_index': value['account_index'],
88
95
  'market_id': value['market_id'],
89
96
  'ask_filter': value['ask_filter'],
97
+ 'between_timestamps': value['between_timestamps'],
90
98
  'cursor': value['cursor'],
91
99
  'limit': value['limit'],
92
100
  };
package/openapi.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "title": "",
5
5
  "version": ""
6
6
  },
7
- "host": "testnet.zklighter.elliot.ai",
7
+ "host": "mainnet.zklighter.elliot.ai",
8
8
  "schemes": [
9
9
  "https"
10
10
  ],
@@ -175,6 +175,12 @@
175
175
  "format": "int8",
176
176
  "default": "-1"
177
177
  },
178
+ {
179
+ "name": "between_timestamps",
180
+ "in": "query",
181
+ "required": false,
182
+ "type": "string"
183
+ },
178
184
  {
179
185
  "name": "cursor",
180
186
  "in": "query",
@@ -3624,6 +3630,10 @@
3624
3630
  "type": "string",
3625
3631
  "example": "3024.66"
3626
3632
  },
3633
+ "current_funding_rate": {
3634
+ "type": "string",
3635
+ "example": "0.0001"
3636
+ },
3627
3637
  "funding_rate": {
3628
3638
  "type": "string",
3629
3639
  "example": "0.0001"
@@ -3666,6 +3676,7 @@
3666
3676
  "mark_price",
3667
3677
  "open_interest",
3668
3678
  "last_trade_price",
3679
+ "current_funding_rate",
3669
3680
  "funding_rate",
3670
3681
  "funding_timestamp",
3671
3682
  "daily_base_token_volume",
@@ -4365,7 +4376,11 @@
4365
4376
  },
4366
4377
  "position_side": {
4367
4378
  "type": "string",
4368
- "example": "1"
4379
+ "example": "long",
4380
+ "enum": [
4381
+ "long",
4382
+ "short"
4383
+ ]
4369
4384
  }
4370
4385
  },
4371
4386
  "title": "PositionFunding",
@@ -4733,6 +4748,9 @@
4733
4748
  "format": "int8",
4734
4749
  "default": "-1"
4735
4750
  },
4751
+ "between_timestamps": {
4752
+ "type": "string"
4753
+ },
4736
4754
  "cursor": {
4737
4755
  "type": "string"
4738
4756
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.82",
3
+ "version": "1.0.84",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {
package/runtime.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
- export const BASE_PATH = "https://testnet.zklighter.elliot.ai".replace(/\/+$/, "");
16
+ export const BASE_PATH = "https://mainnet.zklighter.elliot.ai".replace(/\/+$/, "");
17
17
 
18
18
  export interface ConfigurationParameters {
19
19
  basePath?: string; // override base path