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