zklighter-perps 1.0.0

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.
Files changed (103) hide show
  1. package/.circleci/config.yml +86 -0
  2. package/.openapi-generator/FILES +95 -0
  3. package/.openapi-generator/VERSION +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/apis/AccountApi.ts +454 -0
  6. package/apis/BlockApi.ts +178 -0
  7. package/apis/CandlestickApi.ts +231 -0
  8. package/apis/InfoApi.ts +197 -0
  9. package/apis/OrderApi.ts +607 -0
  10. package/apis/RelayerApi.ts +95 -0
  11. package/apis/RootApi.ts +56 -0
  12. package/apis/TransactionApi.ts +608 -0
  13. package/apis/WsApi.ts +82 -0
  14. package/apis/index.ts +11 -0
  15. package/config.yaml +5 -0
  16. package/index.ts +5 -0
  17. package/models/AccountMarketStats.ts +100 -0
  18. package/models/AccountPnL.ts +91 -0
  19. package/models/AccountPosition.ts +140 -0
  20. package/models/AccountStats.ts +92 -0
  21. package/models/Block.ts +163 -0
  22. package/models/Blocks.ts +91 -0
  23. package/models/Candlestick.ts +108 -0
  24. package/models/Candlesticks.ts +91 -0
  25. package/models/ContractAddress.ts +68 -0
  26. package/models/CurrentHeight.ts +76 -0
  27. package/models/Cursor.ts +60 -0
  28. package/models/DetailedAccount.ts +169 -0
  29. package/models/DetailedAccounts.ts +91 -0
  30. package/models/EnrichedTx.ts +204 -0
  31. package/models/ExchangeStats.ts +107 -0
  32. package/models/Funding.ts +84 -0
  33. package/models/Fundings.ts +91 -0
  34. package/models/L1ProviderInfo.ts +84 -0
  35. package/models/Layer1BasicInfo.ts +143 -0
  36. package/models/Layer2BasicInfo.ts +92 -0
  37. package/models/MainAccount.ts +92 -0
  38. package/models/MainAccounts.ts +91 -0
  39. package/models/MarketInfo.ts +140 -0
  40. package/models/MarketSig.ts +100 -0
  41. package/models/NextNonce.ts +76 -0
  42. package/models/Order.ts +209 -0
  43. package/models/OrderBook.ts +143 -0
  44. package/models/OrderBookDepth.ts +99 -0
  45. package/models/OrderBookDetail.ts +287 -0
  46. package/models/OrderBookDetails.ts +83 -0
  47. package/models/OrderBookOrders.ts +107 -0
  48. package/models/OrderBookStats.ts +100 -0
  49. package/models/OrderBooks.ts +83 -0
  50. package/models/Orders.ts +91 -0
  51. package/models/Permission.ts +76 -0
  52. package/models/PnLEntry.ts +68 -0
  53. package/models/PriceLevel.ts +68 -0
  54. package/models/ReqDoFaucet.ts +60 -0
  55. package/models/ReqGetAccount.ts +79 -0
  56. package/models/ReqGetAccountActiveOrders.ts +76 -0
  57. package/models/ReqGetAccountByL1Address.ts +60 -0
  58. package/models/ReqGetAccountInactiveOrders.ts +111 -0
  59. package/models/ReqGetAccountOrders.ts +84 -0
  60. package/models/ReqGetAccountPendingTxs.ts +87 -0
  61. package/models/ReqGetAccountPnL.ts +124 -0
  62. package/models/ReqGetAccountTxs.ts +103 -0
  63. package/models/ReqGetBlock.ts +79 -0
  64. package/models/ReqGetBlockTxs.ts +79 -0
  65. package/models/ReqGetByAccount.ts +79 -0
  66. package/models/ReqGetCandlesticks.ts +107 -0
  67. package/models/ReqGetFundings.ts +102 -0
  68. package/models/ReqGetL1Tx.ts +60 -0
  69. package/models/ReqGetMarketSig.ts +76 -0
  70. package/models/ReqGetNextNonce.ts +68 -0
  71. package/models/ReqGetOrderBookDetails.ts +79 -0
  72. package/models/ReqGetOrderBookOrders.ts +68 -0
  73. package/models/ReqGetOrderBooks.ts +79 -0
  74. package/models/ReqGetPermission.ts +87 -0
  75. package/models/ReqGetRangeWithCursor.ts +68 -0
  76. package/models/ReqGetRangeWithIndex.ts +68 -0
  77. package/models/ReqGetRangeWithIndexSortable.ts +87 -0
  78. package/models/ReqGetRecentTrades.ts +68 -0
  79. package/models/ReqGetRollbacks.ts +76 -0
  80. package/models/ReqGetSubAccount.ts +87 -0
  81. package/models/ReqGetTrades.ts +104 -0
  82. package/models/ReqGetTx.ts +79 -0
  83. package/models/ReqSearch.ts +60 -0
  84. package/models/ResultCode.ts +68 -0
  85. package/models/Rollback.ts +84 -0
  86. package/models/Rollbacks.ts +91 -0
  87. package/models/Search.ts +76 -0
  88. package/models/SignBody.ts +76 -0
  89. package/models/SimpleOrder.ts +100 -0
  90. package/models/Status.ts +68 -0
  91. package/models/SubAccount.ts +116 -0
  92. package/models/SubAccounts.ts +107 -0
  93. package/models/Trade.ts +148 -0
  94. package/models/Trades.ts +83 -0
  95. package/models/Tx.ts +164 -0
  96. package/models/TxHash.ts +76 -0
  97. package/models/Txs.ts +83 -0
  98. package/models/ValidatorInfo.ts +68 -0
  99. package/models/index.ts +84 -0
  100. package/openapi-generator-cli.jar +0 -0
  101. package/openapi.json +3934 -0
  102. package/package.json +23 -0
  103. package/runtime.ts +426 -0
