nado-protocol 0.2.6__tar.gz → 0.2.7__tar.gz
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.
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/PKG-INFO +1 -1
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/rewards/execute.py +6 -45
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/subaccount/query.py +0 -26
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/indexer_client/query.py +5 -102
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/indexer_client/types/__init__.py +1 -12
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/indexer_client/types/query.py +28 -208
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/pyproject.toml +1 -1
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/README.md +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/base.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/market/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/market/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/market/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/perp/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/perp/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/rewards/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/rewards/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/spot/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/spot/base.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/spot/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/spot/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/subaccount/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/subaccount/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/context.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/Endpoint.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/FQuerier.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IAirdrop.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IClearinghouse.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IEndpoint.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IFoundationRewardsAirdrop.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IPerpEngine.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IProductEngine.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/ISpotEngine.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IStaking.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/MockERC20.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/deployments/deployment.mainnet.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/deployments/deployment.testing.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/deployments/deployment.testnet.json +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/eip712/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/eip712/domain.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/eip712/sign.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/eip712/types.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/loader.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/types.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/types/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/types/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/types/models.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/types/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/engine_client/types/stream.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/indexer_client/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/indexer_client/types/models.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/types/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/types/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/types/models.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/trigger_client/types/query.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/__init__.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/backend.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/balance.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/bytes32.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/enum.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/exceptions.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/execute.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/expiration.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/interest.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/margin_manager.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/math.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/model.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/nonce.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/order.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/subaccount.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/time.py +0 -0
- {nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/utils/twap.py +0 -0
|
@@ -78,54 +78,15 @@ class RewardsExecuteAPI(NadoBaseAPI):
|
|
|
78
78
|
def _get_claim_tokens_contract_params(
|
|
79
79
|
self, params: ClaimTokensParams, signer: LocalAccount
|
|
80
80
|
) -> ClaimTokensContractParams:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
total_claimable_amount = int(epoch_merkle_proofs.total_amount)
|
|
85
|
-
if params.amount is not None:
|
|
86
|
-
amount_to_claim = params.amount
|
|
87
|
-
else:
|
|
88
|
-
assert self.context.contracts.airdrop is not None
|
|
89
|
-
amount_claimed = self.context.contracts.airdrop.functions.getClaimed(
|
|
90
|
-
signer.address
|
|
91
|
-
).call()
|
|
92
|
-
amount_to_claim = total_claimable_amount - amount_claimed[params.epoch]
|
|
93
|
-
return ClaimTokensContractParams(
|
|
94
|
-
epoch=params.epoch,
|
|
95
|
-
amount_to_claim=amount_to_claim,
|
|
96
|
-
total_claimable_amount=total_claimable_amount,
|
|
97
|
-
merkle_proof=epoch_merkle_proofs.proof,
|
|
81
|
+
raise NotImplementedError(
|
|
82
|
+
"Token merkle proofs endpoint has been removed from the indexer. "
|
|
83
|
+
"This functionality is no longer available."
|
|
98
84
|
)
|
|
99
85
|
|
|
100
86
|
def _get_claim_foundation_rewards_contract_params(
|
|
101
87
|
self, signer: LocalAccount
|
|
102
88
|
) -> ClaimFoundationRewardsContractParams:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
signer.address
|
|
107
|
-
).call()
|
|
89
|
+
raise NotImplementedError(
|
|
90
|
+
"Foundation rewards merkle proofs endpoint has been removed from the indexer. "
|
|
91
|
+
"This functionality is no longer available."
|
|
108
92
|
)
|
|
109
|
-
merkle_proofs = (
|
|
110
|
-
self.context.indexer_client.get_foundation_rewards_merkle_proofs(
|
|
111
|
-
signer.address
|
|
112
|
-
)
|
|
113
|
-
)
|
|
114
|
-
claim_proofs = []
|
|
115
|
-
|
|
116
|
-
for idx, proof in enumerate(merkle_proofs.merkle_proofs):
|
|
117
|
-
if idx == 0:
|
|
118
|
-
# week 0 is invalid
|
|
119
|
-
continue
|
|
120
|
-
|
|
121
|
-
total_amount = int(proof.total_amount)
|
|
122
|
-
|
|
123
|
-
# There's no partial claim, so find weeks where there's a claimable amount and amt claimed is zero
|
|
124
|
-
if total_amount > 0 and int(claimed[idx]) == 0:
|
|
125
|
-
claim_proofs.append(
|
|
126
|
-
ClaimFoundationRewardsProofStruct(
|
|
127
|
-
totalAmount=total_amount, week=idx, proof=proof.proof
|
|
128
|
-
)
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
return ClaimFoundationRewardsContractParams(claim_proofs=claim_proofs)
|
|
@@ -7,10 +7,8 @@ from nado_protocol.engine_client.types.query import (
|
|
|
7
7
|
)
|
|
8
8
|
from nado_protocol.indexer_client.types.query import (
|
|
9
9
|
IndexerLinkedSignerRateLimitData,
|
|
10
|
-
IndexerReferralCodeData,
|
|
11
10
|
IndexerSubaccountsData,
|
|
12
11
|
IndexerSubaccountsParams,
|
|
13
|
-
IndexerTokenRewardsData,
|
|
14
12
|
IndexerInterestAndFundingParams,
|
|
15
13
|
IndexerInterestAndFundingData,
|
|
16
14
|
)
|
|
@@ -57,18 +55,6 @@ class SubaccountQueryAPI(NadoBaseAPI):
|
|
|
57
55
|
"""
|
|
58
56
|
return self.context.engine_client.get_fee_rates(subaccount)
|
|
59
57
|
|
|
60
|
-
def get_subaccount_token_rewards(self, address: str) -> IndexerTokenRewardsData:
|
|
61
|
-
"""
|
|
62
|
-
Query the token rewards accumulated per epoch for a specified wallet from the indexer.
|
|
63
|
-
|
|
64
|
-
Args:
|
|
65
|
-
address (str): Wallet address to be queried.
|
|
66
|
-
|
|
67
|
-
Returns:
|
|
68
|
-
IndexerTokenRewardsData: A data class object containing detailed information about the accrued token rewards.
|
|
69
|
-
"""
|
|
70
|
-
return self.context.indexer_client.get_token_rewards(address)
|
|
71
|
-
|
|
72
58
|
def get_subaccount_linked_signer_rate_limits(
|
|
73
59
|
self, subaccount: str
|
|
74
60
|
) -> IndexerLinkedSignerRateLimitData:
|
|
@@ -83,18 +69,6 @@ class SubaccountQueryAPI(NadoBaseAPI):
|
|
|
83
69
|
"""
|
|
84
70
|
return self.context.indexer_client.get_linked_signer_rate_limits(subaccount)
|
|
85
71
|
|
|
86
|
-
def get_referral_code(self, subaccount: str) -> IndexerReferralCodeData:
|
|
87
|
-
"""
|
|
88
|
-
Query the referral code for the specified wallet from the indexer.
|
|
89
|
-
|
|
90
|
-
Args:
|
|
91
|
-
subaccount (str): Unique identifier for the subaccount.
|
|
92
|
-
|
|
93
|
-
Returns:
|
|
94
|
-
IndexerReferralCodeData: A data class object containing the wallet's referral code.
|
|
95
|
-
"""
|
|
96
|
-
return self.context.indexer_client.get_referral_code(subaccount)
|
|
97
|
-
|
|
98
72
|
def get_subaccounts(
|
|
99
73
|
self,
|
|
100
74
|
address: Optional[str] = None,
|
|
@@ -14,8 +14,6 @@ from nado_protocol.indexer_client.types.query import (
|
|
|
14
14
|
IndexerFundingRatesData,
|
|
15
15
|
IndexerHistoricalOrdersByDigestParams,
|
|
16
16
|
IndexerHistoricalOrdersData,
|
|
17
|
-
IndexerReferralCodeData,
|
|
18
|
-
IndexerReferralCodeParams,
|
|
19
17
|
IndexerSubaccountHistoricalOrdersParams,
|
|
20
18
|
IndexerLinkedSignerRateLimitData,
|
|
21
19
|
IndexerLinkedSignerRateLimitParams,
|
|
@@ -23,8 +21,6 @@ from nado_protocol.indexer_client.types.query import (
|
|
|
23
21
|
IndexerLiquidationFeedParams,
|
|
24
22
|
IndexerMarketSnapshotsData,
|
|
25
23
|
IndexerMarketSnapshotsParams,
|
|
26
|
-
IndexerMakerStatisticsData,
|
|
27
|
-
IndexerMakerStatisticsParams,
|
|
28
24
|
IndexerMatchesParams,
|
|
29
25
|
IndexerMatchesData,
|
|
30
26
|
IndexerOraclePricesData,
|
|
@@ -36,17 +32,10 @@ from nado_protocol.indexer_client.types.query import (
|
|
|
36
32
|
IndexerProductSnapshotsParams,
|
|
37
33
|
IndexerRequest,
|
|
38
34
|
IndexerResponse,
|
|
39
|
-
IndexerSubaccountSummaryParams,
|
|
40
|
-
IndexerSubaccountSummaryData,
|
|
41
35
|
IndexerSubaccountsData,
|
|
42
36
|
IndexerSubaccountsParams,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
IndexerUsdcPriceParams,
|
|
46
|
-
IndexerUsdcPriceData,
|
|
47
|
-
IndexerTokenMerkleProofsParams,
|
|
48
|
-
IndexerFoundationRewardsMerkleProofsParams,
|
|
49
|
-
IndexerMerkleProofsData,
|
|
37
|
+
IndexerQuotePriceParams,
|
|
38
|
+
IndexerQuotePriceData,
|
|
50
39
|
IndexerInterestAndFundingParams,
|
|
51
40
|
IndexerInterestAndFundingData,
|
|
52
41
|
IndexerAccountSnapshotsParams,
|
|
@@ -186,29 +175,6 @@ class IndexerQueryClient:
|
|
|
186
175
|
self.query(IndexerEventsParams.parse_obj(params)).data, IndexerEventsData
|
|
187
176
|
)
|
|
188
177
|
|
|
189
|
-
def get_subaccount_summary(
|
|
190
|
-
self, subaccount: str, timestamp: Optional[int] = None
|
|
191
|
-
) -> IndexerSubaccountSummaryData:
|
|
192
|
-
"""
|
|
193
|
-
Retrieves a summary of a specified subaccount at a certain timestamp.
|
|
194
|
-
|
|
195
|
-
Args:
|
|
196
|
-
subaccount (str): The identifier for the subaccount.
|
|
197
|
-
|
|
198
|
-
timestamp (int | None, optional): The timestamp for which to retrieve the subaccount summary. If not provided, the most recent summary is retrieved.
|
|
199
|
-
|
|
200
|
-
Returns:
|
|
201
|
-
IndexerSubaccountSummaryData: The summary of the specified subaccount at the provided timestamp.
|
|
202
|
-
"""
|
|
203
|
-
return ensure_data_type(
|
|
204
|
-
self.query(
|
|
205
|
-
IndexerSubaccountSummaryParams(
|
|
206
|
-
subaccount=subaccount, timestamp=timestamp
|
|
207
|
-
)
|
|
208
|
-
).data,
|
|
209
|
-
IndexerSubaccountSummaryData,
|
|
210
|
-
)
|
|
211
|
-
|
|
212
178
|
def get_product_snapshots(
|
|
213
179
|
self, params: IndexerProductSnapshotsParams
|
|
214
180
|
) -> IndexerProductSnapshotsData:
|
|
@@ -319,38 +285,6 @@ class IndexerQueryClient:
|
|
|
319
285
|
IndexerOraclePricesData,
|
|
320
286
|
)
|
|
321
287
|
|
|
322
|
-
def get_token_rewards(self, address: str) -> IndexerTokenRewardsData:
|
|
323
|
-
"""
|
|
324
|
-
Retrieves the token reward data for a specific address.
|
|
325
|
-
|
|
326
|
-
Args:
|
|
327
|
-
address (str): The address for which to retrieve token reward data.
|
|
328
|
-
|
|
329
|
-
Returns:
|
|
330
|
-
IndexerTokenRewardsData: The token reward data for the specified address.
|
|
331
|
-
"""
|
|
332
|
-
return ensure_data_type(
|
|
333
|
-
self.query(IndexerTokenRewardsParams(address=address)).data,
|
|
334
|
-
IndexerTokenRewardsData,
|
|
335
|
-
)
|
|
336
|
-
|
|
337
|
-
def get_maker_statistics(
|
|
338
|
-
self, params: IndexerMakerStatisticsParams
|
|
339
|
-
) -> IndexerMakerStatisticsData:
|
|
340
|
-
"""
|
|
341
|
-
Retrieves maker statistics based on provided parameters.
|
|
342
|
-
|
|
343
|
-
Args:
|
|
344
|
-
params (IndexerMakerStatisticsParams): The parameters for retrieving maker statistics.
|
|
345
|
-
|
|
346
|
-
Returns:
|
|
347
|
-
IndexerMakerStatisticsData: The maker statistics corresponding to the provided parameters.
|
|
348
|
-
"""
|
|
349
|
-
return ensure_data_type(
|
|
350
|
-
self.query(IndexerMakerStatisticsParams.parse_obj(params)).data,
|
|
351
|
-
IndexerMakerStatisticsData,
|
|
352
|
-
)
|
|
353
|
-
|
|
354
288
|
def get_liquidation_feed(self) -> IndexerLiquidationFeedData:
|
|
355
289
|
"""
|
|
356
290
|
Retrieves the liquidation feed data.
|
|
@@ -377,21 +311,6 @@ class IndexerQueryClient:
|
|
|
377
311
|
IndexerLinkedSignerRateLimitData,
|
|
378
312
|
)
|
|
379
313
|
|
|
380
|
-
def get_referral_code(self, subaccount: str) -> IndexerReferralCodeData:
|
|
381
|
-
"""
|
|
382
|
-
Retrieves the referral code for a given address.
|
|
383
|
-
|
|
384
|
-
Args:
|
|
385
|
-
subaccount (str): Unique identifier for the subaccount.
|
|
386
|
-
|
|
387
|
-
Returns:
|
|
388
|
-
IndexerReferralCodeData: The referral code for the specific address.
|
|
389
|
-
"""
|
|
390
|
-
return ensure_data_type(
|
|
391
|
-
self.query(IndexerReferralCodeParams(subaccount=subaccount)).data,
|
|
392
|
-
IndexerReferralCodeData,
|
|
393
|
-
)
|
|
394
|
-
|
|
395
314
|
def get_subaccounts(
|
|
396
315
|
self, params: IndexerSubaccountsParams
|
|
397
316
|
) -> IndexerSubaccountsData:
|
|
@@ -409,26 +328,10 @@ class IndexerQueryClient:
|
|
|
409
328
|
IndexerSubaccountsData,
|
|
410
329
|
)
|
|
411
330
|
|
|
412
|
-
def
|
|
413
|
-
return ensure_data_type(
|
|
414
|
-
self.query(IndexerUsdcPriceParams()).data,
|
|
415
|
-
IndexerUsdcPriceData,
|
|
416
|
-
)
|
|
417
|
-
|
|
418
|
-
def get_token_merkle_proofs(self, address: str) -> IndexerMerkleProofsData:
|
|
331
|
+
def get_quote_price(self) -> IndexerQuotePriceData:
|
|
419
332
|
return ensure_data_type(
|
|
420
|
-
self.query(
|
|
421
|
-
|
|
422
|
-
)
|
|
423
|
-
|
|
424
|
-
def get_foundation_rewards_merkle_proofs(
|
|
425
|
-
self, address: str
|
|
426
|
-
) -> IndexerMerkleProofsData:
|
|
427
|
-
return ensure_data_type(
|
|
428
|
-
self.query(
|
|
429
|
-
IndexerFoundationRewardsMerkleProofsParams(address=address)
|
|
430
|
-
).data,
|
|
431
|
-
IndexerMerkleProofsData,
|
|
333
|
+
self.query(IndexerQuotePriceParams()).data,
|
|
334
|
+
IndexerQuotePriceData,
|
|
432
335
|
)
|
|
433
336
|
|
|
434
337
|
def get_interest_and_funding_payments(
|
|
@@ -25,50 +25,39 @@ __all__ = [
|
|
|
25
25
|
"IndexerEventsTxsLimit",
|
|
26
26
|
"IndexerEventsLimit",
|
|
27
27
|
"IndexerEventsParams",
|
|
28
|
-
"IndexerSubaccountSummaryParams",
|
|
29
28
|
"IndexerProductSnapshotsParams",
|
|
30
29
|
"IndexerCandlesticksParams",
|
|
31
30
|
"IndexerFundingRateParams",
|
|
32
31
|
"IndexerPerpPricesParams",
|
|
33
32
|
"IndexerOraclePricesParams",
|
|
34
|
-
"IndexerTokenRewardsParams",
|
|
35
|
-
"IndexerMakerStatisticsParams",
|
|
36
33
|
"IndexerLiquidationFeedParams",
|
|
37
34
|
"IndexerLinkedSignerRateLimitParams",
|
|
38
|
-
"IndexerReferralCodeParams",
|
|
39
35
|
"IndexerSubaccountsParams",
|
|
40
36
|
"IndexerParams",
|
|
41
37
|
"IndexerHistoricalOrdersRequest",
|
|
42
38
|
"IndexerMatchesRequest",
|
|
43
39
|
"IndexerEventsRequest",
|
|
44
|
-
"IndexerSubaccountSummaryRequest",
|
|
45
40
|
"IndexerProductSnapshotsRequest",
|
|
46
41
|
"IndexerCandlesticksRequest",
|
|
47
42
|
"IndexerFundingRateRequest",
|
|
48
43
|
"IndexerFundingRatesRequest",
|
|
49
44
|
"IndexerPerpPricesRequest",
|
|
50
45
|
"IndexerOraclePricesRequest",
|
|
51
|
-
"IndexerTokenRewardsRequest",
|
|
52
|
-
"IndexerMakerStatisticsRequest",
|
|
53
46
|
"IndexerLiquidationFeedRequest",
|
|
54
47
|
"IndexerLinkedSignerRateLimitRequest",
|
|
55
|
-
"IndexerReferralCodeRequest",
|
|
56
48
|
"IndexerSubaccountsRequest",
|
|
57
49
|
"IndexerRequest",
|
|
58
50
|
"IndexerHistoricalOrdersData",
|
|
59
51
|
"IndexerMatchesData",
|
|
60
52
|
"IndexerEventsData",
|
|
61
|
-
"IndexerSubaccountSummaryData",
|
|
62
53
|
"IndexerProductSnapshotsData",
|
|
63
54
|
"IndexerCandlesticksData",
|
|
64
55
|
"IndexerFundingRateData",
|
|
65
56
|
"IndexerPerpPricesData",
|
|
66
57
|
"IndexerOraclePricesData",
|
|
67
|
-
"IndexerTokenRewardsData",
|
|
68
|
-
"IndexerMakerStatisticsData",
|
|
69
58
|
"IndexerLinkedSignerRateLimitData",
|
|
70
|
-
"IndexerReferralCodeData",
|
|
71
59
|
"IndexerSubaccountsData",
|
|
60
|
+
"IndexerQuotePriceData",
|
|
72
61
|
"IndexerLiquidationFeedData",
|
|
73
62
|
"IndexerResponseData",
|
|
74
63
|
"IndexerResponse",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from nado_protocol.utils.enum import StrEnum
|
|
2
|
-
from typing import Dict, Optional, Union
|
|
2
|
+
from typing import Dict, List, Optional, Tuple, Type, Union
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, validator
|
|
5
5
|
from nado_protocol.indexer_client.types.models import (
|
|
@@ -48,11 +48,8 @@ class IndexerQueryType(StrEnum):
|
|
|
48
48
|
LINKED_SIGNER_RATE_LIMIT = "linked_signer_rate_limit"
|
|
49
49
|
REFERRAL_CODE = "referral_code"
|
|
50
50
|
SUBACCOUNTS = "subaccounts"
|
|
51
|
-
|
|
51
|
+
QUOTE_PRICE = "quote_price"
|
|
52
52
|
ACCOUNT_SNAPSHOTS = "account_snapshots"
|
|
53
|
-
# TODO: revise once this endpoint is live
|
|
54
|
-
TOKEN_MERKLE_PROOFS = "token_merkle_proofs"
|
|
55
|
-
FOUNDATION_REWARDS_MERKLE_PROOFS = "foundation_rewards_merkle_proofs"
|
|
56
53
|
INTEREST_AND_FUNDING = "interest_and_funding"
|
|
57
54
|
INK_AIRDROP = "ink_airdrop"
|
|
58
55
|
|
|
@@ -80,6 +77,10 @@ class IndexerSubaccountHistoricalOrdersParams(IndexerBaseParams):
|
|
|
80
77
|
trigger_types: Optional[list[str]]
|
|
81
78
|
isolated: Optional[bool]
|
|
82
79
|
|
|
80
|
+
class Config:
|
|
81
|
+
# Ensure this doesn't get confused with digest params
|
|
82
|
+
extra = "forbid"
|
|
83
|
+
|
|
83
84
|
|
|
84
85
|
class IndexerHistoricalOrdersByDigestParams(NadoBaseModel):
|
|
85
86
|
"""
|
|
@@ -88,6 +89,10 @@ class IndexerHistoricalOrdersByDigestParams(NadoBaseModel):
|
|
|
88
89
|
|
|
89
90
|
digests: list[str]
|
|
90
91
|
|
|
92
|
+
class Config:
|
|
93
|
+
# Ensure this doesn't get confused with subaccount params
|
|
94
|
+
extra = "forbid"
|
|
95
|
+
|
|
91
96
|
|
|
92
97
|
class IndexerMatchesParams(IndexerBaseParams):
|
|
93
98
|
"""
|
|
@@ -130,16 +135,6 @@ class IndexerEventsParams(IndexerBaseParams):
|
|
|
130
135
|
limit: Optional[IndexerEventsLimit] # type: ignore
|
|
131
136
|
|
|
132
137
|
|
|
133
|
-
class IndexerSubaccountSummaryParams(NadoBaseModel):
|
|
134
|
-
"""
|
|
135
|
-
Parameters for querying subaccount summary.
|
|
136
|
-
"""
|
|
137
|
-
|
|
138
|
-
subaccount: str
|
|
139
|
-
timestamp: Optional[int] = None
|
|
140
|
-
active: Optional[bool] = None
|
|
141
|
-
|
|
142
|
-
|
|
143
138
|
class IndexerProductSnapshotsParams(IndexerBaseParams):
|
|
144
139
|
"""
|
|
145
140
|
Parameters for querying product snapshots.
|
|
@@ -207,24 +202,6 @@ class IndexerOraclePricesParams(NadoBaseModel):
|
|
|
207
202
|
product_ids: list[int]
|
|
208
203
|
|
|
209
204
|
|
|
210
|
-
class IndexerTokenRewardsParams(NadoBaseModel):
|
|
211
|
-
"""
|
|
212
|
-
Parameters for querying token rewards.
|
|
213
|
-
"""
|
|
214
|
-
|
|
215
|
-
address: str
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
class IndexerMakerStatisticsParams(NadoBaseModel):
|
|
219
|
-
"""
|
|
220
|
-
Parameters for querying maker statistics.
|
|
221
|
-
"""
|
|
222
|
-
|
|
223
|
-
product_id: int
|
|
224
|
-
epoch: int
|
|
225
|
-
interval: int
|
|
226
|
-
|
|
227
|
-
|
|
228
205
|
class IndexerLiquidationFeedParams(NadoBaseModel):
|
|
229
206
|
"""
|
|
230
207
|
Parameters for querying liquidation feed.
|
|
@@ -241,14 +218,6 @@ class IndexerLinkedSignerRateLimitParams(NadoBaseModel):
|
|
|
241
218
|
subaccount: str
|
|
242
219
|
|
|
243
220
|
|
|
244
|
-
class IndexerReferralCodeParams(NadoBaseModel):
|
|
245
|
-
"""
|
|
246
|
-
Parameters for querying a referral code.
|
|
247
|
-
"""
|
|
248
|
-
|
|
249
|
-
subaccount: str
|
|
250
|
-
|
|
251
|
-
|
|
252
221
|
class IndexerSubaccountsParams(NadoBaseModel):
|
|
253
222
|
"""
|
|
254
223
|
Parameters for querying subaccounts.
|
|
@@ -259,30 +228,14 @@ class IndexerSubaccountsParams(NadoBaseModel):
|
|
|
259
228
|
start: Optional[int]
|
|
260
229
|
|
|
261
230
|
|
|
262
|
-
class
|
|
231
|
+
class IndexerQuotePriceParams(NadoBaseModel):
|
|
263
232
|
"""
|
|
264
|
-
Parameters for querying
|
|
233
|
+
Parameters for querying quote price.
|
|
265
234
|
"""
|
|
266
235
|
|
|
267
236
|
pass
|
|
268
237
|
|
|
269
238
|
|
|
270
|
-
class IndexerTokenMerkleProofsParams(NadoBaseModel):
|
|
271
|
-
"""
|
|
272
|
-
Parameters for querying token merkle proofs.
|
|
273
|
-
"""
|
|
274
|
-
|
|
275
|
-
address: str
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
class IndexerFoundationRewardsMerkleProofsParams(NadoBaseModel):
|
|
279
|
-
"""
|
|
280
|
-
Parameters for querying Foundation Rewards merkle proofs.
|
|
281
|
-
"""
|
|
282
|
-
|
|
283
|
-
address: str
|
|
284
|
-
|
|
285
|
-
|
|
286
239
|
class IndexerInterestAndFundingParams(NadoBaseModel):
|
|
287
240
|
"""
|
|
288
241
|
Parameters for querying interest and funding payments.
|
|
@@ -318,22 +271,16 @@ IndexerParams = Union[
|
|
|
318
271
|
IndexerHistoricalOrdersByDigestParams,
|
|
319
272
|
IndexerMatchesParams,
|
|
320
273
|
IndexerEventsParams,
|
|
321
|
-
IndexerSubaccountSummaryParams,
|
|
322
274
|
IndexerProductSnapshotsParams,
|
|
323
275
|
IndexerCandlesticksParams,
|
|
324
276
|
IndexerFundingRateParams,
|
|
325
277
|
IndexerPerpPricesParams,
|
|
326
278
|
IndexerOraclePricesParams,
|
|
327
|
-
IndexerTokenRewardsParams,
|
|
328
|
-
IndexerMakerStatisticsParams,
|
|
329
279
|
IndexerLiquidationFeedParams,
|
|
330
280
|
IndexerLinkedSignerRateLimitParams,
|
|
331
|
-
IndexerReferralCodeParams,
|
|
332
281
|
IndexerSubaccountsParams,
|
|
333
|
-
|
|
282
|
+
IndexerQuotePriceParams,
|
|
334
283
|
IndexerMarketSnapshotsParams,
|
|
335
|
-
IndexerTokenMerkleProofsParams,
|
|
336
|
-
IndexerFoundationRewardsMerkleProofsParams,
|
|
337
284
|
IndexerInterestAndFundingParams,
|
|
338
285
|
IndexerAccountSnapshotsParams,
|
|
339
286
|
IndexerInkAirdropParams,
|
|
@@ -349,6 +296,9 @@ class IndexerHistoricalOrdersRequest(NadoBaseModel):
|
|
|
349
296
|
IndexerSubaccountHistoricalOrdersParams, IndexerHistoricalOrdersByDigestParams
|
|
350
297
|
]
|
|
351
298
|
|
|
299
|
+
class Config:
|
|
300
|
+
smart_union = True
|
|
301
|
+
|
|
352
302
|
|
|
353
303
|
class IndexerMatchesRequest(NadoBaseModel):
|
|
354
304
|
"""
|
|
@@ -366,14 +316,6 @@ class IndexerEventsRequest(NadoBaseModel):
|
|
|
366
316
|
events: IndexerEventsParams
|
|
367
317
|
|
|
368
318
|
|
|
369
|
-
class IndexerSubaccountSummaryRequest(NadoBaseModel):
|
|
370
|
-
"""
|
|
371
|
-
Request object for querying subaccount summary.
|
|
372
|
-
"""
|
|
373
|
-
|
|
374
|
-
summary: IndexerSubaccountSummaryParams
|
|
375
|
-
|
|
376
|
-
|
|
377
319
|
class IndexerProductSnapshotsRequest(NadoBaseModel):
|
|
378
320
|
"""
|
|
379
321
|
Request object for querying product snapshots.
|
|
@@ -430,22 +372,6 @@ class IndexerOraclePricesRequest(NadoBaseModel):
|
|
|
430
372
|
oracle_price: IndexerOraclePricesParams
|
|
431
373
|
|
|
432
374
|
|
|
433
|
-
class IndexerTokenRewardsRequest(NadoBaseModel):
|
|
434
|
-
"""
|
|
435
|
-
Request object for querying token rewards.
|
|
436
|
-
"""
|
|
437
|
-
|
|
438
|
-
rewards: IndexerTokenRewardsParams
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
class IndexerMakerStatisticsRequest(NadoBaseModel):
|
|
442
|
-
"""
|
|
443
|
-
Request object for querying maker statistics.
|
|
444
|
-
"""
|
|
445
|
-
|
|
446
|
-
maker_statistics: IndexerMakerStatisticsParams
|
|
447
|
-
|
|
448
|
-
|
|
449
375
|
class IndexerLiquidationFeedRequest(NadoBaseModel):
|
|
450
376
|
"""
|
|
451
377
|
Request object for querying liquidation feed.
|
|
@@ -462,14 +388,6 @@ class IndexerLinkedSignerRateLimitRequest(NadoBaseModel):
|
|
|
462
388
|
linked_signer_rate_limit: IndexerLinkedSignerRateLimitParams
|
|
463
389
|
|
|
464
390
|
|
|
465
|
-
class IndexerReferralCodeRequest(NadoBaseModel):
|
|
466
|
-
"""
|
|
467
|
-
Request object for querying a referral code.
|
|
468
|
-
"""
|
|
469
|
-
|
|
470
|
-
referral_code: IndexerReferralCodeParams
|
|
471
|
-
|
|
472
|
-
|
|
473
391
|
class IndexerSubaccountsRequest(NadoBaseModel):
|
|
474
392
|
"""
|
|
475
393
|
Request object for querying subaccounts.
|
|
@@ -478,28 +396,12 @@ class IndexerSubaccountsRequest(NadoBaseModel):
|
|
|
478
396
|
subaccounts: IndexerSubaccountsParams
|
|
479
397
|
|
|
480
398
|
|
|
481
|
-
class
|
|
482
|
-
"""
|
|
483
|
-
Request object for querying usdc price.
|
|
484
|
-
"""
|
|
485
|
-
|
|
486
|
-
usdc_price: IndexerUsdcPriceParams
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
class IndexerTokenMerkleProofsRequest(NadoBaseModel):
|
|
399
|
+
class IndexerQuotePriceRequest(NadoBaseModel):
|
|
490
400
|
"""
|
|
491
|
-
Request object for querying
|
|
401
|
+
Request object for querying quote price.
|
|
492
402
|
"""
|
|
493
403
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
class IndexerFoundationRewardsMerkleProofsRequest(NadoBaseModel):
|
|
498
|
-
"""
|
|
499
|
-
Request object for querying Foundation Rewards merkle proofs.
|
|
500
|
-
"""
|
|
501
|
-
|
|
502
|
-
foundation_rewards_merkle_proofs: IndexerFoundationRewardsMerkleProofsParams
|
|
404
|
+
quote_price: IndexerQuotePriceParams
|
|
503
405
|
|
|
504
406
|
|
|
505
407
|
class IndexerInterestAndFundingRequest(NadoBaseModel):
|
|
@@ -530,22 +432,16 @@ IndexerRequest = Union[
|
|
|
530
432
|
IndexerHistoricalOrdersRequest,
|
|
531
433
|
IndexerMatchesRequest,
|
|
532
434
|
IndexerEventsRequest,
|
|
533
|
-
IndexerSubaccountSummaryRequest,
|
|
534
435
|
IndexerProductSnapshotsRequest,
|
|
535
436
|
IndexerCandlesticksRequest,
|
|
536
437
|
IndexerFundingRateRequest,
|
|
537
438
|
IndexerPerpPricesRequest,
|
|
538
439
|
IndexerOraclePricesRequest,
|
|
539
|
-
IndexerTokenRewardsRequest,
|
|
540
|
-
IndexerMakerStatisticsRequest,
|
|
541
440
|
IndexerLiquidationFeedRequest,
|
|
542
441
|
IndexerLinkedSignerRateLimitRequest,
|
|
543
|
-
IndexerReferralCodeRequest,
|
|
544
442
|
IndexerSubaccountsRequest,
|
|
545
|
-
|
|
443
|
+
IndexerQuotePriceRequest,
|
|
546
444
|
IndexerMarketSnapshotsRequest,
|
|
547
|
-
IndexerTokenMerkleProofsRequest,
|
|
548
|
-
IndexerFoundationRewardsMerkleProofsRequest,
|
|
549
445
|
IndexerInterestAndFundingRequest,
|
|
550
446
|
IndexerAccountSnapshotsRequest,
|
|
551
447
|
IndexerInkAirdropRequest,
|
|
@@ -578,14 +474,6 @@ class IndexerEventsData(NadoBaseModel):
|
|
|
578
474
|
txs: list[IndexerTx]
|
|
579
475
|
|
|
580
476
|
|
|
581
|
-
class IndexerSubaccountSummaryData(NadoBaseModel):
|
|
582
|
-
"""
|
|
583
|
-
Data object for subaccount summary.
|
|
584
|
-
"""
|
|
585
|
-
|
|
586
|
-
events: list[IndexerEvent]
|
|
587
|
-
|
|
588
|
-
|
|
589
477
|
class IndexerProductSnapshotsData(NadoBaseModel):
|
|
590
478
|
"""
|
|
591
479
|
Data object for product snapshots.
|
|
@@ -643,25 +531,6 @@ class IndexerOraclePricesData(NadoBaseModel):
|
|
|
643
531
|
prices: list[IndexerOraclePrice]
|
|
644
532
|
|
|
645
533
|
|
|
646
|
-
class IndexerTokenRewardsData(NadoBaseModel):
|
|
647
|
-
"""
|
|
648
|
-
Data object for token rewards.
|
|
649
|
-
"""
|
|
650
|
-
|
|
651
|
-
rewards: list[IndexerTokenReward]
|
|
652
|
-
update_time: str
|
|
653
|
-
total_referrals: str
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
class IndexerMakerStatisticsData(NadoBaseModel):
|
|
657
|
-
"""
|
|
658
|
-
Data object for maker statistics.
|
|
659
|
-
"""
|
|
660
|
-
|
|
661
|
-
reward_coefficient: float
|
|
662
|
-
makers: list[IndexerMarketMaker]
|
|
663
|
-
|
|
664
|
-
|
|
665
534
|
class IndexerLinkedSignerRateLimitData(NadoBaseModel):
|
|
666
535
|
"""
|
|
667
536
|
Data object for linked signer rate limits.
|
|
@@ -673,18 +542,6 @@ class IndexerLinkedSignerRateLimitData(NadoBaseModel):
|
|
|
673
542
|
signer: str
|
|
674
543
|
|
|
675
544
|
|
|
676
|
-
class IndexerReferralCodeData(NadoBaseModel):
|
|
677
|
-
"""
|
|
678
|
-
Data object for referral codes.
|
|
679
|
-
"""
|
|
680
|
-
|
|
681
|
-
referral_code: str
|
|
682
|
-
|
|
683
|
-
@validator("referral_code", pre=True, always=True)
|
|
684
|
-
def set_default_referral_code(cls, v):
|
|
685
|
-
return v or ""
|
|
686
|
-
|
|
687
|
-
|
|
688
545
|
class IndexerSubaccountsData(NadoBaseModel):
|
|
689
546
|
"""
|
|
690
547
|
Data object for subaccounts response from the indexer.
|
|
@@ -693,22 +550,14 @@ class IndexerSubaccountsData(NadoBaseModel):
|
|
|
693
550
|
subaccounts: list[IndexerSubaccount]
|
|
694
551
|
|
|
695
552
|
|
|
696
|
-
class
|
|
553
|
+
class IndexerQuotePriceData(NadoBaseModel):
|
|
697
554
|
"""
|
|
698
|
-
Data object for the
|
|
555
|
+
Data object for the quote price response from the indexer.
|
|
699
556
|
"""
|
|
700
557
|
|
|
701
558
|
price_x18: str
|
|
702
559
|
|
|
703
560
|
|
|
704
|
-
class IndexerMerkleProofsData(NadoBaseModel):
|
|
705
|
-
"""
|
|
706
|
-
Data object for the merkle proofs response from the indexer.
|
|
707
|
-
"""
|
|
708
|
-
|
|
709
|
-
merkle_proofs: list[IndexerMerkleProof]
|
|
710
|
-
|
|
711
|
-
|
|
712
561
|
class IndexerInterestAndFundingData(NadoBaseModel):
|
|
713
562
|
"""
|
|
714
563
|
Data object for the interest and funding payments response from the indexer.
|
|
@@ -742,20 +591,15 @@ IndexerResponseData = Union[
|
|
|
742
591
|
IndexerHistoricalOrdersData,
|
|
743
592
|
IndexerMatchesData,
|
|
744
593
|
IndexerEventsData,
|
|
745
|
-
IndexerSubaccountSummaryData,
|
|
746
594
|
IndexerProductSnapshotsData,
|
|
747
595
|
IndexerCandlesticksData,
|
|
748
596
|
IndexerFundingRateData,
|
|
749
597
|
IndexerPerpPricesData,
|
|
750
598
|
IndexerOraclePricesData,
|
|
751
|
-
IndexerTokenRewardsData,
|
|
752
|
-
IndexerMakerStatisticsData,
|
|
753
599
|
IndexerLinkedSignerRateLimitData,
|
|
754
|
-
IndexerReferralCodeData,
|
|
755
600
|
IndexerSubaccountsData,
|
|
756
|
-
|
|
601
|
+
IndexerQuotePriceData,
|
|
757
602
|
IndexerMarketSnapshotsData,
|
|
758
|
-
IndexerMerkleProofsData,
|
|
759
603
|
IndexerInterestAndFundingData,
|
|
760
604
|
IndexerLiquidationFeedData,
|
|
761
605
|
IndexerFundingRatesData,
|
|
@@ -796,10 +640,6 @@ def to_indexer_request(params: IndexerParams) -> IndexerRequest:
|
|
|
796
640
|
),
|
|
797
641
|
IndexerMatchesParams: (IndexerMatchesRequest, IndexerQueryType.MATCHES.value),
|
|
798
642
|
IndexerEventsParams: (IndexerEventsRequest, IndexerQueryType.EVENTS.value),
|
|
799
|
-
IndexerSubaccountSummaryParams: (
|
|
800
|
-
IndexerSubaccountSummaryRequest,
|
|
801
|
-
IndexerQueryType.SUMMARY.value,
|
|
802
|
-
),
|
|
803
643
|
IndexerProductSnapshotsParams: (
|
|
804
644
|
IndexerProductSnapshotsRequest,
|
|
805
645
|
IndexerQueryType.PRODUCTS.value,
|
|
@@ -828,14 +668,6 @@ def to_indexer_request(params: IndexerParams) -> IndexerRequest:
|
|
|
828
668
|
IndexerOraclePricesRequest,
|
|
829
669
|
IndexerQueryType.ORACLE_PRICES.value,
|
|
830
670
|
),
|
|
831
|
-
IndexerTokenRewardsParams: (
|
|
832
|
-
IndexerTokenRewardsRequest,
|
|
833
|
-
IndexerQueryType.REWARDS.value,
|
|
834
|
-
),
|
|
835
|
-
IndexerMakerStatisticsParams: (
|
|
836
|
-
IndexerMakerStatisticsRequest,
|
|
837
|
-
IndexerQueryType.MAKER_STATISTICS.value,
|
|
838
|
-
),
|
|
839
671
|
IndexerLiquidationFeedParams: (
|
|
840
672
|
IndexerLiquidationFeedRequest,
|
|
841
673
|
IndexerQueryType.LIQUIDATION_FEED.value,
|
|
@@ -844,25 +676,13 @@ def to_indexer_request(params: IndexerParams) -> IndexerRequest:
|
|
|
844
676
|
IndexerLinkedSignerRateLimitRequest,
|
|
845
677
|
IndexerQueryType.LINKED_SIGNER_RATE_LIMIT.value,
|
|
846
678
|
),
|
|
847
|
-
IndexerReferralCodeParams: (
|
|
848
|
-
IndexerReferralCodeRequest,
|
|
849
|
-
IndexerQueryType.REFERRAL_CODE.value,
|
|
850
|
-
),
|
|
851
679
|
IndexerSubaccountsParams: (
|
|
852
680
|
IndexerSubaccountsRequest,
|
|
853
681
|
IndexerQueryType.SUBACCOUNTS.value,
|
|
854
682
|
),
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
IndexerQueryType.
|
|
858
|
-
),
|
|
859
|
-
IndexerTokenMerkleProofsParams: (
|
|
860
|
-
IndexerTokenMerkleProofsRequest,
|
|
861
|
-
IndexerQueryType.TOKEN_MERKLE_PROOFS.value,
|
|
862
|
-
),
|
|
863
|
-
IndexerFoundationRewardsMerkleProofsParams: (
|
|
864
|
-
IndexerFoundationRewardsMerkleProofsRequest,
|
|
865
|
-
IndexerQueryType.FOUNDATION_REWARDS_MERKLE_PROOFS.value,
|
|
683
|
+
IndexerQuotePriceParams: (
|
|
684
|
+
IndexerQuotePriceRequest,
|
|
685
|
+
IndexerQueryType.QUOTE_PRICE.value,
|
|
866
686
|
),
|
|
867
687
|
IndexerInterestAndFundingParams: (
|
|
868
688
|
IndexerInterestAndFundingRequest,
|
|
@@ -879,11 +699,11 @@ def to_indexer_request(params: IndexerParams) -> IndexerRequest:
|
|
|
879
699
|
}
|
|
880
700
|
|
|
881
701
|
RequestClass, field_name = indexer_request_mapping[type(params)]
|
|
882
|
-
return RequestClass(
|
|
702
|
+
return RequestClass.parse_obj({field_name: params.dict(exclude_none=False)}) # type: ignore[attr-defined]
|
|
883
703
|
|
|
884
704
|
|
|
885
705
|
IndexerTickersData = Dict[str, IndexerTickerInfo]
|
|
886
706
|
|
|
887
707
|
IndexerPerpContractsData = Dict[str, IndexerPerpContractInfo]
|
|
888
708
|
|
|
889
|
-
IndexerHistoricalTradesData =
|
|
709
|
+
IndexerHistoricalTradesData = List[IndexerTradeInfo]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/client/apis/subaccount/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IClearinghouse.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nado_protocol-0.2.6 → nado_protocol-0.2.7}/nado_protocol/contracts/abis/IProductEngine.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|