zklighter-perps 1.0.187 → 1.0.189
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 +7 -3
- package/apis/AccountApi.ts +16 -31
- package/apis/CandlestickApi.ts +114 -0
- package/models/Account.ts +9 -0
- package/models/AirdropAllocationItem.ts +70 -0
- package/models/AirdropAllocations.ts +77 -0
- package/models/ApiKey.ts +9 -0
- package/models/Candle.ts +160 -0
- package/models/Candles.ts +94 -0
- package/models/Candlestick.ts +9 -0
- package/models/DetailedAccount.ts +9 -0
- package/models/EnrichedTx.ts +9 -0
- package/models/LiqTrade.ts +9 -0
- package/models/Order.ts +9 -0
- package/models/OrderBookDepthWithBeginNonce.ts +104 -0
- package/models/ReqGetAirdropAllocations.ts +69 -0
- package/models/ReqGetCandles.ts +123 -0
- package/models/SimpleOrder.ts +9 -0
- package/models/Trade.ts +9 -0
- package/models/Tx.ts +9 -0
- package/models/index.ts +7 -3
- package/openapi.json +385 -39
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -26,8 +26,8 @@ models/AccountPnL.ts
|
|
|
26
26
|
models/AccountPosition.ts
|
|
27
27
|
models/AccountStats.ts
|
|
28
28
|
models/AccountTradeStats.ts
|
|
29
|
-
models/
|
|
30
|
-
models/
|
|
29
|
+
models/AirdropAllocationItem.ts
|
|
30
|
+
models/AirdropAllocations.ts
|
|
31
31
|
models/Announcement.ts
|
|
32
32
|
models/Announcements.ts
|
|
33
33
|
models/ApiKey.ts
|
|
@@ -40,6 +40,8 @@ models/Blocks.ts
|
|
|
40
40
|
models/Bridge.ts
|
|
41
41
|
models/BridgeSupportedNetwork.ts
|
|
42
42
|
models/BridgeSupportedNetworks.ts
|
|
43
|
+
models/Candle.ts
|
|
44
|
+
models/Candles.ts
|
|
43
45
|
models/Candlestick.ts
|
|
44
46
|
models/Candlesticks.ts
|
|
45
47
|
models/ContractAddress.ts
|
|
@@ -78,6 +80,7 @@ models/NextNonce.ts
|
|
|
78
80
|
models/Order.ts
|
|
79
81
|
models/OrderBook.ts
|
|
80
82
|
models/OrderBookDepth.ts
|
|
83
|
+
models/OrderBookDepthWithBeginNonce.ts
|
|
81
84
|
models/OrderBookDetails.ts
|
|
82
85
|
models/OrderBookOrders.ts
|
|
83
86
|
models/OrderBookStats.ts
|
|
@@ -106,13 +109,14 @@ models/ReqGetAccountLimits.ts
|
|
|
106
109
|
models/ReqGetAccountMetadata.ts
|
|
107
110
|
models/ReqGetAccountPnL.ts
|
|
108
111
|
models/ReqGetAccountTxs.ts
|
|
109
|
-
models/
|
|
112
|
+
models/ReqGetAirdropAllocations.ts
|
|
110
113
|
models/ReqGetApiTokens.ts
|
|
111
114
|
models/ReqGetAssetDetails.ts
|
|
112
115
|
models/ReqGetBlock.ts
|
|
113
116
|
models/ReqGetBlockTxs.ts
|
|
114
117
|
models/ReqGetBridgesByL1Addr.ts
|
|
115
118
|
models/ReqGetByAccount.ts
|
|
119
|
+
models/ReqGetCandles.ts
|
|
116
120
|
models/ReqGetCandlesticks.ts
|
|
117
121
|
models/ReqGetDepositHistory.ts
|
|
118
122
|
models/ReqGetFastWithdrawInfo.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
AccountLimits,
|
|
20
20
|
AccountMetadatas,
|
|
21
21
|
AccountPnL,
|
|
22
|
-
|
|
22
|
+
AirdropAllocations,
|
|
23
23
|
DetailedAccounts,
|
|
24
24
|
IsWhitelisted,
|
|
25
25
|
L1Metadata,
|
|
@@ -43,8 +43,8 @@ import {
|
|
|
43
43
|
AccountMetadatasToJSON,
|
|
44
44
|
AccountPnLFromJSON,
|
|
45
45
|
AccountPnLToJSON,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
AirdropAllocationsFromJSON,
|
|
47
|
+
AirdropAllocationsToJSON,
|
|
48
48
|
DetailedAccountsFromJSON,
|
|
49
49
|
DetailedAccountsToJSON,
|
|
50
50
|
IsWhitelistedFromJSON,
|
|
@@ -103,12 +103,9 @@ export interface AirdropRequest {
|
|
|
103
103
|
|
|
104
104
|
export interface AirdropCreateRequest {
|
|
105
105
|
l1_address: string;
|
|
106
|
-
|
|
106
|
+
allocations: string;
|
|
107
107
|
signature: string;
|
|
108
108
|
authorization?: string;
|
|
109
|
-
nonce?: number;
|
|
110
|
-
account_index?: number;
|
|
111
|
-
api_key_index?: number;
|
|
112
109
|
auth?: string;
|
|
113
110
|
}
|
|
114
111
|
|
|
@@ -407,10 +404,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
407
404
|
}
|
|
408
405
|
|
|
409
406
|
/**
|
|
410
|
-
* Get airdrop
|
|
407
|
+
* Get airdrop allocation
|
|
411
408
|
* airdrop
|
|
412
409
|
*/
|
|
413
|
-
async airdropRaw(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
410
|
+
async airdropRaw(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AirdropAllocations>> {
|
|
414
411
|
if (requestParameters['l1_address'] == null) {
|
|
415
412
|
throw new runtime.RequiredError(
|
|
416
413
|
'l1_address',
|
|
@@ -441,20 +438,20 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
441
438
|
query: queryParameters,
|
|
442
439
|
}, initOverrides);
|
|
443
440
|
|
|
444
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
441
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AirdropAllocationsFromJSON(jsonValue));
|
|
445
442
|
}
|
|
446
443
|
|
|
447
444
|
/**
|
|
448
|
-
* Get airdrop
|
|
445
|
+
* Get airdrop allocation
|
|
449
446
|
* airdrop
|
|
450
447
|
*/
|
|
451
|
-
async airdrop(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
448
|
+
async airdrop(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AirdropAllocations> {
|
|
452
449
|
const response = await this.airdropRaw(requestParameters, initOverrides);
|
|
453
450
|
return await response.value();
|
|
454
451
|
}
|
|
455
452
|
|
|
456
453
|
/**
|
|
457
|
-
* Create airdrop
|
|
454
|
+
* Create airdrop allocation
|
|
458
455
|
* airdrop_create
|
|
459
456
|
*/
|
|
460
457
|
async airdropCreateRaw(requestParameters: AirdropCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
@@ -465,10 +462,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
465
462
|
);
|
|
466
463
|
}
|
|
467
464
|
|
|
468
|
-
if (requestParameters['
|
|
465
|
+
if (requestParameters['allocations'] == null) {
|
|
469
466
|
throw new runtime.RequiredError(
|
|
470
|
-
'
|
|
471
|
-
'Required parameter "
|
|
467
|
+
'allocations',
|
|
468
|
+
'Required parameter "allocations" was null or undefined when calling airdropCreate().'
|
|
472
469
|
);
|
|
473
470
|
}
|
|
474
471
|
|
|
@@ -505,20 +502,8 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
505
502
|
formParams.append('l1_address', requestParameters['l1_address'] as any);
|
|
506
503
|
}
|
|
507
504
|
|
|
508
|
-
if (requestParameters['
|
|
509
|
-
formParams.append('
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
if (requestParameters['nonce'] != null) {
|
|
513
|
-
formParams.append('nonce', requestParameters['nonce'] as any);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
if (requestParameters['account_index'] != null) {
|
|
517
|
-
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
if (requestParameters['api_key_index'] != null) {
|
|
521
|
-
formParams.append('api_key_index', requestParameters['api_key_index'] as any);
|
|
505
|
+
if (requestParameters['allocations'] != null) {
|
|
506
|
+
formParams.append('allocations', requestParameters['allocations'] as any);
|
|
522
507
|
}
|
|
523
508
|
|
|
524
509
|
if (requestParameters['signature'] != null) {
|
|
@@ -541,7 +526,7 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
541
526
|
}
|
|
542
527
|
|
|
543
528
|
/**
|
|
544
|
-
* Create airdrop
|
|
529
|
+
* Create airdrop allocation
|
|
545
530
|
* airdrop_create
|
|
546
531
|
*/
|
|
547
532
|
async airdropCreate(requestParameters: AirdropCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
package/apis/CandlestickApi.ts
CHANGED
|
@@ -15,11 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
Candles,
|
|
18
19
|
Candlesticks,
|
|
19
20
|
Fundings,
|
|
20
21
|
ResultCode,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
24
|
+
CandlesFromJSON,
|
|
25
|
+
CandlesToJSON,
|
|
23
26
|
CandlesticksFromJSON,
|
|
24
27
|
CandlesticksToJSON,
|
|
25
28
|
FundingsFromJSON,
|
|
@@ -28,6 +31,15 @@ import {
|
|
|
28
31
|
ResultCodeToJSON,
|
|
29
32
|
} from '../models/index';
|
|
30
33
|
|
|
34
|
+
export interface CandlesRequest {
|
|
35
|
+
market_id: number;
|
|
36
|
+
resolution: CandlesResolutionEnum;
|
|
37
|
+
start_timestamp: number;
|
|
38
|
+
end_timestamp: number;
|
|
39
|
+
count_back: number;
|
|
40
|
+
set_timestamp_to_end?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
31
43
|
export interface CandlesticksRequest {
|
|
32
44
|
market_id: number;
|
|
33
45
|
resolution: CandlesticksResolutionEnum;
|
|
@@ -50,6 +62,93 @@ export interface FundingsRequest {
|
|
|
50
62
|
*/
|
|
51
63
|
export class CandlestickApi extends runtime.BaseAPI {
|
|
52
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Get candles (optimized with shortened fields and smaller response size)
|
|
67
|
+
* candles
|
|
68
|
+
*/
|
|
69
|
+
async candlesRaw(requestParameters: CandlesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Candles>> {
|
|
70
|
+
if (requestParameters['market_id'] == null) {
|
|
71
|
+
throw new runtime.RequiredError(
|
|
72
|
+
'market_id',
|
|
73
|
+
'Required parameter "market_id" was null or undefined when calling candles().'
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (requestParameters['resolution'] == null) {
|
|
78
|
+
throw new runtime.RequiredError(
|
|
79
|
+
'resolution',
|
|
80
|
+
'Required parameter "resolution" was null or undefined when calling candles().'
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (requestParameters['start_timestamp'] == null) {
|
|
85
|
+
throw new runtime.RequiredError(
|
|
86
|
+
'start_timestamp',
|
|
87
|
+
'Required parameter "start_timestamp" was null or undefined when calling candles().'
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (requestParameters['end_timestamp'] == null) {
|
|
92
|
+
throw new runtime.RequiredError(
|
|
93
|
+
'end_timestamp',
|
|
94
|
+
'Required parameter "end_timestamp" was null or undefined when calling candles().'
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (requestParameters['count_back'] == null) {
|
|
99
|
+
throw new runtime.RequiredError(
|
|
100
|
+
'count_back',
|
|
101
|
+
'Required parameter "count_back" was null or undefined when calling candles().'
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const queryParameters: any = {};
|
|
106
|
+
|
|
107
|
+
if (requestParameters['market_id'] != null) {
|
|
108
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (requestParameters['resolution'] != null) {
|
|
112
|
+
queryParameters['resolution'] = requestParameters['resolution'];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (requestParameters['start_timestamp'] != null) {
|
|
116
|
+
queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (requestParameters['end_timestamp'] != null) {
|
|
120
|
+
queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (requestParameters['count_back'] != null) {
|
|
124
|
+
queryParameters['count_back'] = requestParameters['count_back'];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (requestParameters['set_timestamp_to_end'] != null) {
|
|
128
|
+
queryParameters['set_timestamp_to_end'] = requestParameters['set_timestamp_to_end'];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
132
|
+
|
|
133
|
+
const response = await this.request({
|
|
134
|
+
path: `/api/v1/candles`,
|
|
135
|
+
method: 'GET',
|
|
136
|
+
headers: headerParameters,
|
|
137
|
+
query: queryParameters,
|
|
138
|
+
}, initOverrides);
|
|
139
|
+
|
|
140
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CandlesFromJSON(jsonValue));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Get candles (optimized with shortened fields and smaller response size)
|
|
145
|
+
* candles
|
|
146
|
+
*/
|
|
147
|
+
async candles(requestParameters: CandlesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Candles> {
|
|
148
|
+
const response = await this.candlesRaw(requestParameters, initOverrides);
|
|
149
|
+
return await response.value();
|
|
150
|
+
}
|
|
151
|
+
|
|
53
152
|
/**
|
|
54
153
|
* Get candlesticks
|
|
55
154
|
* candlesticks
|
|
@@ -222,6 +321,21 @@ export class CandlestickApi extends runtime.BaseAPI {
|
|
|
222
321
|
|
|
223
322
|
}
|
|
224
323
|
|
|
324
|
+
/**
|
|
325
|
+
* @export
|
|
326
|
+
*/
|
|
327
|
+
export const CandlesResolutionEnum = {
|
|
328
|
+
_1m: '1m',
|
|
329
|
+
_5m: '5m',
|
|
330
|
+
_15m: '15m',
|
|
331
|
+
_30m: '30m',
|
|
332
|
+
_1h: '1h',
|
|
333
|
+
_4h: '4h',
|
|
334
|
+
_12h: '12h',
|
|
335
|
+
_1d: '1d',
|
|
336
|
+
_1w: '1w'
|
|
337
|
+
} as const;
|
|
338
|
+
export type CandlesResolutionEnum = typeof CandlesResolutionEnum[keyof typeof CandlesResolutionEnum];
|
|
225
339
|
/**
|
|
226
340
|
* @export
|
|
227
341
|
*/
|
package/models/Account.ts
CHANGED
|
@@ -91,6 +91,12 @@ export interface Account {
|
|
|
91
91
|
* @memberof Account
|
|
92
92
|
*/
|
|
93
93
|
collateral: string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof Account
|
|
98
|
+
*/
|
|
99
|
+
transaction_time: number;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
/**
|
|
@@ -108,6 +114,7 @@ export function instanceOfAccount(value: object): value is Account {
|
|
|
108
114
|
if (!('available_balance' in value) || value['available_balance'] === undefined) return false;
|
|
109
115
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
110
116
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
117
|
+
if (!('transaction_time' in value) || value['transaction_time'] === undefined) return false;
|
|
111
118
|
return true;
|
|
112
119
|
}
|
|
113
120
|
|
|
@@ -133,6 +140,7 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
|
|
|
133
140
|
'available_balance': json['available_balance'],
|
|
134
141
|
'status': json['status'],
|
|
135
142
|
'collateral': json['collateral'],
|
|
143
|
+
'transaction_time': json['transaction_time'],
|
|
136
144
|
};
|
|
137
145
|
}
|
|
138
146
|
|
|
@@ -154,6 +162,7 @@ export function AccountToJSON(value?: Account | null): any {
|
|
|
154
162
|
'available_balance': value['available_balance'],
|
|
155
163
|
'status': value['status'],
|
|
156
164
|
'collateral': value['collateral'],
|
|
165
|
+
'transaction_time': value['transaction_time'],
|
|
157
166
|
};
|
|
158
167
|
}
|
|
159
168
|
|
|
@@ -0,0 +1,70 @@
|
|
|
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 AirdropAllocationItem
|
|
20
|
+
*/
|
|
21
|
+
export interface AirdropAllocationItem {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AirdropAllocationItem
|
|
26
|
+
*/
|
|
27
|
+
l1_address: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AirdropAllocationItem
|
|
32
|
+
*/
|
|
33
|
+
allocation: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AirdropAllocationItem interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAirdropAllocationItem(value: object): value is AirdropAllocationItem {
|
|
40
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
41
|
+
if (!('allocation' in value) || value['allocation'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function AirdropAllocationItemFromJSON(json: any): AirdropAllocationItem {
|
|
46
|
+
return AirdropAllocationItemFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function AirdropAllocationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): AirdropAllocationItem {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'l1_address': json['l1_address'],
|
|
56
|
+
'allocation': json['allocation'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AirdropAllocationItemToJSON(value?: AirdropAllocationItem | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'l1_address': value['l1_address'],
|
|
67
|
+
'allocation': value['allocation'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { AirdropAllocationItem } from './AirdropAllocationItem';
|
|
17
|
+
import {
|
|
18
|
+
AirdropAllocationItemFromJSON,
|
|
19
|
+
AirdropAllocationItemFromJSONTyped,
|
|
20
|
+
AirdropAllocationItemToJSON,
|
|
21
|
+
} from './AirdropAllocationItem';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface AirdropAllocations
|
|
27
|
+
*/
|
|
28
|
+
export interface AirdropAllocations {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof AirdropAllocations
|
|
33
|
+
*/
|
|
34
|
+
l1_address: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {Array<AirdropAllocationItem>}
|
|
38
|
+
* @memberof AirdropAllocations
|
|
39
|
+
*/
|
|
40
|
+
allocations: Array<AirdropAllocationItem>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the AirdropAllocations interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfAirdropAllocations(value: object): value is AirdropAllocations {
|
|
47
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
48
|
+
if (!('allocations' in value) || value['allocations'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AirdropAllocationsFromJSON(json: any): AirdropAllocations {
|
|
53
|
+
return AirdropAllocationsFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AirdropAllocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AirdropAllocations {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'l1_address': json['l1_address'],
|
|
63
|
+
'allocations': ((json['allocations'] as Array<any>).map(AirdropAllocationItemFromJSON)),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function AirdropAllocationsToJSON(value?: AirdropAllocations | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'l1_address': value['l1_address'],
|
|
74
|
+
'allocations': ((value['allocations'] as Array<any>).map(AirdropAllocationItemToJSON)),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
package/models/ApiKey.ts
CHANGED
|
@@ -43,6 +43,12 @@ export interface ApiKey {
|
|
|
43
43
|
* @memberof ApiKey
|
|
44
44
|
*/
|
|
45
45
|
public_key: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ApiKey
|
|
50
|
+
*/
|
|
51
|
+
transaction_time: number;
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
/**
|
|
@@ -53,6 +59,7 @@ export function instanceOfApiKey(value: object): value is ApiKey {
|
|
|
53
59
|
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
54
60
|
if (!('nonce' in value) || value['nonce'] === undefined) return false;
|
|
55
61
|
if (!('public_key' in value) || value['public_key'] === undefined) return false;
|
|
62
|
+
if (!('transaction_time' in value) || value['transaction_time'] === undefined) return false;
|
|
56
63
|
return true;
|
|
57
64
|
}
|
|
58
65
|
|
|
@@ -70,6 +77,7 @@ export function ApiKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ap
|
|
|
70
77
|
'api_key_index': json['api_key_index'],
|
|
71
78
|
'nonce': json['nonce'],
|
|
72
79
|
'public_key': json['public_key'],
|
|
80
|
+
'transaction_time': json['transaction_time'],
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
83
|
|
|
@@ -83,6 +91,7 @@ export function ApiKeyToJSON(value?: ApiKey | null): any {
|
|
|
83
91
|
'api_key_index': value['api_key_index'],
|
|
84
92
|
'nonce': value['nonce'],
|
|
85
93
|
'public_key': value['public_key'],
|
|
94
|
+
'transaction_time': value['transaction_time'],
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
97
|
|
package/models/Candle.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
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 Candle
|
|
20
|
+
*/
|
|
21
|
+
export interface Candle {
|
|
22
|
+
/**
|
|
23
|
+
* timestamp
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Candle
|
|
26
|
+
*/
|
|
27
|
+
t: number;
|
|
28
|
+
/**
|
|
29
|
+
* open
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Candle
|
|
32
|
+
*/
|
|
33
|
+
o: number;
|
|
34
|
+
/**
|
|
35
|
+
* high
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof Candle
|
|
38
|
+
*/
|
|
39
|
+
h: number;
|
|
40
|
+
/**
|
|
41
|
+
* low
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof Candle
|
|
44
|
+
*/
|
|
45
|
+
l: number;
|
|
46
|
+
/**
|
|
47
|
+
* close
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof Candle
|
|
50
|
+
*/
|
|
51
|
+
c: number;
|
|
52
|
+
/**
|
|
53
|
+
* open_raw
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof Candle
|
|
56
|
+
*/
|
|
57
|
+
O: number;
|
|
58
|
+
/**
|
|
59
|
+
* high_raw
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof Candle
|
|
62
|
+
*/
|
|
63
|
+
H: number;
|
|
64
|
+
/**
|
|
65
|
+
* low_raw
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof Candle
|
|
68
|
+
*/
|
|
69
|
+
L: number;
|
|
70
|
+
/**
|
|
71
|
+
* close_raw
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof Candle
|
|
74
|
+
*/
|
|
75
|
+
C: number;
|
|
76
|
+
/**
|
|
77
|
+
* volume0
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof Candle
|
|
80
|
+
*/
|
|
81
|
+
v: number;
|
|
82
|
+
/**
|
|
83
|
+
* volume1
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof Candle
|
|
86
|
+
*/
|
|
87
|
+
V: number;
|
|
88
|
+
/**
|
|
89
|
+
* last_trade_id
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof Candle
|
|
92
|
+
*/
|
|
93
|
+
i: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the Candle interface.
|
|
98
|
+
*/
|
|
99
|
+
export function instanceOfCandle(value: object): value is Candle {
|
|
100
|
+
if (!('t' in value) || value['t'] === undefined) return false;
|
|
101
|
+
if (!('o' in value) || value['o'] === undefined) return false;
|
|
102
|
+
if (!('h' in value) || value['h'] === undefined) return false;
|
|
103
|
+
if (!('l' in value) || value['l'] === undefined) return false;
|
|
104
|
+
if (!('c' in value) || value['c'] === undefined) return false;
|
|
105
|
+
if (!('O' in value) || value['O'] === undefined) return false;
|
|
106
|
+
if (!('H' in value) || value['H'] === undefined) return false;
|
|
107
|
+
if (!('L' in value) || value['L'] === undefined) return false;
|
|
108
|
+
if (!('C' in value) || value['C'] === undefined) return false;
|
|
109
|
+
if (!('v' in value) || value['v'] === undefined) return false;
|
|
110
|
+
if (!('V' in value) || value['V'] === undefined) return false;
|
|
111
|
+
if (!('i' in value) || value['i'] === undefined) return false;
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function CandleFromJSON(json: any): Candle {
|
|
116
|
+
return CandleFromJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function CandleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Candle {
|
|
120
|
+
if (json == null) {
|
|
121
|
+
return json;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
|
|
125
|
+
't': json['t'],
|
|
126
|
+
'o': json['o'],
|
|
127
|
+
'h': json['h'],
|
|
128
|
+
'l': json['l'],
|
|
129
|
+
'c': json['c'],
|
|
130
|
+
'O': json['O'],
|
|
131
|
+
'H': json['H'],
|
|
132
|
+
'L': json['L'],
|
|
133
|
+
'C': json['C'],
|
|
134
|
+
'v': json['v'],
|
|
135
|
+
'V': json['V'],
|
|
136
|
+
'i': json['i'],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function CandleToJSON(value?: Candle | null): any {
|
|
141
|
+
if (value == null) {
|
|
142
|
+
return value;
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
|
|
146
|
+
't': value['t'],
|
|
147
|
+
'o': value['o'],
|
|
148
|
+
'h': value['h'],
|
|
149
|
+
'l': value['l'],
|
|
150
|
+
'c': value['c'],
|
|
151
|
+
'O': value['O'],
|
|
152
|
+
'H': value['H'],
|
|
153
|
+
'L': value['L'],
|
|
154
|
+
'C': value['C'],
|
|
155
|
+
'v': value['v'],
|
|
156
|
+
'V': value['V'],
|
|
157
|
+
'i': value['i'],
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|