zklighter-perps 1.0.5 → 1.0.6
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/AccountApi.ts +12 -0
- package/apis/BlockApi.ts +6 -3
- package/apis/CandlestickApi.ts +4 -3
- package/apis/InfoApi.ts +8 -3
- package/apis/OrderApi.ts +18 -3
- package/apis/RelayerApi.ts +2 -3
- package/apis/RootApi.ts +2 -69
- package/apis/TransactionApi.ts +26 -37
- package/apis/WsApi.ts +4 -0
- package/models/AccountMarketStats.ts +12 -18
- package/models/AccountPnL.ts +5 -7
- package/models/AccountPosition.ts +22 -33
- package/models/AccountStats.ts +10 -15
- package/models/Block.ts +27 -40
- package/models/Blocks.ts +5 -7
- package/models/Candlestick.ts +14 -21
- package/models/Candlesticks.ts +5 -7
- package/models/ContractAddress.ts +4 -6
- package/models/CurrentHeight.ts +2 -3
- package/models/DetailedAccount.ts +8 -11
- package/models/DetailedAccounts.ts +5 -7
- package/models/EnrichedTx.ts +6 -9
- package/models/ExchangeStats.ts +9 -13
- package/models/Funding.ts +8 -12
- package/models/Fundings.ts +5 -7
- package/models/L1ProviderInfo.ts +8 -12
- package/models/Layer1BasicInfo.ts +17 -24
- package/models/Layer2BasicInfo.ts +6 -9
- package/models/MainAccount.ts +6 -9
- package/models/MainAccounts.ts +5 -7
- package/models/MarketInfo.ts +22 -33
- package/models/MarketSig.ts +8 -12
- package/models/NextNonce.ts +2 -3
- package/models/Order.ts +32 -48
- package/models/OrderBook.ts +20 -30
- package/models/OrderBookDepth.ts +8 -11
- package/models/OrderBookDetail.ts +36 -54
- package/models/OrderBookDetails.ts +3 -4
- package/models/OrderBookOrders.ts +10 -14
- package/models/OrderBookStats.ts +12 -18
- package/models/OrderBooks.ts +3 -4
- package/models/Orders.ts +3 -4
- package/models/Permission.ts +2 -3
- package/models/PnLEntry.ts +4 -6
- package/models/PriceLevel.ts +4 -6
- package/models/ReqDoFaucet.ts +2 -3
- package/models/ReqGetAccount.ts +4 -6
- package/models/ReqGetAccountActiveOrders.ts +6 -9
- package/models/ReqGetAccountByL1Address.ts +2 -3
- package/models/ReqGetAccountInactiveOrders.ts +8 -12
- package/models/ReqGetAccountOrders.ts +6 -9
- package/models/ReqGetAccountPnL.ts +12 -18
- package/models/ReqGetBlock.ts +4 -6
- package/models/ReqGetBlockTxs.ts +4 -6
- package/models/ReqGetByAccount.ts +4 -6
- package/models/ReqGetCandlesticks.ts +10 -15
- package/models/ReqGetFundings.ts +10 -15
- package/models/ReqGetL1Tx.ts +2 -3
- package/models/ReqGetMarketSig.ts +6 -9
- package/models/ReqGetNextNonce.ts +4 -6
- package/models/ReqGetOrderBookDetails.ts +2 -3
- package/models/ReqGetOrderBookOrders.ts +4 -6
- package/models/ReqGetOrderBooks.ts +2 -3
- package/models/ReqGetPermission.ts +6 -9
- package/models/ReqGetRangeWithCursor.ts +2 -3
- package/models/ReqGetRangeWithIndex.ts +2 -3
- package/models/ReqGetRecentTrades.ts +4 -6
- package/models/ReqGetRollbacks.ts +6 -9
- package/models/ReqGetSubAccount.ts +6 -9
- package/models/ReqGetTrades.ts +8 -12
- package/models/ReqGetTx.ts +4 -6
- package/models/ReqSearch.ts +2 -3
- package/models/ResultCode.ts +2 -3
- package/models/Rollback.ts +8 -12
- package/models/Rollbacks.ts +5 -7
- package/models/Search.ts +2 -3
- package/models/SignBody.ts +2 -3
- package/models/SimpleOrder.ts +12 -18
- package/models/Status.ts +4 -6
- package/models/SubAccount.ts +16 -24
- package/models/SubAccounts.ts +9 -13
- package/models/Trade.ts +24 -36
- package/models/Trades.ts +3 -4
- package/models/Tx.ts +28 -42
- package/models/TxHash.ts +2 -3
- package/models/Txs.ts +3 -4
- package/models/ValidatorInfo.ts +4 -6
- package/openapi.json +191 -891
- package/package.json +1 -1
package/models/Block.ts
CHANGED
|
@@ -31,98 +31,85 @@ export interface Block {
|
|
|
31
31
|
* @type {string}
|
|
32
32
|
* @memberof Block
|
|
33
33
|
*/
|
|
34
|
-
commitment
|
|
34
|
+
commitment?: string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
37
|
* @type {number}
|
|
38
38
|
* @memberof Block
|
|
39
39
|
*/
|
|
40
|
-
height
|
|
40
|
+
height?: number;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof Block
|
|
45
45
|
*/
|
|
46
|
-
stateRoot
|
|
46
|
+
stateRoot?: string;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {number}
|
|
50
50
|
* @memberof Block
|
|
51
51
|
*/
|
|
52
|
-
priorityOperations
|
|
52
|
+
priorityOperations?: number;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
55
|
* @type {number}
|
|
56
56
|
* @memberof Block
|
|
57
57
|
*/
|
|
58
|
-
onChainL2Operations
|
|
58
|
+
onChainL2Operations?: number;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
61
|
* @type {string}
|
|
62
62
|
* @memberof Block
|
|
63
63
|
*/
|
|
64
|
-
pendingOnChainOperationsPubData
|
|
64
|
+
pendingOnChainOperationsPubData?: string;
|
|
65
65
|
/**
|
|
66
66
|
*
|
|
67
67
|
* @type {string}
|
|
68
68
|
* @memberof Block
|
|
69
69
|
*/
|
|
70
|
-
committedTxHash
|
|
70
|
+
committedTxHash?: string;
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
73
|
* @type {number}
|
|
74
74
|
* @memberof Block
|
|
75
75
|
*/
|
|
76
|
-
committedAt
|
|
76
|
+
committedAt?: number;
|
|
77
77
|
/**
|
|
78
78
|
*
|
|
79
79
|
* @type {string}
|
|
80
80
|
* @memberof Block
|
|
81
81
|
*/
|
|
82
|
-
verifiedTxHash
|
|
82
|
+
verifiedTxHash?: string;
|
|
83
83
|
/**
|
|
84
84
|
*
|
|
85
85
|
* @type {number}
|
|
86
86
|
* @memberof Block
|
|
87
87
|
*/
|
|
88
|
-
verifiedAt
|
|
88
|
+
verifiedAt?: number;
|
|
89
89
|
/**
|
|
90
90
|
*
|
|
91
91
|
* @type {Array<Tx>}
|
|
92
92
|
* @memberof Block
|
|
93
93
|
*/
|
|
94
|
-
txs
|
|
94
|
+
txs?: Array<Tx>;
|
|
95
95
|
/**
|
|
96
96
|
*
|
|
97
97
|
* @type {number}
|
|
98
98
|
* @memberof Block
|
|
99
99
|
*/
|
|
100
|
-
status
|
|
100
|
+
status?: number;
|
|
101
101
|
/**
|
|
102
102
|
*
|
|
103
103
|
* @type {number}
|
|
104
104
|
* @memberof Block
|
|
105
105
|
*/
|
|
106
|
-
size
|
|
106
|
+
size?: number;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Check if a given object implements the Block interface.
|
|
111
111
|
*/
|
|
112
112
|
export function instanceOfBlock(value: object): value is Block {
|
|
113
|
-
if (!('commitment' in value) || value['commitment'] === undefined) return false;
|
|
114
|
-
if (!('height' in value) || value['height'] === undefined) return false;
|
|
115
|
-
if (!('stateRoot' in value) || value['stateRoot'] === undefined) return false;
|
|
116
|
-
if (!('priorityOperations' in value) || value['priorityOperations'] === undefined) return false;
|
|
117
|
-
if (!('onChainL2Operations' in value) || value['onChainL2Operations'] === undefined) return false;
|
|
118
|
-
if (!('pendingOnChainOperationsPubData' in value) || value['pendingOnChainOperationsPubData'] === undefined) return false;
|
|
119
|
-
if (!('committedTxHash' in value) || value['committedTxHash'] === undefined) return false;
|
|
120
|
-
if (!('committedAt' in value) || value['committedAt'] === undefined) return false;
|
|
121
|
-
if (!('verifiedTxHash' in value) || value['verifiedTxHash'] === undefined) return false;
|
|
122
|
-
if (!('verifiedAt' in value) || value['verifiedAt'] === undefined) return false;
|
|
123
|
-
if (!('txs' in value) || value['txs'] === undefined) return false;
|
|
124
|
-
if (!('status' in value) || value['status'] === undefined) return false;
|
|
125
|
-
if (!('size' in value) || value['size'] === undefined) return false;
|
|
126
113
|
return true;
|
|
127
114
|
}
|
|
128
115
|
|
|
@@ -136,19 +123,19 @@ export function BlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Blo
|
|
|
136
123
|
}
|
|
137
124
|
return {
|
|
138
125
|
|
|
139
|
-
'commitment': json['commitment'],
|
|
140
|
-
'height': json['height'],
|
|
141
|
-
'stateRoot': json['state_root'],
|
|
142
|
-
'priorityOperations': json['priority_operations'],
|
|
143
|
-
'onChainL2Operations': json['on_chain_l2_operations'],
|
|
144
|
-
'pendingOnChainOperationsPubData': json['pending_on_chain_operations_pub_data'],
|
|
145
|
-
'committedTxHash': json['committed_tx_hash'],
|
|
146
|
-
'committedAt': json['committed_at'],
|
|
147
|
-
'verifiedTxHash': json['verified_tx_hash'],
|
|
148
|
-
'verifiedAt': json['verified_at'],
|
|
149
|
-
'txs': ((json['txs'] as Array<any>).map(TxFromJSON)),
|
|
150
|
-
'status': json['status'],
|
|
151
|
-
'size': json['size'],
|
|
126
|
+
'commitment': json['commitment'] == null ? undefined : json['commitment'],
|
|
127
|
+
'height': json['height'] == null ? undefined : json['height'],
|
|
128
|
+
'stateRoot': json['state_root'] == null ? undefined : json['state_root'],
|
|
129
|
+
'priorityOperations': json['priority_operations'] == null ? undefined : json['priority_operations'],
|
|
130
|
+
'onChainL2Operations': json['on_chain_l2_operations'] == null ? undefined : json['on_chain_l2_operations'],
|
|
131
|
+
'pendingOnChainOperationsPubData': json['pending_on_chain_operations_pub_data'] == null ? undefined : json['pending_on_chain_operations_pub_data'],
|
|
132
|
+
'committedTxHash': json['committed_tx_hash'] == null ? undefined : json['committed_tx_hash'],
|
|
133
|
+
'committedAt': json['committed_at'] == null ? undefined : json['committed_at'],
|
|
134
|
+
'verifiedTxHash': json['verified_tx_hash'] == null ? undefined : json['verified_tx_hash'],
|
|
135
|
+
'verifiedAt': json['verified_at'] == null ? undefined : json['verified_at'],
|
|
136
|
+
'txs': json['txs'] == null ? undefined : ((json['txs'] as Array<any>).map(TxFromJSON)),
|
|
137
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
138
|
+
'size': json['size'] == null ? undefined : json['size'],
|
|
152
139
|
};
|
|
153
140
|
}
|
|
154
141
|
|
|
@@ -168,7 +155,7 @@ export function BlockToJSON(value?: Block | null): any {
|
|
|
168
155
|
'committed_at': value['committedAt'],
|
|
169
156
|
'verified_tx_hash': value['verifiedTxHash'],
|
|
170
157
|
'verified_at': value['verifiedAt'],
|
|
171
|
-
'txs': ((value['txs'] as Array<any>).map(TxToJSON)),
|
|
158
|
+
'txs': value['txs'] == null ? undefined : ((value['txs'] as Array<any>).map(TxToJSON)),
|
|
172
159
|
'status': value['status'],
|
|
173
160
|
'size': value['size'],
|
|
174
161
|
};
|
package/models/Blocks.ts
CHANGED
|
@@ -43,21 +43,19 @@ export interface Blocks {
|
|
|
43
43
|
* @type {number}
|
|
44
44
|
* @memberof Blocks
|
|
45
45
|
*/
|
|
46
|
-
total
|
|
46
|
+
total?: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {Array<Block>}
|
|
50
50
|
* @memberof Blocks
|
|
51
51
|
*/
|
|
52
|
-
blocks
|
|
52
|
+
blocks?: Array<Block>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the Blocks interface.
|
|
57
57
|
*/
|
|
58
58
|
export function instanceOfBlocks(value: object): value is Blocks {
|
|
59
|
-
if (!('total' in value) || value['total'] === undefined) return false;
|
|
60
|
-
if (!('blocks' in value) || value['blocks'] === undefined) return false;
|
|
61
59
|
return true;
|
|
62
60
|
}
|
|
63
61
|
|
|
@@ -73,8 +71,8 @@ export function BlocksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bl
|
|
|
73
71
|
|
|
74
72
|
'code': json['code'] == null ? undefined : json['code'],
|
|
75
73
|
'message': json['message'] == null ? undefined : json['message'],
|
|
76
|
-
'total': json['total'],
|
|
77
|
-
'blocks': ((json['blocks'] as Array<any>).map(BlockFromJSON)),
|
|
74
|
+
'total': json['total'] == null ? undefined : json['total'],
|
|
75
|
+
'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array<any>).map(BlockFromJSON)),
|
|
78
76
|
};
|
|
79
77
|
}
|
|
80
78
|
|
|
@@ -87,7 +85,7 @@ export function BlocksToJSON(value?: Blocks | null): any {
|
|
|
87
85
|
'code': value['code'],
|
|
88
86
|
'message': value['message'],
|
|
89
87
|
'total': value['total'],
|
|
90
|
-
'blocks': ((value['blocks'] as Array<any>).map(BlockToJSON)),
|
|
88
|
+
'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array<any>).map(BlockToJSON)),
|
|
91
89
|
};
|
|
92
90
|
}
|
|
93
91
|
|
package/models/Candlestick.ts
CHANGED
|
@@ -24,56 +24,49 @@ export interface Candlestick {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof Candlestick
|
|
26
26
|
*/
|
|
27
|
-
timestamp
|
|
27
|
+
timestamp?: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof Candlestick
|
|
32
32
|
*/
|
|
33
|
-
open
|
|
33
|
+
open?: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof Candlestick
|
|
38
38
|
*/
|
|
39
|
-
high
|
|
39
|
+
high?: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
43
|
* @memberof Candlestick
|
|
44
44
|
*/
|
|
45
|
-
low
|
|
45
|
+
low?: number;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof Candlestick
|
|
50
50
|
*/
|
|
51
|
-
close
|
|
51
|
+
close?: number;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
55
55
|
* @memberof Candlestick
|
|
56
56
|
*/
|
|
57
|
-
volume0
|
|
57
|
+
volume0?: number;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {number}
|
|
61
61
|
* @memberof Candlestick
|
|
62
62
|
*/
|
|
63
|
-
volume1
|
|
63
|
+
volume1?: number;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Check if a given object implements the Candlestick interface.
|
|
68
68
|
*/
|
|
69
69
|
export function instanceOfCandlestick(value: object): value is Candlestick {
|
|
70
|
-
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
71
|
-
if (!('open' in value) || value['open'] === undefined) return false;
|
|
72
|
-
if (!('high' in value) || value['high'] === undefined) return false;
|
|
73
|
-
if (!('low' in value) || value['low'] === undefined) return false;
|
|
74
|
-
if (!('close' in value) || value['close'] === undefined) return false;
|
|
75
|
-
if (!('volume0' in value) || value['volume0'] === undefined) return false;
|
|
76
|
-
if (!('volume1' in value) || value['volume1'] === undefined) return false;
|
|
77
70
|
return true;
|
|
78
71
|
}
|
|
79
72
|
|
|
@@ -87,13 +80,13 @@ export function CandlestickFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
87
80
|
}
|
|
88
81
|
return {
|
|
89
82
|
|
|
90
|
-
'timestamp': json['timestamp'],
|
|
91
|
-
'open': json['open'],
|
|
92
|
-
'high': json['high'],
|
|
93
|
-
'low': json['low'],
|
|
94
|
-
'close': json['close'],
|
|
95
|
-
'volume0': json['volume0'],
|
|
96
|
-
'volume1': json['volume1'],
|
|
83
|
+
'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
|
|
84
|
+
'open': json['open'] == null ? undefined : json['open'],
|
|
85
|
+
'high': json['high'] == null ? undefined : json['high'],
|
|
86
|
+
'low': json['low'] == null ? undefined : json['low'],
|
|
87
|
+
'close': json['close'] == null ? undefined : json['close'],
|
|
88
|
+
'volume0': json['volume0'] == null ? undefined : json['volume0'],
|
|
89
|
+
'volume1': json['volume1'] == null ? undefined : json['volume1'],
|
|
97
90
|
};
|
|
98
91
|
}
|
|
99
92
|
|
package/models/Candlesticks.ts
CHANGED
|
@@ -43,21 +43,19 @@ export interface Candlesticks {
|
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof Candlesticks
|
|
45
45
|
*/
|
|
46
|
-
resolution
|
|
46
|
+
resolution?: string;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {Array<Candlestick>}
|
|
50
50
|
* @memberof Candlesticks
|
|
51
51
|
*/
|
|
52
|
-
candlesticks
|
|
52
|
+
candlesticks?: Array<Candlestick>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the Candlesticks interface.
|
|
57
57
|
*/
|
|
58
58
|
export function instanceOfCandlesticks(value: object): value is Candlesticks {
|
|
59
|
-
if (!('resolution' in value) || value['resolution'] === undefined) return false;
|
|
60
|
-
if (!('candlesticks' in value) || value['candlesticks'] === undefined) return false;
|
|
61
59
|
return true;
|
|
62
60
|
}
|
|
63
61
|
|
|
@@ -73,8 +71,8 @@ export function CandlesticksFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
73
71
|
|
|
74
72
|
'code': json['code'] == null ? undefined : json['code'],
|
|
75
73
|
'message': json['message'] == null ? undefined : json['message'],
|
|
76
|
-
'resolution': json['resolution'],
|
|
77
|
-
'candlesticks': ((json['candlesticks'] as Array<any>).map(CandlestickFromJSON)),
|
|
74
|
+
'resolution': json['resolution'] == null ? undefined : json['resolution'],
|
|
75
|
+
'candlesticks': json['candlesticks'] == null ? undefined : ((json['candlesticks'] as Array<any>).map(CandlestickFromJSON)),
|
|
78
76
|
};
|
|
79
77
|
}
|
|
80
78
|
|
|
@@ -87,7 +85,7 @@ export function CandlesticksToJSON(value?: Candlesticks | null): any {
|
|
|
87
85
|
'code': value['code'],
|
|
88
86
|
'message': value['message'],
|
|
89
87
|
'resolution': value['resolution'],
|
|
90
|
-
'candlesticks': ((value['candlesticks'] as Array<any>).map(CandlestickToJSON)),
|
|
88
|
+
'candlesticks': value['candlesticks'] == null ? undefined : ((value['candlesticks'] as Array<any>).map(CandlestickToJSON)),
|
|
91
89
|
};
|
|
92
90
|
}
|
|
93
91
|
|
|
@@ -24,21 +24,19 @@ export interface ContractAddress {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ContractAddress
|
|
26
26
|
*/
|
|
27
|
-
name
|
|
27
|
+
name?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof ContractAddress
|
|
32
32
|
*/
|
|
33
|
-
address
|
|
33
|
+
address?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Check if a given object implements the ContractAddress interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfContractAddress(value: object): value is ContractAddress {
|
|
40
|
-
if (!('name' in value) || value['name'] === undefined) return false;
|
|
41
|
-
if (!('address' in value) || value['address'] === undefined) return false;
|
|
42
40
|
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
@@ -52,8 +50,8 @@ export function ContractAddressFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'name': json['name'],
|
|
56
|
-
'address': json['address'],
|
|
53
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
54
|
+
'address': json['address'] == null ? undefined : json['address'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
package/models/CurrentHeight.ts
CHANGED
|
@@ -36,14 +36,13 @@ export interface CurrentHeight {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof CurrentHeight
|
|
38
38
|
*/
|
|
39
|
-
height
|
|
39
|
+
height?: number;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Check if a given object implements the CurrentHeight interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfCurrentHeight(value: object): value is CurrentHeight {
|
|
46
|
-
if (!('height' in value) || value['height'] === undefined) return false;
|
|
47
46
|
return true;
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -59,7 +58,7 @@ export function CurrentHeightFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
59
58
|
|
|
60
59
|
'code': json['code'] == null ? undefined : json['code'],
|
|
61
60
|
'message': json['message'] == null ? undefined : json['message'],
|
|
62
|
-
'height': json['height'],
|
|
61
|
+
'height': json['height'] == null ? undefined : json['height'],
|
|
63
62
|
};
|
|
64
63
|
}
|
|
65
64
|
|
|
@@ -97,28 +97,25 @@ export interface DetailedAccount {
|
|
|
97
97
|
* @type {Array<AccountPosition>}
|
|
98
98
|
* @memberof DetailedAccount
|
|
99
99
|
*/
|
|
100
|
-
positions
|
|
100
|
+
positions?: Array<AccountPosition>;
|
|
101
101
|
/**
|
|
102
102
|
*
|
|
103
103
|
* @type {string}
|
|
104
104
|
* @memberof DetailedAccount
|
|
105
105
|
*/
|
|
106
|
-
totalAssetValue
|
|
106
|
+
totalAssetValue?: string;
|
|
107
107
|
/**
|
|
108
108
|
*
|
|
109
109
|
* @type {Array<AccountMarketStats>}
|
|
110
110
|
* @memberof DetailedAccount
|
|
111
111
|
*/
|
|
112
|
-
marketStats
|
|
112
|
+
marketStats?: Array<AccountMarketStats>;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* Check if a given object implements the DetailedAccount interface.
|
|
117
117
|
*/
|
|
118
118
|
export function instanceOfDetailedAccount(value: object): value is DetailedAccount {
|
|
119
|
-
if (!('positions' in value) || value['positions'] === undefined) return false;
|
|
120
|
-
if (!('totalAssetValue' in value) || value['totalAssetValue'] === undefined) return false;
|
|
121
|
-
if (!('marketStats' in value) || value['marketStats'] === undefined) return false;
|
|
122
119
|
return true;
|
|
123
120
|
}
|
|
124
121
|
|
|
@@ -142,9 +139,9 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
142
139
|
'status': json['status'] == null ? undefined : json['status'],
|
|
143
140
|
'collateral': json['collateral'] == null ? undefined : json['collateral'],
|
|
144
141
|
'collateralType': json['collateral_type'] == null ? undefined : json['collateral_type'],
|
|
145
|
-
'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
146
|
-
'totalAssetValue': json['total_asset_value'],
|
|
147
|
-
'marketStats': ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
|
|
142
|
+
'positions': json['positions'] == null ? undefined : ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
143
|
+
'totalAssetValue': json['total_asset_value'] == null ? undefined : json['total_asset_value'],
|
|
144
|
+
'marketStats': json['market_stats'] == null ? undefined : ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
|
|
148
145
|
};
|
|
149
146
|
}
|
|
150
147
|
|
|
@@ -164,9 +161,9 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
164
161
|
'status': value['status'],
|
|
165
162
|
'collateral': value['collateral'],
|
|
166
163
|
'collateral_type': value['collateralType'],
|
|
167
|
-
'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
164
|
+
'positions': value['positions'] == null ? undefined : ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
168
165
|
'total_asset_value': value['totalAssetValue'],
|
|
169
|
-
'market_stats': ((value['marketStats'] as Array<any>).map(AccountMarketStatsToJSON)),
|
|
166
|
+
'market_stats': value['marketStats'] == null ? undefined : ((value['marketStats'] as Array<any>).map(AccountMarketStatsToJSON)),
|
|
170
167
|
};
|
|
171
168
|
}
|
|
172
169
|
|
|
@@ -43,21 +43,19 @@ export interface DetailedAccounts {
|
|
|
43
43
|
* @type {number}
|
|
44
44
|
* @memberof DetailedAccounts
|
|
45
45
|
*/
|
|
46
|
-
total
|
|
46
|
+
total?: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {Array<DetailedAccount>}
|
|
50
50
|
* @memberof DetailedAccounts
|
|
51
51
|
*/
|
|
52
|
-
accounts
|
|
52
|
+
accounts?: Array<DetailedAccount>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the DetailedAccounts interface.
|
|
57
57
|
*/
|
|
58
58
|
export function instanceOfDetailedAccounts(value: object): value is DetailedAccounts {
|
|
59
|
-
if (!('total' in value) || value['total'] === undefined) return false;
|
|
60
|
-
if (!('accounts' in value) || value['accounts'] === undefined) return false;
|
|
61
59
|
return true;
|
|
62
60
|
}
|
|
63
61
|
|
|
@@ -73,8 +71,8 @@ export function DetailedAccountsFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
73
71
|
|
|
74
72
|
'code': json['code'] == null ? undefined : json['code'],
|
|
75
73
|
'message': json['message'] == null ? undefined : json['message'],
|
|
76
|
-
'total': json['total'],
|
|
77
|
-
'accounts': ((json['accounts'] as Array<any>).map(DetailedAccountFromJSON)),
|
|
74
|
+
'total': json['total'] == null ? undefined : json['total'],
|
|
75
|
+
'accounts': json['accounts'] == null ? undefined : ((json['accounts'] as Array<any>).map(DetailedAccountFromJSON)),
|
|
78
76
|
};
|
|
79
77
|
}
|
|
80
78
|
|
|
@@ -87,7 +85,7 @@ export function DetailedAccountsToJSON(value?: DetailedAccounts | null): any {
|
|
|
87
85
|
'code': value['code'],
|
|
88
86
|
'message': value['message'],
|
|
89
87
|
'total': value['total'],
|
|
90
|
-
'accounts': ((value['accounts'] as Array<any>).map(DetailedAccountToJSON)),
|
|
88
|
+
'accounts': value['accounts'] == null ? undefined : ((value['accounts'] as Array<any>).map(DetailedAccountToJSON)),
|
|
91
89
|
};
|
|
92
90
|
}
|
|
93
91
|
|
package/models/EnrichedTx.ts
CHANGED
|
@@ -120,28 +120,25 @@ export interface EnrichedTx {
|
|
|
120
120
|
* @type {number}
|
|
121
121
|
* @memberof EnrichedTx
|
|
122
122
|
*/
|
|
123
|
-
committedAt
|
|
123
|
+
committedAt?: number;
|
|
124
124
|
/**
|
|
125
125
|
*
|
|
126
126
|
* @type {number}
|
|
127
127
|
* @memberof EnrichedTx
|
|
128
128
|
*/
|
|
129
|
-
verifiedAt
|
|
129
|
+
verifiedAt?: number;
|
|
130
130
|
/**
|
|
131
131
|
*
|
|
132
132
|
* @type {number}
|
|
133
133
|
* @memberof EnrichedTx
|
|
134
134
|
*/
|
|
135
|
-
executedAt
|
|
135
|
+
executedAt?: number;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* Check if a given object implements the EnrichedTx interface.
|
|
140
140
|
*/
|
|
141
141
|
export function instanceOfEnrichedTx(value: object): value is EnrichedTx {
|
|
142
|
-
if (!('committedAt' in value) || value['committedAt'] === undefined) return false;
|
|
143
|
-
if (!('verifiedAt' in value) || value['verifiedAt'] === undefined) return false;
|
|
144
|
-
if (!('executedAt' in value) || value['executedAt'] === undefined) return false;
|
|
145
142
|
return true;
|
|
146
143
|
}
|
|
147
144
|
|
|
@@ -171,9 +168,9 @@ export function EnrichedTxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
171
168
|
'createdAt': json['created_at'] == null ? undefined : json['created_at'],
|
|
172
169
|
'verifyAt': json['verify_at'] == null ? undefined : json['verify_at'],
|
|
173
170
|
'sequenceIndex': json['sequence_index'] == null ? undefined : json['sequence_index'],
|
|
174
|
-
'committedAt': json['committed_at'],
|
|
175
|
-
'verifiedAt': json['verified_at'],
|
|
176
|
-
'executedAt': json['executed_at'],
|
|
171
|
+
'committedAt': json['committed_at'] == null ? undefined : json['committed_at'],
|
|
172
|
+
'verifiedAt': json['verified_at'] == null ? undefined : json['verified_at'],
|
|
173
|
+
'executedAt': json['executed_at'] == null ? undefined : json['executed_at'],
|
|
177
174
|
};
|
|
178
175
|
}
|
|
179
176
|
|
package/models/ExchangeStats.ts
CHANGED
|
@@ -43,35 +43,31 @@ export interface ExchangeStats {
|
|
|
43
43
|
* @type {number}
|
|
44
44
|
* @memberof ExchangeStats
|
|
45
45
|
*/
|
|
46
|
-
total
|
|
46
|
+
total?: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {Array<OrderBookStats>}
|
|
50
50
|
* @memberof ExchangeStats
|
|
51
51
|
*/
|
|
52
|
-
orderBookStats
|
|
52
|
+
orderBookStats?: Array<OrderBookStats>;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
55
|
* @type {number}
|
|
56
56
|
* @memberof ExchangeStats
|
|
57
57
|
*/
|
|
58
|
-
dailyUsdVolume
|
|
58
|
+
dailyUsdVolume?: number;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
61
|
* @type {number}
|
|
62
62
|
* @memberof ExchangeStats
|
|
63
63
|
*/
|
|
64
|
-
dailyTradesCount
|
|
64
|
+
dailyTradesCount?: number;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Check if a given object implements the ExchangeStats interface.
|
|
69
69
|
*/
|
|
70
70
|
export function instanceOfExchangeStats(value: object): value is ExchangeStats {
|
|
71
|
-
if (!('total' in value) || value['total'] === undefined) return false;
|
|
72
|
-
if (!('orderBookStats' in value) || value['orderBookStats'] === undefined) return false;
|
|
73
|
-
if (!('dailyUsdVolume' in value) || value['dailyUsdVolume'] === undefined) return false;
|
|
74
|
-
if (!('dailyTradesCount' in value) || value['dailyTradesCount'] === undefined) return false;
|
|
75
71
|
return true;
|
|
76
72
|
}
|
|
77
73
|
|
|
@@ -87,10 +83,10 @@ export function ExchangeStatsFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
87
83
|
|
|
88
84
|
'code': json['code'] == null ? undefined : json['code'],
|
|
89
85
|
'message': json['message'] == null ? undefined : json['message'],
|
|
90
|
-
'total': json['total'],
|
|
91
|
-
'orderBookStats': ((json['order_book_stats'] as Array<any>).map(OrderBookStatsFromJSON)),
|
|
92
|
-
'dailyUsdVolume': json['daily_usd_volume'],
|
|
93
|
-
'dailyTradesCount': json['daily_trades_count'],
|
|
86
|
+
'total': json['total'] == null ? undefined : json['total'],
|
|
87
|
+
'orderBookStats': json['order_book_stats'] == null ? undefined : ((json['order_book_stats'] as Array<any>).map(OrderBookStatsFromJSON)),
|
|
88
|
+
'dailyUsdVolume': json['daily_usd_volume'] == null ? undefined : json['daily_usd_volume'],
|
|
89
|
+
'dailyTradesCount': json['daily_trades_count'] == null ? undefined : json['daily_trades_count'],
|
|
94
90
|
};
|
|
95
91
|
}
|
|
96
92
|
|
|
@@ -103,7 +99,7 @@ export function ExchangeStatsToJSON(value?: ExchangeStats | null): any {
|
|
|
103
99
|
'code': value['code'],
|
|
104
100
|
'message': value['message'],
|
|
105
101
|
'total': value['total'],
|
|
106
|
-
'order_book_stats': ((value['orderBookStats'] as Array<any>).map(OrderBookStatsToJSON)),
|
|
102
|
+
'order_book_stats': value['orderBookStats'] == null ? undefined : ((value['orderBookStats'] as Array<any>).map(OrderBookStatsToJSON)),
|
|
107
103
|
'daily_usd_volume': value['dailyUsdVolume'],
|
|
108
104
|
'daily_trades_count': value['dailyTradesCount'],
|
|
109
105
|
};
|
package/models/Funding.ts
CHANGED
|
@@ -24,35 +24,31 @@ export interface Funding {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof Funding
|
|
26
26
|
*/
|
|
27
|
-
timestamp
|
|
27
|
+
timestamp?: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof Funding
|
|
32
32
|
*/
|
|
33
|
-
value
|
|
33
|
+
value?: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof Funding
|
|
38
38
|
*/
|
|
39
|
-
rate
|
|
39
|
+
rate?: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof Funding
|
|
44
44
|
*/
|
|
45
|
-
direction
|
|
45
|
+
direction?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Check if a given object implements the Funding interface.
|
|
50
50
|
*/
|
|
51
51
|
export function instanceOfFunding(value: object): value is Funding {
|
|
52
|
-
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
53
|
-
if (!('value' in value) || value['value'] === undefined) return false;
|
|
54
|
-
if (!('rate' in value) || value['rate'] === undefined) return false;
|
|
55
|
-
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
56
52
|
return true;
|
|
57
53
|
}
|
|
58
54
|
|
|
@@ -66,10 +62,10 @@ export function FundingFromJSONTyped(json: any, ignoreDiscriminator: boolean): F
|
|
|
66
62
|
}
|
|
67
63
|
return {
|
|
68
64
|
|
|
69
|
-
'timestamp': json['timestamp'],
|
|
70
|
-
'value': json['value'],
|
|
71
|
-
'rate': json['rate'],
|
|
72
|
-
'direction': json['direction'],
|
|
65
|
+
'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
|
|
66
|
+
'value': json['value'] == null ? undefined : json['value'],
|
|
67
|
+
'rate': json['rate'] == null ? undefined : json['rate'],
|
|
68
|
+
'direction': json['direction'] == null ? undefined : json['direction'],
|
|
73
69
|
};
|
|
74
70
|
}
|
|
75
71
|
|