zklighter-perps 1.0.2 → 1.0.4
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/.circleci/config.yml +4 -4
- package/apis/TransactionApi.ts +34 -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/Txs.ts +4 -3
- package/models/ValidatorInfo.ts +6 -4
- package/openapi.json +535 -79
- package/package.json +1 -1
|
@@ -36,25 +36,28 @@ export interface Layer2BasicInfo {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof Layer2BasicInfo
|
|
38
38
|
*/
|
|
39
|
-
blockCommitted
|
|
39
|
+
blockCommitted: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
43
|
* @memberof Layer2BasicInfo
|
|
44
44
|
*/
|
|
45
|
-
blockVerified
|
|
45
|
+
blockVerified: number;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof Layer2BasicInfo
|
|
50
50
|
*/
|
|
51
|
-
totalTransactionCount
|
|
51
|
+
totalTransactionCount: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Check if a given object implements the Layer2BasicInfo interface.
|
|
56
56
|
*/
|
|
57
57
|
export function instanceOfLayer2BasicInfo(value: object): value is Layer2BasicInfo {
|
|
58
|
+
if (!('blockCommitted' in value) || value['blockCommitted'] === undefined) return false;
|
|
59
|
+
if (!('blockVerified' in value) || value['blockVerified'] === undefined) return false;
|
|
60
|
+
if (!('totalTransactionCount' in value) || value['totalTransactionCount'] === undefined) return false;
|
|
58
61
|
return true;
|
|
59
62
|
}
|
|
60
63
|
|
|
@@ -70,9 +73,9 @@ export function Layer2BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
70
73
|
|
|
71
74
|
'code': json['code'] == null ? undefined : json['code'],
|
|
72
75
|
'message': json['message'] == null ? undefined : json['message'],
|
|
73
|
-
'blockCommitted': json['block_committed']
|
|
74
|
-
'blockVerified': json['block_verified']
|
|
75
|
-
'totalTransactionCount': json['total_transaction_count']
|
|
76
|
+
'blockCommitted': json['block_committed'],
|
|
77
|
+
'blockVerified': json['block_verified'],
|
|
78
|
+
'totalTransactionCount': json['total_transaction_count'],
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
|
package/models/MainAccount.ts
CHANGED
|
@@ -36,25 +36,28 @@ export interface MainAccount {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof MainAccount
|
|
38
38
|
*/
|
|
39
|
-
index
|
|
39
|
+
index: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof MainAccount
|
|
44
44
|
*/
|
|
45
|
-
l1Address
|
|
45
|
+
l1Address: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof MainAccount
|
|
50
50
|
*/
|
|
51
|
-
status
|
|
51
|
+
status: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Check if a given object implements the MainAccount interface.
|
|
56
56
|
*/
|
|
57
57
|
export function instanceOfMainAccount(value: object): value is MainAccount {
|
|
58
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
59
|
+
if (!('l1Address' in value) || value['l1Address'] === undefined) return false;
|
|
60
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
58
61
|
return true;
|
|
59
62
|
}
|
|
60
63
|
|
|
@@ -70,9 +73,9 @@ export function MainAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
70
73
|
|
|
71
74
|
'code': json['code'] == null ? undefined : json['code'],
|
|
72
75
|
'message': json['message'] == null ? undefined : json['message'],
|
|
73
|
-
'index': json['index']
|
|
74
|
-
'l1Address': json['l1_address']
|
|
75
|
-
'status': json['status']
|
|
76
|
+
'index': json['index'],
|
|
77
|
+
'l1Address': json['l1_address'],
|
|
78
|
+
'status': json['status'],
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
|
package/models/MainAccounts.ts
CHANGED
|
@@ -43,19 +43,21 @@ export interface MainAccounts {
|
|
|
43
43
|
* @type {number}
|
|
44
44
|
* @memberof MainAccounts
|
|
45
45
|
*/
|
|
46
|
-
total
|
|
46
|
+
total: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {Array<MainAccount>}
|
|
50
50
|
* @memberof MainAccounts
|
|
51
51
|
*/
|
|
52
|
-
accounts
|
|
52
|
+
accounts: Array<MainAccount>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the MainAccounts interface.
|
|
57
57
|
*/
|
|
58
58
|
export function instanceOfMainAccounts(value: object): value is MainAccounts {
|
|
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 MainAccountsFromJSONTyped(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
|
-
'total': json['total']
|
|
75
|
-
'accounts':
|
|
76
|
+
'total': json['total'],
|
|
77
|
+
'accounts': ((json['accounts'] as Array<any>).map(MainAccountFromJSON)),
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -85,7 +87,7 @@ export function MainAccountsToJSON(value?: MainAccounts | 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(MainAccountToJSON)),
|
|
89
91
|
};
|
|
90
92
|
}
|
|
91
93
|
|
package/models/MarketInfo.ts
CHANGED
|
@@ -24,73 +24,84 @@ export interface MarketInfo {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof MarketInfo
|
|
26
26
|
*/
|
|
27
|
-
marketId
|
|
27
|
+
marketId: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof MarketInfo
|
|
32
32
|
*/
|
|
33
|
-
indexPrice
|
|
33
|
+
indexPrice: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof MarketInfo
|
|
38
38
|
*/
|
|
39
|
-
markPrice
|
|
39
|
+
markPrice: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof MarketInfo
|
|
44
44
|
*/
|
|
45
|
-
lastTradePrice
|
|
45
|
+
lastTradePrice: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof MarketInfo
|
|
50
50
|
*/
|
|
51
|
-
fundingRate
|
|
51
|
+
fundingRate: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
55
55
|
* @memberof MarketInfo
|
|
56
56
|
*/
|
|
57
|
-
fundingTimestamp
|
|
57
|
+
fundingTimestamp: number;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {number}
|
|
61
61
|
* @memberof MarketInfo
|
|
62
62
|
*/
|
|
63
|
-
dailyBaseTokenVolume
|
|
63
|
+
dailyBaseTokenVolume: number;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {number}
|
|
67
67
|
* @memberof MarketInfo
|
|
68
68
|
*/
|
|
69
|
-
dailyQuoteTokenVolume
|
|
69
|
+
dailyQuoteTokenVolume: number;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof MarketInfo
|
|
74
74
|
*/
|
|
75
|
-
dailyPriceLow
|
|
75
|
+
dailyPriceLow: number;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {number}
|
|
79
79
|
* @memberof MarketInfo
|
|
80
80
|
*/
|
|
81
|
-
dailyPriceHigh
|
|
81
|
+
dailyPriceHigh: number;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {number}
|
|
85
85
|
* @memberof MarketInfo
|
|
86
86
|
*/
|
|
87
|
-
dailyPriceChange
|
|
87
|
+
dailyPriceChange: number;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Check if a given object implements the MarketInfo interface.
|
|
92
92
|
*/
|
|
93
93
|
export function instanceOfMarketInfo(value: object): value is MarketInfo {
|
|
94
|
+
if (!('marketId' in value) || value['marketId'] === undefined) return false;
|
|
95
|
+
if (!('indexPrice' in value) || value['indexPrice'] === undefined) return false;
|
|
96
|
+
if (!('markPrice' in value) || value['markPrice'] === undefined) return false;
|
|
97
|
+
if (!('lastTradePrice' in value) || value['lastTradePrice'] === undefined) return false;
|
|
98
|
+
if (!('fundingRate' in value) || value['fundingRate'] === undefined) return false;
|
|
99
|
+
if (!('fundingTimestamp' in value) || value['fundingTimestamp'] === undefined) return false;
|
|
100
|
+
if (!('dailyBaseTokenVolume' in value) || value['dailyBaseTokenVolume'] === undefined) return false;
|
|
101
|
+
if (!('dailyQuoteTokenVolume' in value) || value['dailyQuoteTokenVolume'] === undefined) return false;
|
|
102
|
+
if (!('dailyPriceLow' in value) || value['dailyPriceLow'] === undefined) return false;
|
|
103
|
+
if (!('dailyPriceHigh' in value) || value['dailyPriceHigh'] === undefined) return false;
|
|
104
|
+
if (!('dailyPriceChange' in value) || value['dailyPriceChange'] === undefined) return false;
|
|
94
105
|
return true;
|
|
95
106
|
}
|
|
96
107
|
|
|
@@ -104,17 +115,17 @@ export function MarketInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
104
115
|
}
|
|
105
116
|
return {
|
|
106
117
|
|
|
107
|
-
'marketId': json['market_id']
|
|
108
|
-
'indexPrice': json['index_price']
|
|
109
|
-
'markPrice': json['mark_price']
|
|
110
|
-
'lastTradePrice': json['last_trade_price']
|
|
111
|
-
'fundingRate': json['funding_rate']
|
|
112
|
-
'fundingTimestamp': json['funding_timestamp']
|
|
113
|
-
'dailyBaseTokenVolume': json['daily_base_token_volume']
|
|
114
|
-
'dailyQuoteTokenVolume': json['daily_quote_token_volume']
|
|
115
|
-
'dailyPriceLow': json['daily_price_low']
|
|
116
|
-
'dailyPriceHigh': json['daily_price_high']
|
|
117
|
-
'dailyPriceChange': json['daily_price_change']
|
|
118
|
+
'marketId': json['market_id'],
|
|
119
|
+
'indexPrice': json['index_price'],
|
|
120
|
+
'markPrice': json['mark_price'],
|
|
121
|
+
'lastTradePrice': json['last_trade_price'],
|
|
122
|
+
'fundingRate': json['funding_rate'],
|
|
123
|
+
'fundingTimestamp': json['funding_timestamp'],
|
|
124
|
+
'dailyBaseTokenVolume': json['daily_base_token_volume'],
|
|
125
|
+
'dailyQuoteTokenVolume': json['daily_quote_token_volume'],
|
|
126
|
+
'dailyPriceLow': json['daily_price_low'],
|
|
127
|
+
'dailyPriceHigh': json['daily_price_high'],
|
|
128
|
+
'dailyPriceChange': json['daily_price_change'],
|
|
118
129
|
};
|
|
119
130
|
}
|
|
120
131
|
|
package/models/MarketSig.ts
CHANGED
|
@@ -36,31 +36,35 @@ export interface MarketSig {
|
|
|
36
36
|
* @type {boolean}
|
|
37
37
|
* @memberof MarketSig
|
|
38
38
|
*/
|
|
39
|
-
canBeFilled
|
|
39
|
+
canBeFilled: boolean;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {boolean}
|
|
43
43
|
* @memberof MarketSig
|
|
44
44
|
*/
|
|
45
|
-
isAsk
|
|
45
|
+
isAsk: boolean;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof MarketSig
|
|
50
50
|
*/
|
|
51
|
-
quoteAmount
|
|
51
|
+
quoteAmount: number;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof MarketSig
|
|
56
56
|
*/
|
|
57
|
-
signature
|
|
57
|
+
signature: string;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Check if a given object implements the MarketSig interface.
|
|
62
62
|
*/
|
|
63
63
|
export function instanceOfMarketSig(value: object): value is MarketSig {
|
|
64
|
+
if (!('canBeFilled' in value) || value['canBeFilled'] === undefined) return false;
|
|
65
|
+
if (!('isAsk' in value) || value['isAsk'] === undefined) return false;
|
|
66
|
+
if (!('quoteAmount' in value) || value['quoteAmount'] === undefined) return false;
|
|
67
|
+
if (!('signature' in value) || value['signature'] === undefined) return false;
|
|
64
68
|
return true;
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -76,10 +80,10 @@ export function MarketSigFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
76
80
|
|
|
77
81
|
'code': json['code'] == null ? undefined : json['code'],
|
|
78
82
|
'message': json['message'] == null ? undefined : json['message'],
|
|
79
|
-
'canBeFilled': json['can_be_filled']
|
|
80
|
-
'isAsk': json['is_ask']
|
|
81
|
-
'quoteAmount': json['quote_amount']
|
|
82
|
-
'signature': json['signature']
|
|
83
|
+
'canBeFilled': json['can_be_filled'],
|
|
84
|
+
'isAsk': json['is_ask'],
|
|
85
|
+
'quoteAmount': json['quote_amount'],
|
|
86
|
+
'signature': json['signature'],
|
|
83
87
|
};
|
|
84
88
|
}
|
|
85
89
|
|
package/models/NextNonce.ts
CHANGED
|
@@ -36,13 +36,14 @@ export interface NextNonce {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof NextNonce
|
|
38
38
|
*/
|
|
39
|
-
nonce
|
|
39
|
+
nonce: number;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Check if a given object implements the NextNonce interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfNextNonce(value: object): value is NextNonce {
|
|
46
|
+
if (!('nonce' in value) || value['nonce'] === undefined) return false;
|
|
46
47
|
return true;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -58,7 +59,7 @@ export function NextNonceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
58
59
|
|
|
59
60
|
'code': json['code'] == null ? undefined : json['code'],
|
|
60
61
|
'message': json['message'] == null ? undefined : json['message'],
|
|
61
|
-
'nonce': json['nonce']
|
|
62
|
+
'nonce': json['nonce'],
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
|
package/models/Order.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Order {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof Order
|
|
26
26
|
*/
|
|
27
|
-
marketIndex
|
|
27
|
+
marketIndex: number;
|
|
28
28
|
/**
|
|
29
29
|
* TODO: should we return this?
|
|
30
30
|
* @type {number}
|
|
@@ -36,91 +36,91 @@ export interface Order {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof Order
|
|
38
38
|
*/
|
|
39
|
-
ownerAccountIndex
|
|
39
|
+
ownerAccountIndex: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof Order
|
|
44
44
|
*/
|
|
45
|
-
initialBaseAmount
|
|
45
|
+
initialBaseAmount: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof Order
|
|
50
50
|
*/
|
|
51
|
-
remainingBaseAmount
|
|
51
|
+
remainingBaseAmount: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof Order
|
|
56
56
|
*/
|
|
57
|
-
filledBaseAmount
|
|
57
|
+
filledBaseAmount: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof Order
|
|
62
62
|
*/
|
|
63
|
-
filledQuoteAmount
|
|
63
|
+
filledQuoteAmount: string;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
67
67
|
* @memberof Order
|
|
68
68
|
*/
|
|
69
|
-
price
|
|
69
|
+
price: string;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof Order
|
|
74
74
|
*/
|
|
75
|
-
baseSize
|
|
75
|
+
baseSize: number;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {number}
|
|
79
79
|
* @memberof Order
|
|
80
80
|
*/
|
|
81
|
-
basePrice
|
|
81
|
+
basePrice: number;
|
|
82
82
|
/**
|
|
83
83
|
*
|
|
84
84
|
* @type {number}
|
|
85
85
|
* @memberof Order
|
|
86
86
|
*/
|
|
87
|
-
nonce
|
|
87
|
+
nonce: number;
|
|
88
88
|
/**
|
|
89
89
|
*
|
|
90
90
|
* @type {boolean}
|
|
91
91
|
* @memberof Order
|
|
92
92
|
*/
|
|
93
|
-
isAsk
|
|
93
|
+
isAsk: boolean;
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
96
|
* @type {string}
|
|
97
97
|
* @memberof Order
|
|
98
98
|
*/
|
|
99
|
-
side
|
|
99
|
+
side: string;
|
|
100
100
|
/**
|
|
101
101
|
*
|
|
102
102
|
* @type {string}
|
|
103
103
|
* @memberof Order
|
|
104
104
|
*/
|
|
105
|
-
type
|
|
105
|
+
type: OrderTypeEnum;
|
|
106
106
|
/**
|
|
107
107
|
*
|
|
108
108
|
* @type {string}
|
|
109
109
|
* @memberof Order
|
|
110
110
|
*/
|
|
111
|
-
status
|
|
111
|
+
status: OrderStatusEnum;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {number}
|
|
115
115
|
* @memberof Order
|
|
116
116
|
*/
|
|
117
|
-
blockHeight
|
|
117
|
+
blockHeight: number;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
120
|
* @type {number}
|
|
121
121
|
* @memberof Order
|
|
122
122
|
*/
|
|
123
|
-
timestamp
|
|
123
|
+
timestamp: number;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
|
|
@@ -148,6 +148,22 @@ export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnu
|
|
|
148
148
|
* Check if a given object implements the Order interface.
|
|
149
149
|
*/
|
|
150
150
|
export function instanceOfOrder(value: object): value is Order {
|
|
151
|
+
if (!('marketIndex' in value) || value['marketIndex'] === undefined) return false;
|
|
152
|
+
if (!('ownerAccountIndex' in value) || value['ownerAccountIndex'] === undefined) return false;
|
|
153
|
+
if (!('initialBaseAmount' in value) || value['initialBaseAmount'] === undefined) return false;
|
|
154
|
+
if (!('remainingBaseAmount' in value) || value['remainingBaseAmount'] === undefined) return false;
|
|
155
|
+
if (!('filledBaseAmount' in value) || value['filledBaseAmount'] === undefined) return false;
|
|
156
|
+
if (!('filledQuoteAmount' in value) || value['filledQuoteAmount'] === undefined) return false;
|
|
157
|
+
if (!('price' in value) || value['price'] === undefined) return false;
|
|
158
|
+
if (!('baseSize' in value) || value['baseSize'] === undefined) return false;
|
|
159
|
+
if (!('basePrice' in value) || value['basePrice'] === undefined) return false;
|
|
160
|
+
if (!('nonce' in value) || value['nonce'] === undefined) return false;
|
|
161
|
+
if (!('isAsk' in value) || value['isAsk'] === undefined) return false;
|
|
162
|
+
if (!('side' in value) || value['side'] === undefined) return false;
|
|
163
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
164
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
165
|
+
if (!('blockHeight' in value) || value['blockHeight'] === undefined) return false;
|
|
166
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
151
167
|
return true;
|
|
152
168
|
}
|
|
153
169
|
|
|
@@ -161,23 +177,23 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
161
177
|
}
|
|
162
178
|
return {
|
|
163
179
|
|
|
164
|
-
'marketIndex': json['market_index']
|
|
180
|
+
'marketIndex': json['market_index'],
|
|
165
181
|
'ownerMainAccountIndex': json['ownerMainAccountIndex'] == null ? undefined : json['ownerMainAccountIndex'],
|
|
166
|
-
'ownerAccountIndex': json['owner_account_index']
|
|
167
|
-
'initialBaseAmount': json['initial_base_amount']
|
|
168
|
-
'remainingBaseAmount': json['remaining_base_amount']
|
|
169
|
-
'filledBaseAmount': json['filled_base_amount']
|
|
170
|
-
'filledQuoteAmount': json['filled_quote_amount']
|
|
171
|
-
'price': json['price']
|
|
172
|
-
'baseSize': json['base_size']
|
|
173
|
-
'basePrice': json['base_price']
|
|
174
|
-
'nonce': json['nonce']
|
|
175
|
-
'isAsk': json['is_ask']
|
|
176
|
-
'side': json['side']
|
|
177
|
-
'type': json['type']
|
|
178
|
-
'status': json['status']
|
|
179
|
-
'blockHeight': json['block_height']
|
|
180
|
-
'timestamp': json['timestamp']
|
|
182
|
+
'ownerAccountIndex': json['owner_account_index'],
|
|
183
|
+
'initialBaseAmount': json['initial_base_amount'],
|
|
184
|
+
'remainingBaseAmount': json['remaining_base_amount'],
|
|
185
|
+
'filledBaseAmount': json['filled_base_amount'],
|
|
186
|
+
'filledQuoteAmount': json['filled_quote_amount'],
|
|
187
|
+
'price': json['price'],
|
|
188
|
+
'baseSize': json['base_size'],
|
|
189
|
+
'basePrice': json['base_price'],
|
|
190
|
+
'nonce': json['nonce'],
|
|
191
|
+
'isAsk': json['is_ask'],
|
|
192
|
+
'side': json['side'],
|
|
193
|
+
'type': json['type'],
|
|
194
|
+
'status': json['status'],
|
|
195
|
+
'blockHeight': json['block_height'],
|
|
196
|
+
'timestamp': json['timestamp'],
|
|
181
197
|
};
|
|
182
198
|
}
|
|
183
199
|
|
package/models/OrderBook.ts
CHANGED
|
@@ -24,61 +24,61 @@ export interface OrderBook {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof OrderBook
|
|
26
26
|
*/
|
|
27
|
-
symbol
|
|
27
|
+
symbol: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof OrderBook
|
|
32
32
|
*/
|
|
33
|
-
marketId
|
|
33
|
+
marketId: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof OrderBook
|
|
38
38
|
*/
|
|
39
|
-
status
|
|
39
|
+
status: OrderBookStatusEnum;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof OrderBook
|
|
44
44
|
*/
|
|
45
|
-
takerFee
|
|
45
|
+
takerFee: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof OrderBook
|
|
50
50
|
*/
|
|
51
|
-
makerFee
|
|
51
|
+
makerFee: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof OrderBook
|
|
56
56
|
*/
|
|
57
|
-
minBaseAmount
|
|
57
|
+
minBaseAmount: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {string}
|
|
61
61
|
* @memberof OrderBook
|
|
62
62
|
*/
|
|
63
|
-
minQuoteAmount
|
|
63
|
+
minQuoteAmount: string;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {number}
|
|
67
67
|
* @memberof OrderBook
|
|
68
68
|
*/
|
|
69
|
-
supportedSizeDecimals
|
|
69
|
+
supportedSizeDecimals: number;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof OrderBook
|
|
74
74
|
*/
|
|
75
|
-
supportedPriceDecimals
|
|
75
|
+
supportedPriceDecimals: number;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {number}
|
|
79
79
|
* @memberof OrderBook
|
|
80
80
|
*/
|
|
81
|
-
supportedQuoteDecimals
|
|
81
|
+
supportedQuoteDecimals: number;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
|
|
@@ -96,6 +96,16 @@ export type OrderBookStatusEnum = typeof OrderBookStatusEnum[keyof typeof OrderB
|
|
|
96
96
|
* Check if a given object implements the OrderBook interface.
|
|
97
97
|
*/
|
|
98
98
|
export function instanceOfOrderBook(value: object): value is OrderBook {
|
|
99
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
100
|
+
if (!('marketId' in value) || value['marketId'] === undefined) return false;
|
|
101
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
102
|
+
if (!('takerFee' in value) || value['takerFee'] === undefined) return false;
|
|
103
|
+
if (!('makerFee' in value) || value['makerFee'] === undefined) return false;
|
|
104
|
+
if (!('minBaseAmount' in value) || value['minBaseAmount'] === undefined) return false;
|
|
105
|
+
if (!('minQuoteAmount' in value) || value['minQuoteAmount'] === undefined) return false;
|
|
106
|
+
if (!('supportedSizeDecimals' in value) || value['supportedSizeDecimals'] === undefined) return false;
|
|
107
|
+
if (!('supportedPriceDecimals' in value) || value['supportedPriceDecimals'] === undefined) return false;
|
|
108
|
+
if (!('supportedQuoteDecimals' in value) || value['supportedQuoteDecimals'] === undefined) return false;
|
|
99
109
|
return true;
|
|
100
110
|
}
|
|
101
111
|
|
|
@@ -109,16 +119,16 @@ export function OrderBookFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
109
119
|
}
|
|
110
120
|
return {
|
|
111
121
|
|
|
112
|
-
'symbol': json['symbol']
|
|
113
|
-
'marketId': json['market_id']
|
|
114
|
-
'status': json['status']
|
|
115
|
-
'takerFee': json['taker_fee']
|
|
116
|
-
'makerFee': json['maker_fee']
|
|
117
|
-
'minBaseAmount': json['min_base_amount']
|
|
118
|
-
'minQuoteAmount': json['min_quote_amount']
|
|
119
|
-
'supportedSizeDecimals': json['supported_size_decimals']
|
|
120
|
-
'supportedPriceDecimals': json['supported_price_decimals']
|
|
121
|
-
'supportedQuoteDecimals': json['supported_quote_decimals']
|
|
122
|
+
'symbol': json['symbol'],
|
|
123
|
+
'marketId': json['market_id'],
|
|
124
|
+
'status': json['status'],
|
|
125
|
+
'takerFee': json['taker_fee'],
|
|
126
|
+
'makerFee': json['maker_fee'],
|
|
127
|
+
'minBaseAmount': json['min_base_amount'],
|
|
128
|
+
'minQuoteAmount': json['min_quote_amount'],
|
|
129
|
+
'supportedSizeDecimals': json['supported_size_decimals'],
|
|
130
|
+
'supportedPriceDecimals': json['supported_price_decimals'],
|
|
131
|
+
'supportedQuoteDecimals': json['supported_quote_decimals'],
|
|
122
132
|
};
|
|
123
133
|
}
|
|
124
134
|
|