@@ -0,0 +1,143 @@
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 { ValidatorInfo } from './ValidatorInfo';
17
+ import {
18
+ ValidatorInfoFromJSON,
19
+ ValidatorInfoFromJSONTyped,
20
+ ValidatorInfoToJSON,
21
+ } from './ValidatorInfo';
22
+ import type { L1ProviderInfo } from './L1ProviderInfo';
23
+ import {
24
+ L1ProviderInfoFromJSON,
25
+ L1ProviderInfoFromJSONTyped,
26
+ L1ProviderInfoToJSON,
27
+ } from './L1ProviderInfo';
28
+ import type { ContractAddress } from './ContractAddress';
29
+ import {
30
+ ContractAddressFromJSON,
31
+ ContractAddressFromJSONTyped,
32
+ ContractAddressToJSON,
33
+ } from './ContractAddress';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface Layer1BasicInfo
39
+ */
40
+ export interface Layer1BasicInfo {
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof Layer1BasicInfo
45
+ */
46
+ code?: number;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof Layer1BasicInfo
51
+ */
52
+ message?: string;
53
+ /**
54
+ *
55
+ * @type {Array<L1ProviderInfo>}
56
+ * @memberof Layer1BasicInfo
57
+ */
58
+ l1Providers?: Array<L1ProviderInfo>;
59
+ /**
60
+ *
61
+ * @type {boolean}
62
+ * @memberof Layer1BasicInfo
63
+ */
64
+ l1ProvidersHealth?: boolean;
65
+ /**
66
+ *
67
+ * @type {Array<ValidatorInfo>}
68
+ * @memberof Layer1BasicInfo
69
+ */
70
+ validatorInfo?: Array<ValidatorInfo>;
71
+ /**
72
+ *
73
+ * @type {Array<ContractAddress>}
74
+ * @memberof Layer1BasicInfo
75
+ */
76
+ contractAddresses?: Array<ContractAddress>;
77
+ /**
78
+ *
79
+ * @type {number}
80
+ * @memberof Layer1BasicInfo
81
+ */
82
+ latestL1GenericBlock?: number;
83
+ /**
84
+ *
85
+ * @type {number}
86
+ * @memberof Layer1BasicInfo
87
+ */
88
+ latestL1GovernanceBlock?: number;
89
+ /**
90
+ *
91
+ * @type {number}
92
+ * @memberof Layer1BasicInfo
93
+ */
94
+ latestL1DesertBlock?: number;
95
+ }
96
+
97
+ /**
98
+ * Check if a given object implements the Layer1BasicInfo interface.
99
+ */
100
+ export function instanceOfLayer1BasicInfo(value: object): value is Layer1BasicInfo {
101
+ return true;
102
+ }
103
+
104
+ export function Layer1BasicInfoFromJSON(json: any): Layer1BasicInfo {
105
+ return Layer1BasicInfoFromJSONTyped(json, false);
106
+ }
107
+
108
+ export function Layer1BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Layer1BasicInfo {
109
+ if (json == null) {
110
+ return json;
111
+ }
112
+ return {
113
+
114
+ 'code': json['code'] == null ? undefined : json['code'],
115
+ 'message': json['message'] == null ? undefined : json['message'],
116
+ 'l1Providers': json['l1_providers'] == null ? undefined : ((json['l1_providers'] as Array<any>).map(L1ProviderInfoFromJSON)),
117
+ 'l1ProvidersHealth': json['l1_providers_health'] == null ? undefined : json['l1_providers_health'],
118
+ 'validatorInfo': json['validator_Info'] == null ? undefined : ((json['validator_Info'] as Array<any>).map(ValidatorInfoFromJSON)),
119
+ 'contractAddresses': json['contract_addresses'] == null ? undefined : ((json['contract_addresses'] as Array<any>).map(ContractAddressFromJSON)),
120
+ 'latestL1GenericBlock': json['latest_l1_generic_block'] == null ? undefined : json['latest_l1_generic_block'],
121
+ 'latestL1GovernanceBlock': json['latest_l1_governance_block'] == null ? undefined : json['latest_l1_governance_block'],
122
+ 'latestL1DesertBlock': json['latest_l1_desert_block'] == null ? undefined : json['latest_l1_desert_block'],
123
+ };
124
+ }
125
+
126
+ export function Layer1BasicInfoToJSON(value?: Layer1BasicInfo | null): any {
127
+ if (value == null) {
128
+ return value;
129
+ }
130
+ return {
131
+
132
+ 'code': value['code'],
133
+ 'message': value['message'],
134
+ 'l1_providers': value['l1Providers'] == null ? undefined : ((value['l1Providers'] as Array<any>).map(L1ProviderInfoToJSON)),
135
+ 'l1_providers_health': value['l1ProvidersHealth'],
136
+ 'validator_Info': value['validatorInfo'] == null ? undefined : ((value['validatorInfo'] as Array<any>).map(ValidatorInfoToJSON)),
137
+ 'contract_addresses': value['contractAddresses'] == null ? undefined : ((value['contractAddresses'] as Array<any>).map(ContractAddressToJSON)),
138
+ 'latest_l1_generic_block': value['latestL1GenericBlock'],
139
+ 'latest_l1_governance_block': value['latestL1GovernanceBlock'],
140
+ 'latest_l1_desert_block': value['latestL1DesertBlock'],
141
+ };
142
+ }
143
+
@@ -0,0 +1,92 @@
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 Layer2BasicInfo
20
+ */
21
+ export interface Layer2BasicInfo {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof Layer2BasicInfo
26
+ */
27
+ code?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof Layer2BasicInfo
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof Layer2BasicInfo
38
+ */
39
+ blockCommitted?: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof Layer2BasicInfo
44
+ */
45
+ blockVerified?: number;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof Layer2BasicInfo
50
+ */
51
+ totalTransactionCount?: number;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the Layer2BasicInfo interface.
56
+ */
57
+ export function instanceOfLayer2BasicInfo(value: object): value is Layer2BasicInfo {
58
+ return true;
59
+ }
60
+
61
+ export function Layer2BasicInfoFromJSON(json: any): Layer2BasicInfo {
62
+ return Layer2BasicInfoFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function Layer2BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Layer2BasicInfo {
66
+ if (json == null) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'code': json['code'] == null ? undefined : json['code'],
72
+ 'message': json['message'] == null ? undefined : json['message'],
73
+ 'blockCommitted': json['block_committed'] == null ? undefined : json['block_committed'],
74
+ 'blockVerified': json['block_verified'] == null ? undefined : json['block_verified'],
75
+ 'totalTransactionCount': json['total_transaction_count'] == null ? undefined : json['total_transaction_count'],
76
+ };
77
+ }
78
+
79
+ export function Layer2BasicInfoToJSON(value?: Layer2BasicInfo | null): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+ return {
84
+
85
+ 'code': value['code'],
86
+ 'message': value['message'],
87
+ 'block_committed': value['blockCommitted'],
88
+ 'block_verified': value['blockVerified'],
89
+ 'total_transaction_count': value['totalTransactionCount'],
90
+ };
91
+ }
92
+
@@ -0,0 +1,92 @@
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 MainAccount
20
+ */
21
+ export interface MainAccount {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof MainAccount
26
+ */
27
+ code?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof MainAccount
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof MainAccount
38
+ */
39
+ index?: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof MainAccount
44
+ */
45
+ l1Address?: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof MainAccount
50
+ */
51
+ status?: number;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the MainAccount interface.
56
+ */
57
+ export function instanceOfMainAccount(value: object): value is MainAccount {
58
+ return true;
59
+ }
60
+
61
+ export function MainAccountFromJSON(json: any): MainAccount {
62
+ return MainAccountFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function MainAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): MainAccount {
66
+ if (json == null) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'code': json['code'] == null ? undefined : json['code'],
72
+ 'message': json['message'] == null ? undefined : json['message'],
73
+ 'index': json['index'] == null ? undefined : json['index'],
74
+ 'l1Address': json['l1_address'] == null ? undefined : json['l1_address'],
75
+ 'status': json['status'] == null ? undefined : json['status'],
76
+ };
77
+ }
78
+
79
+ export function MainAccountToJSON(value?: MainAccount | null): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+ return {
84
+
85
+ 'code': value['code'],
86
+ 'message': value['message'],
87
+ 'index': value['index'],
88
+ 'l1_address': value['l1Address'],
89
+ 'status': value['status'],
90
+ };
91
+ }
92
+
@@ -0,0 +1,91 @@
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 { MainAccount } from './MainAccount';
17
+ import {
18
+ MainAccountFromJSON,
19
+ MainAccountFromJSONTyped,
20
+ MainAccountToJSON,
21
+ } from './MainAccount';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface MainAccounts
27
+ */
28
+ export interface MainAccounts {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof MainAccounts
33
+ */
34
+ code?: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof MainAccounts
39
+ */
40
+ message?: string;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof MainAccounts
45
+ */
46
+ total?: number;
47
+ /**
48
+ *
49
+ * @type {Array<MainAccount>}
50
+ * @memberof MainAccounts
51
+ */
52
+ accounts?: Array<MainAccount>;
53
+ }
54
+
55
+ /**
56
+ * Check if a given object implements the MainAccounts interface.
57
+ */
58
+ export function instanceOfMainAccounts(value: object): value is MainAccounts {
59
+ return true;
60
+ }
61
+
62
+ export function MainAccountsFromJSON(json: any): MainAccounts {
63
+ return MainAccountsFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function MainAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MainAccounts {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'code': json['code'] == null ? undefined : json['code'],
73
+ 'message': json['message'] == null ? undefined : json['message'],
74
+ 'total': json['total'] == null ? undefined : json['total'],
75
+ 'accounts': json['accounts'] == null ? undefined : ((json['accounts'] as Array<any>).map(MainAccountFromJSON)),
76
+ };
77
+ }
78
+
79
+ export function MainAccountsToJSON(value?: MainAccounts | null): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+ return {
84
+
85
+ 'code': value['code'],
86
+ 'message': value['message'],
87
+ 'total': value['total'],
88
+ 'accounts': value['accounts'] == null ? undefined : ((value['accounts'] as Array<any>).map(MainAccountToJSON)),
89
+ };
90
+ }
91
+
@@ -0,0 +1,140 @@
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 MarketInfo
20
+ */
21
+ export interface MarketInfo {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof MarketInfo
26
+ */
27
+ marketId?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof MarketInfo
32
+ */
33
+ indexPrice?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof MarketInfo
38
+ */
39
+ markPrice?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof MarketInfo
44
+ */
45
+ lastTradePrice?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof MarketInfo
50
+ */
51
+ fundingRate?: string;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof MarketInfo
56
+ */
57
+ fundingTimestamp?: number;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof MarketInfo
62
+ */
63
+ dailyBaseTokenVolume?: number;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof MarketInfo
68
+ */
69
+ dailyQuoteTokenVolume?: number;
70
+ /**
71
+ *
72
+ * @type {number}
73
+ * @memberof MarketInfo
74
+ */
75
+ dailyPriceLow?: number;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof MarketInfo
80
+ */
81
+ dailyPriceHigh?: number;
82
+ /**
83
+ *
84
+ * @type {number}
85
+ * @memberof MarketInfo
86
+ */
87
+ dailyPriceChange?: number;
88
+ }
89
+
90
+ /**
91
+ * Check if a given object implements the MarketInfo interface.
92
+ */
93
+ export function instanceOfMarketInfo(value: object): value is MarketInfo {
94
+ return true;
95
+ }
96
+
97
+ export function MarketInfoFromJSON(json: any): MarketInfo {
98
+ return MarketInfoFromJSONTyped(json, false);
99
+ }
100
+
101
+ export function MarketInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketInfo {
102
+ if (json == null) {
103
+ return json;
104
+ }
105
+ return {
106
+
107
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
108
+ 'indexPrice': json['index_price'] == null ? undefined : json['index_price'],
109
+ 'markPrice': json['mark_price'] == null ? undefined : json['mark_price'],
110
+ 'lastTradePrice': json['last_trade_price'] == null ? undefined : json['last_trade_price'],
111
+ 'fundingRate': json['funding_rate'] == null ? undefined : json['funding_rate'],
112
+ 'fundingTimestamp': json['funding_timestamp'] == null ? undefined : json['funding_timestamp'],
113
+ 'dailyBaseTokenVolume': json['daily_base_token_volume'] == null ? undefined : json['daily_base_token_volume'],
114
+ 'dailyQuoteTokenVolume': json['daily_quote_token_volume'] == null ? undefined : json['daily_quote_token_volume'],
115
+ 'dailyPriceLow': json['daily_price_low'] == null ? undefined : json['daily_price_low'],
116
+ 'dailyPriceHigh': json['daily_price_high'] == null ? undefined : json['daily_price_high'],
117
+ 'dailyPriceChange': json['daily_price_change'] == null ? undefined : json['daily_price_change'],
118
+ };
119
+ }
120
+
121
+ export function MarketInfoToJSON(value?: MarketInfo | null): any {
122
+ if (value == null) {
123
+ return value;
124
+ }
125
+ return {
126
+
127
+ 'market_id': value['marketId'],
128
+ 'index_price': value['indexPrice'],
129
+ 'mark_price': value['markPrice'],
130
+ 'last_trade_price': value['lastTradePrice'],
131
+ 'funding_rate': value['fundingRate'],
132
+ 'funding_timestamp': value['fundingTimestamp'],
133
+ 'daily_base_token_volume': value['dailyBaseTokenVolume'],
134
+ 'daily_quote_token_volume': value['dailyQuoteTokenVolume'],
135
+ 'daily_price_low': value['dailyPriceLow'],
136
+ 'daily_price_high': value['dailyPriceHigh'],
137
+ 'daily_price_change': value['dailyPriceChange'],
138
+ };
139
+ }
140
+
@@ -0,0 +1,100 @@
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 MarketSig
20
+ */
21
+ export interface MarketSig {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof MarketSig
26
+ */
27
+ code?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof MarketSig
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof MarketSig
38
+ */
39
+ canBeFilled?: boolean;
40
+ /**
41
+ *
42
+ * @type {boolean}
43
+ * @memberof MarketSig
44
+ */
45
+ isAsk?: boolean;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof MarketSig
50
+ */
51
+ quoteAmount?: number;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof MarketSig
56
+ */
57
+ signature?: string;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the MarketSig interface.
62
+ */
63
+ export function instanceOfMarketSig(value: object): value is MarketSig {
64
+ return true;
65
+ }
66
+
67
+ export function MarketSigFromJSON(json: any): MarketSig {
68
+ return MarketSigFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function MarketSigFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketSig {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'code': json['code'] == null ? undefined : json['code'],
78
+ 'message': json['message'] == null ? undefined : json['message'],
79
+ 'canBeFilled': json['can_be_filled'] == null ? undefined : json['can_be_filled'],
80
+ 'isAsk': json['is_ask'] == null ? undefined : json['is_ask'],
81
+ 'quoteAmount': json['quote_amount'] == null ? undefined : json['quote_amount'],
82
+ 'signature': json['signature'] == null ? undefined : json['signature'],
83
+ };
84
+ }
85
+
86
+ export function MarketSigToJSON(value?: MarketSig | null): any {
87
+ if (value == null) {
88
+ return value;
89
+ }
90
+ return {
91
+
92
+ 'code': value['code'],
93
+ 'message': value['message'],
94
+ 'can_be_filled': value['canBeFilled'],
95
+ 'is_ask': value['isAsk'],
96
+ 'quote_amount': value['quoteAmount'],
97
+ 'signature': value['signature'],
98
+ };
99
+ }
100
+