chainstream-sdk 0.1.0__py3-none-any.whl

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 (261) hide show
  1. chainstream/__init__.py +46 -0
  2. chainstream/client.py +104 -0
  3. chainstream/openapi_client/__init__.py +156 -0
  4. chainstream/openapi_client/api/__init__.py +20 -0
  5. chainstream/openapi_client/api/blockchain_api.py +549 -0
  6. chainstream/openapi_client/api/defi_sol_moonshot_api.py +590 -0
  7. chainstream/openapi_client/api/defi_sol_pumpfun_api.py +314 -0
  8. chainstream/openapi_client/api/dex_api.py +1576 -0
  9. chainstream/openapi_client/api/dex_pool_api.py +645 -0
  10. chainstream/openapi_client/api/endpoint_api.py +1934 -0
  11. chainstream/openapi_client/api/ipfs_api.py +283 -0
  12. chainstream/openapi_client/api/jobs_api.py +562 -0
  13. chainstream/openapi_client/api/kyt_api.py +3743 -0
  14. chainstream/openapi_client/api/ranking_api.py +2067 -0
  15. chainstream/openapi_client/api/red_packet_api.py +2444 -0
  16. chainstream/openapi_client/api/token_api.py +9211 -0
  17. chainstream/openapi_client/api/trade_api.py +1352 -0
  18. chainstream/openapi_client/api/transaction_api.py +882 -0
  19. chainstream/openapi_client/api/wallet_api.py +1608 -0
  20. chainstream/openapi_client/api/watchlist_api.py +316 -0
  21. chainstream/openapi_client/api_client.py +801 -0
  22. chainstream/openapi_client/api_response.py +21 -0
  23. chainstream/openapi_client/configuration.py +572 -0
  24. chainstream/openapi_client/exceptions.py +217 -0
  25. chainstream/openapi_client/models/__init__.py +122 -0
  26. chainstream/openapi_client/models/address_exposure.py +94 -0
  27. chainstream/openapi_client/models/address_risk_response_dto.py +112 -0
  28. chainstream/openapi_client/models/alert_detail.py +100 -0
  29. chainstream/openapi_client/models/alterya_identification.py +106 -0
  30. chainstream/openapi_client/models/balance_change_type.py +38 -0
  31. chainstream/openapi_client/models/balance_token_type.py +38 -0
  32. chainstream/openapi_client/models/balance_update_dto.py +130 -0
  33. chainstream/openapi_client/models/balance_update_page.py +104 -0
  34. chainstream/openapi_client/models/blockchain_dto.py +94 -0
  35. chainstream/openapi_client/models/blockchain_latest_block_dto.py +90 -0
  36. chainstream/openapi_client/models/boolean_result_dto.py +88 -0
  37. chainstream/openapi_client/models/calculate_pnl_input.py +88 -0
  38. chainstream/openapi_client/models/candle.py +101 -0
  39. chainstream/openapi_client/models/chain.py +39 -0
  40. chainstream/openapi_client/models/chain_symbol.py +39 -0
  41. chainstream/openapi_client/models/chainalysis_address_identification.py +92 -0
  42. chainstream/openapi_client/models/claim_red_packet_input.py +103 -0
  43. chainstream/openapi_client/models/create_endpoint_input.py +102 -0
  44. chainstream/openapi_client/models/create_red_packet_input.py +112 -0
  45. chainstream/openapi_client/models/create_red_packet_reply.py +90 -0
  46. chainstream/openapi_client/models/create_token_input.py +110 -0
  47. chainstream/openapi_client/models/create_token_reply.py +90 -0
  48. chainstream/openapi_client/models/dev_token_dto.py +106 -0
  49. chainstream/openapi_client/models/dex_dto.py +94 -0
  50. chainstream/openapi_client/models/dex_page.py +106 -0
  51. chainstream/openapi_client/models/dex_pool_dto.py +161 -0
  52. chainstream/openapi_client/models/dex_pool_snapshot_dto.py +111 -0
  53. chainstream/openapi_client/models/dex_pool_snapshot_page.py +104 -0
  54. chainstream/openapi_client/models/dex_pool_token_liquidity.py +100 -0
  55. chainstream/openapi_client/models/dex_pool_token_snapshot_dto.py +100 -0
  56. chainstream/openapi_client/models/dex_quote_response.py +98 -0
  57. chainstream/openapi_client/models/direct_exposure_detail.py +90 -0
  58. chainstream/openapi_client/models/endpoint_list_response.py +102 -0
  59. chainstream/openapi_client/models/endpoint_operation_response.py +88 -0
  60. chainstream/openapi_client/models/endpoint_response.py +108 -0
  61. chainstream/openapi_client/models/endpoint_secret_response.py +88 -0
  62. chainstream/openapi_client/models/estimate_gas_limit_input.py +94 -0
  63. chainstream/openapi_client/models/estimate_gas_limit_response.py +90 -0
  64. chainstream/openapi_client/models/filter_condition.py +102 -0
  65. chainstream/openapi_client/models/gas_price_response.py +90 -0
  66. chainstream/openapi_client/models/job_dto.py +90 -0
  67. chainstream/openapi_client/models/job_streaming_dto.py +90 -0
  68. chainstream/openapi_client/models/kyt_register_transfer_request.py +108 -0
  69. chainstream/openapi_client/models/kyt_register_withdrawal_request.py +111 -0
  70. chainstream/openapi_client/models/link.py +97 -0
  71. chainstream/openapi_client/models/moonshot_create_token_input.py +145 -0
  72. chainstream/openapi_client/models/moonshot_create_token_reply.py +90 -0
  73. chainstream/openapi_client/models/moonshot_submit_create_token200_response.py +90 -0
  74. chainstream/openapi_client/models/moonshot_submit_create_token_input.py +90 -0
  75. chainstream/openapi_client/models/network_identification_org.py +88 -0
  76. chainstream/openapi_client/models/on_chain_activity.py +88 -0
  77. chainstream/openapi_client/models/pump_create_token_input.py +155 -0
  78. chainstream/openapi_client/models/pump_create_token_reply.py +90 -0
  79. chainstream/openapi_client/models/red_packet_claim_dto.py +103 -0
  80. chainstream/openapi_client/models/red_packet_claims_page.py +104 -0
  81. chainstream/openapi_client/models/red_packet_dto.py +121 -0
  82. chainstream/openapi_client/models/red_packet_reply.py +88 -0
  83. chainstream/openapi_client/models/red_packet_send_tx_input.py +88 -0
  84. chainstream/openapi_client/models/red_packet_send_tx_response.py +88 -0
  85. chainstream/openapi_client/models/red_packets_page.py +104 -0
  86. chainstream/openapi_client/models/register_address_request.py +88 -0
  87. chainstream/openapi_client/models/register_address_response_dto.py +88 -0
  88. chainstream/openapi_client/models/resolution.py +46 -0
  89. chainstream/openapi_client/models/send_tx_input.py +102 -0
  90. chainstream/openapi_client/models/send_tx_response.py +92 -0
  91. chainstream/openapi_client/models/swap_input.py +119 -0
  92. chainstream/openapi_client/models/swap_reply.py +90 -0
  93. chainstream/openapi_client/models/swap_route_input.py +127 -0
  94. chainstream/openapi_client/models/swap_route_response.py +98 -0
  95. chainstream/openapi_client/models/token.py +158 -0
  96. chainstream/openapi_client/models/token_creation_dto.py +107 -0
  97. chainstream/openapi_client/models/token_creation_page.py +106 -0
  98. chainstream/openapi_client/models/token_creators_dto.py +92 -0
  99. chainstream/openapi_client/models/token_extra_dto.py +128 -0
  100. chainstream/openapi_client/models/token_holder.py +94 -0
  101. chainstream/openapi_client/models/token_holder_page.py +106 -0
  102. chainstream/openapi_client/models/token_liquidity_snapshot_dto.py +106 -0
  103. chainstream/openapi_client/models/token_liquidity_snapshot_page.py +104 -0
  104. chainstream/openapi_client/models/token_list_page.py +106 -0
  105. chainstream/openapi_client/models/token_market_data.py +174 -0
  106. chainstream/openapi_client/models/token_metadata.py +132 -0
  107. chainstream/openapi_client/models/token_page.py +108 -0
  108. chainstream/openapi_client/models/token_price_dto.py +94 -0
  109. chainstream/openapi_client/models/token_price_page.py +106 -0
  110. chainstream/openapi_client/models/token_social_medias_dto.py +112 -0
  111. chainstream/openapi_client/models/token_stat.py +340 -0
  112. chainstream/openapi_client/models/token_trader.py +113 -0
  113. chainstream/openapi_client/models/token_trader_tag.py +45 -0
  114. chainstream/openapi_client/models/top_traders_dto.py +110 -0
  115. chainstream/openapi_client/models/top_traders_page.py +106 -0
  116. chainstream/openapi_client/models/trade_detail_dto.py +136 -0
  117. chainstream/openapi_client/models/trade_event.py +113 -0
  118. chainstream/openapi_client/models/trade_page.py +106 -0
  119. chainstream/openapi_client/models/trade_type.py +38 -0
  120. chainstream/openapi_client/models/transfer_alerts_response_dto.py +96 -0
  121. chainstream/openapi_client/models/transfer_base_response_dto.py +112 -0
  122. chainstream/openapi_client/models/transfer_direct_exposure_response_dto.py +92 -0
  123. chainstream/openapi_client/models/transfer_network_identifications_response_dto.py +98 -0
  124. chainstream/openapi_client/models/update_endpoint_input.py +104 -0
  125. chainstream/openapi_client/models/wallet_balance_detail_dto.py +136 -0
  126. chainstream/openapi_client/models/wallet_balances_dto.py +100 -0
  127. chainstream/openapi_client/models/wallet_pnl_dto.py +132 -0
  128. chainstream/openapi_client/models/withdrawal_address_identifications_response_dto.py +98 -0
  129. chainstream/openapi_client/models/withdrawal_base_response_dto.py +106 -0
  130. chainstream/openapi_client/models/withdrawal_fraud_assessment_response_dto.py +96 -0
  131. chainstream/openapi_client/rest.py +213 -0
  132. chainstream/openapi_client/test/__init__.py +0 -0
  133. chainstream/openapi_client/test/test_address_exposure.py +59 -0
  134. chainstream/openapi_client/test/test_address_risk_response_dto.py +81 -0
  135. chainstream/openapi_client/test/test_alert_detail.py +65 -0
  136. chainstream/openapi_client/test/test_alterya_identification.py +69 -0
  137. chainstream/openapi_client/test/test_balance_change_type.py +34 -0
  138. chainstream/openapi_client/test/test_balance_token_type.py +34 -0
  139. chainstream/openapi_client/test/test_balance_update_dto.py +93 -0
  140. chainstream/openapi_client/test/test_balance_update_page.py +105 -0
  141. chainstream/openapi_client/test/test_blockchain_api.py +46 -0
  142. chainstream/openapi_client/test/test_blockchain_dto.py +59 -0
  143. chainstream/openapi_client/test/test_blockchain_latest_block_dto.py +55 -0
  144. chainstream/openapi_client/test/test_boolean_result_dto.py +53 -0
  145. chainstream/openapi_client/test/test_calculate_pnl_input.py +52 -0
  146. chainstream/openapi_client/test/test_candle.py +65 -0
  147. chainstream/openapi_client/test/test_chain.py +34 -0
  148. chainstream/openapi_client/test/test_chain_symbol.py +34 -0
  149. chainstream/openapi_client/test/test_chainalysis_address_identification.py +57 -0
  150. chainstream/openapi_client/test/test_claim_red_packet_input.py +58 -0
  151. chainstream/openapi_client/test/test_create_endpoint_input.py +63 -0
  152. chainstream/openapi_client/test/test_create_red_packet_input.py +64 -0
  153. chainstream/openapi_client/test/test_create_red_packet_reply.py +55 -0
  154. chainstream/openapi_client/test/test_create_token_input.py +63 -0
  155. chainstream/openapi_client/test/test_create_token_reply.py +55 -0
  156. chainstream/openapi_client/test/test_defi_sol_moonshot_api.py +46 -0
  157. chainstream/openapi_client/test/test_defi_sol_pumpfun_api.py +39 -0
  158. chainstream/openapi_client/test/test_dev_token_dto.py +441 -0
  159. chainstream/openapi_client/test/test_dex_api.py +67 -0
  160. chainstream/openapi_client/test/test_dex_dto.py +56 -0
  161. chainstream/openapi_client/test/test_dex_page.py +70 -0
  162. chainstream/openapi_client/test/test_dex_pool_api.py +46 -0
  163. chainstream/openapi_client/test/test_dex_pool_dto.py +88 -0
  164. chainstream/openapi_client/test/test_dex_pool_snapshot_dto.py +96 -0
  165. chainstream/openapi_client/test/test_dex_pool_snapshot_page.py +81 -0
  166. chainstream/openapi_client/test/test_dex_pool_token_liquidity.py +65 -0
  167. chainstream/openapi_client/test/test_dex_pool_token_snapshot_dto.py +65 -0
  168. chainstream/openapi_client/test/test_dex_quote_response.py +57 -0
  169. chainstream/openapi_client/test/test_direct_exposure_detail.py +55 -0
  170. chainstream/openapi_client/test/test_endpoint_api.py +81 -0
  171. chainstream/openapi_client/test/test_endpoint_list_response.py +72 -0
  172. chainstream/openapi_client/test/test_endpoint_operation_response.py +52 -0
  173. chainstream/openapi_client/test/test_endpoint_response.py +66 -0
  174. chainstream/openapi_client/test/test_endpoint_secret_response.py +52 -0
  175. chainstream/openapi_client/test/test_estimate_gas_limit_input.py +58 -0
  176. chainstream/openapi_client/test/test_estimate_gas_limit_response.py +55 -0
  177. chainstream/openapi_client/test/test_filter_condition.py +54 -0
  178. chainstream/openapi_client/test/test_gas_price_response.py +55 -0
  179. chainstream/openapi_client/test/test_ipfs_api.py +39 -0
  180. chainstream/openapi_client/test/test_job_dto.py +55 -0
  181. chainstream/openapi_client/test/test_job_streaming_dto.py +55 -0
  182. chainstream/openapi_client/test/test_jobs_api.py +46 -0
  183. chainstream/openapi_client/test/test_kyt_api.py +130 -0
  184. chainstream/openapi_client/test/test_kyt_register_transfer_request.py +59 -0
  185. chainstream/openapi_client/test/test_kyt_register_withdrawal_request.py +65 -0
  186. chainstream/openapi_client/test/test_link.py +55 -0
  187. chainstream/openapi_client/test/test_moonshot_create_token_input.py +79 -0
  188. chainstream/openapi_client/test/test_moonshot_create_token_reply.py +55 -0
  189. chainstream/openapi_client/test/test_moonshot_submit_create_token200_response.py +53 -0
  190. chainstream/openapi_client/test/test_moonshot_submit_create_token_input.py +54 -0
  191. chainstream/openapi_client/test/test_network_identification_org.py +53 -0
  192. chainstream/openapi_client/test/test_on_chain_activity.py +53 -0
  193. chainstream/openapi_client/test/test_pump_create_token_input.py +71 -0
  194. chainstream/openapi_client/test/test_pump_create_token_reply.py +54 -0
  195. chainstream/openapi_client/test/test_ranking_api.py +67 -0
  196. chainstream/openapi_client/test/test_red_packet_api.py +88 -0
  197. chainstream/openapi_client/test/test_red_packet_claim_dto.py +67 -0
  198. chainstream/openapi_client/test/test_red_packet_claims_page.py +81 -0
  199. chainstream/openapi_client/test/test_red_packet_dto.py +85 -0
  200. chainstream/openapi_client/test/test_red_packet_reply.py +53 -0
  201. chainstream/openapi_client/test/test_red_packet_send_tx_input.py +53 -0
  202. chainstream/openapi_client/test/test_red_packet_send_tx_response.py +53 -0
  203. chainstream/openapi_client/test/test_red_packets_page.py +99 -0
  204. chainstream/openapi_client/test/test_register_address_request.py +53 -0
  205. chainstream/openapi_client/test/test_register_address_response_dto.py +53 -0
  206. chainstream/openapi_client/test/test_resolution.py +34 -0
  207. chainstream/openapi_client/test/test_send_tx_input.py +55 -0
  208. chainstream/openapi_client/test/test_send_tx_response.py +57 -0
  209. chainstream/openapi_client/test/test_swap_input.py +65 -0
  210. chainstream/openapi_client/test/test_swap_reply.py +55 -0
  211. chainstream/openapi_client/test/test_swap_route_input.py +69 -0
  212. chainstream/openapi_client/test/test_swap_route_response.py +85 -0
  213. chainstream/openapi_client/test/test_token.py +352 -0
  214. chainstream/openapi_client/test/test_token_api.py +193 -0
  215. chainstream/openapi_client/test/test_token_creation_dto.py +64 -0
  216. chainstream/openapi_client/test/test_token_creation_page.py +76 -0
  217. chainstream/openapi_client/test/test_token_creators_dto.py +54 -0
  218. chainstream/openapi_client/test/test_token_extra_dto.py +72 -0
  219. chainstream/openapi_client/test/test_token_holder.py +59 -0
  220. chainstream/openapi_client/test/test_token_holder_page.py +70 -0
  221. chainstream/openapi_client/test/test_token_liquidity_snapshot_dto.py +71 -0
  222. chainstream/openapi_client/test/test_token_liquidity_snapshot_page.py +83 -0
  223. chainstream/openapi_client/test/test_token_list_page.py +154 -0
  224. chainstream/openapi_client/test/test_token_market_data.py +101 -0
  225. chainstream/openapi_client/test/test_token_metadata.py +110 -0
  226. chainstream/openapi_client/test/test_token_page.py +155 -0
  227. chainstream/openapi_client/test/test_token_price_dto.py +59 -0
  228. chainstream/openapi_client/test/test_token_price_page.py +70 -0
  229. chainstream/openapi_client/test/test_token_social_medias_dto.py +64 -0
  230. chainstream/openapi_client/test/test_token_stat.py +257 -0
  231. chainstream/openapi_client/test/test_token_trader.py +65 -0
  232. chainstream/openapi_client/test/test_token_trader_tag.py +34 -0
  233. chainstream/openapi_client/test/test_top_traders_dto.py +75 -0
  234. chainstream/openapi_client/test/test_top_traders_page.py +86 -0
  235. chainstream/openapi_client/test/test_trade_api.py +53 -0
  236. chainstream/openapi_client/test/test_trade_detail_dto.py +101 -0
  237. chainstream/openapi_client/test/test_trade_event.py +77 -0
  238. chainstream/openapi_client/test/test_trade_page.py +112 -0
  239. chainstream/openapi_client/test/test_trade_type.py +34 -0
  240. chainstream/openapi_client/test/test_transaction_api.py +53 -0
  241. chainstream/openapi_client/test/test_transfer_alerts_response_dto.py +71 -0
  242. chainstream/openapi_client/test/test_transfer_base_response_dto.py +77 -0
  243. chainstream/openapi_client/test/test_transfer_direct_exposure_response_dto.py +57 -0
  244. chainstream/openapi_client/test/test_transfer_network_identifications_response_dto.py +61 -0
  245. chainstream/openapi_client/test/test_update_endpoint_input.py +64 -0
  246. chainstream/openapi_client/test/test_wallet_api.py +67 -0
  247. chainstream/openapi_client/test/test_wallet_balance_detail_dto.py +101 -0
  248. chainstream/openapi_client/test/test_wallet_balances_dto.py +111 -0
  249. chainstream/openapi_client/test/test_wallet_pnl_dto.py +97 -0
  250. chainstream/openapi_client/test/test_watchlist_api.py +39 -0
  251. chainstream/openapi_client/test/test_withdrawal_address_identifications_response_dto.py +65 -0
  252. chainstream/openapi_client/test/test_withdrawal_base_response_dto.py +71 -0
  253. chainstream/openapi_client/test/test_withdrawal_fraud_assessment_response_dto.py +73 -0
  254. chainstream/stream/__init__.py +74 -0
  255. chainstream/stream/client.py +761 -0
  256. chainstream/stream/fields.py +284 -0
  257. chainstream/stream/models.py +415 -0
  258. chainstream_sdk-0.1.0.dist-info/METADATA +80 -0
  259. chainstream_sdk-0.1.0.dist-info/RECORD +261 -0
  260. chainstream_sdk-0.1.0.dist-info/WHEEL +4 -0
  261. chainstream_sdk-0.1.0.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,645 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Dex Aggregator API
5
+
6
+ Dex Aggregator API ⚡️
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: ai@sx.ai
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictInt, StrictStr
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from chainstream.openapi_client.models.chain_symbol import ChainSymbol
24
+ from chainstream.openapi_client.models.dex_pool_dto import DexPoolDTO
25
+ from chainstream.openapi_client.models.dex_pool_snapshot_page import DexPoolSnapshotPage
26
+
27
+ from chainstream.openapi_client.api_client import ApiClient, RequestSerialized
28
+ from chainstream.openapi_client.api_response import ApiResponse
29
+ from chainstream.openapi_client.rest import RESTResponseType
30
+
31
+
32
+ class DexPoolApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ async def get_dexpool(
47
+ self,
48
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
49
+ pool_address: Annotated[StrictStr, Field(description="GLOBAL.POOLADDRESS.DESCRIPTION")],
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> DexPoolDTO:
63
+ """CONTROLLER.DEXPOOL.GET.SUMMARY
64
+
65
+ CONTROLLER.DEXPOOL.GET.DESCRIPTION
66
+
67
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
68
+ :type chain: ChainSymbol
69
+ :param pool_address: GLOBAL.POOLADDRESS.DESCRIPTION (required)
70
+ :type pool_address: str
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._get_dexpool_serialize(
94
+ chain=chain,
95
+ pool_address=pool_address,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': "DexPoolDTO",
104
+ }
105
+ response_data = await self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ await response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ async def get_dexpool_with_http_info(
118
+ self,
119
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
120
+ pool_address: Annotated[StrictStr, Field(description="GLOBAL.POOLADDRESS.DESCRIPTION")],
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[DexPoolDTO]:
134
+ """CONTROLLER.DEXPOOL.GET.SUMMARY
135
+
136
+ CONTROLLER.DEXPOOL.GET.DESCRIPTION
137
+
138
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
139
+ :type chain: ChainSymbol
140
+ :param pool_address: GLOBAL.POOLADDRESS.DESCRIPTION (required)
141
+ :type pool_address: str
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._get_dexpool_serialize(
165
+ chain=chain,
166
+ pool_address=pool_address,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "DexPoolDTO",
175
+ }
176
+ response_data = await self.api_client.call_api(
177
+ *_param,
178
+ _request_timeout=_request_timeout
179
+ )
180
+ await response_data.read()
181
+ return self.api_client.response_deserialize(
182
+ response_data=response_data,
183
+ response_types_map=_response_types_map,
184
+ )
185
+
186
+
187
+ @validate_call
188
+ async def get_dexpool_without_preload_content(
189
+ self,
190
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
191
+ pool_address: Annotated[StrictStr, Field(description="GLOBAL.POOLADDRESS.DESCRIPTION")],
192
+ _request_timeout: Union[
193
+ None,
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Tuple[
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Annotated[StrictFloat, Field(gt=0)]
198
+ ]
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """CONTROLLER.DEXPOOL.GET.SUMMARY
206
+
207
+ CONTROLLER.DEXPOOL.GET.DESCRIPTION
208
+
209
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
210
+ :type chain: ChainSymbol
211
+ :param pool_address: GLOBAL.POOLADDRESS.DESCRIPTION (required)
212
+ :type pool_address: str
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._get_dexpool_serialize(
236
+ chain=chain,
237
+ pool_address=pool_address,
238
+ _request_auth=_request_auth,
239
+ _content_type=_content_type,
240
+ _headers=_headers,
241
+ _host_index=_host_index
242
+ )
243
+
244
+ _response_types_map: Dict[str, Optional[str]] = {
245
+ '200': "DexPoolDTO",
246
+ }
247
+ response_data = await self.api_client.call_api(
248
+ *_param,
249
+ _request_timeout=_request_timeout
250
+ )
251
+ return response_data.response
252
+
253
+
254
+ def _get_dexpool_serialize(
255
+ self,
256
+ chain,
257
+ pool_address,
258
+ _request_auth,
259
+ _content_type,
260
+ _headers,
261
+ _host_index,
262
+ ) -> RequestSerialized:
263
+
264
+ _host = None
265
+
266
+ _collection_formats: Dict[str, str] = {
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ if chain is not None:
280
+ _path_params['chain'] = chain.value
281
+ if pool_address is not None:
282
+ _path_params['poolAddress'] = pool_address
283
+ # process the query parameters
284
+ # process the header parameters
285
+ # process the form parameters
286
+ # process the body parameter
287
+
288
+
289
+ # set the HTTP header `Accept`
290
+ if 'Accept' not in _header_params:
291
+ _header_params['Accept'] = self.api_client.select_header_accept(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+
297
+
298
+ # authentication setting
299
+ _auth_settings: List[str] = [
300
+ 'bearer'
301
+ ]
302
+
303
+ return self.api_client.param_serialize(
304
+ method='GET',
305
+ resource_path='/v1/dexpools/{chain}/{poolAddress}',
306
+ path_params=_path_params,
307
+ query_params=_query_params,
308
+ header_params=_header_params,
309
+ body=_body_params,
310
+ post_params=_form_params,
311
+ files=_files,
312
+ auth_settings=_auth_settings,
313
+ collection_formats=_collection_formats,
314
+ _host=_host,
315
+ _request_auth=_request_auth
316
+ )
317
+
318
+
319
+
320
+
321
+ @validate_call
322
+ async def get_dexpool_snapshots(
323
+ self,
324
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
325
+ pool_address: Annotated[StrictStr, Field(description="GLOBAL.POOLADDRESS.DESCRIPTION")],
326
+ time: Annotated[Optional[StrictInt], Field(description="DTO.DEXPOOL.SNAPSHOT.TIME")] = None,
327
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR")] = None,
328
+ limit: Annotated[Optional[StrictInt], Field(description="DTO.PAGE.LIMIT")] = None,
329
+ _request_timeout: Union[
330
+ None,
331
+ Annotated[StrictFloat, Field(gt=0)],
332
+ Tuple[
333
+ Annotated[StrictFloat, Field(gt=0)],
334
+ Annotated[StrictFloat, Field(gt=0)]
335
+ ]
336
+ ] = None,
337
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
338
+ _content_type: Optional[StrictStr] = None,
339
+ _headers: Optional[Dict[StrictStr, Any]] = None,
340
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
341
+ ) -> DexPoolSnapshotPage:
342
+ """CONTROLLER.DEXPOOL.SNAPSHOTS.SUMMARY
343
+
344
+ CONTROLLER.DEXPOOL.SNAPSHOTS.DESCRIPTION
345
+
346
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
347
+ :type chain: ChainSymbol
348
+ :param pool_address: GLOBAL.POOLADDRESS.DESCRIPTION (required)
349
+ :type pool_address: str
350
+ :param time: DTO.DEXPOOL.SNAPSHOT.TIME
351
+ :type time: int
352
+ :param cursor: DTO.PAGE.CURSOR
353
+ :type cursor: str
354
+ :param limit: DTO.PAGE.LIMIT
355
+ :type limit: int
356
+ :param _request_timeout: timeout setting for this request. If one
357
+ number provided, it will be total request
358
+ timeout. It can also be a pair (tuple) of
359
+ (connection, read) timeouts.
360
+ :type _request_timeout: int, tuple(int, int), optional
361
+ :param _request_auth: set to override the auth_settings for an a single
362
+ request; this effectively ignores the
363
+ authentication in the spec for a single request.
364
+ :type _request_auth: dict, optional
365
+ :param _content_type: force content-type for the request.
366
+ :type _content_type: str, Optional
367
+ :param _headers: set to override the headers for a single
368
+ request; this effectively ignores the headers
369
+ in the spec for a single request.
370
+ :type _headers: dict, optional
371
+ :param _host_index: set to override the host_index for a single
372
+ request; this effectively ignores the host_index
373
+ in the spec for a single request.
374
+ :type _host_index: int, optional
375
+ :return: Returns the result object.
376
+ """ # noqa: E501
377
+
378
+ _param = self._get_dexpool_snapshots_serialize(
379
+ chain=chain,
380
+ pool_address=pool_address,
381
+ time=time,
382
+ cursor=cursor,
383
+ limit=limit,
384
+ _request_auth=_request_auth,
385
+ _content_type=_content_type,
386
+ _headers=_headers,
387
+ _host_index=_host_index
388
+ )
389
+
390
+ _response_types_map: Dict[str, Optional[str]] = {
391
+ '200': "DexPoolSnapshotPage",
392
+ }
393
+ response_data = await self.api_client.call_api(
394
+ *_param,
395
+ _request_timeout=_request_timeout
396
+ )
397
+ await response_data.read()
398
+ return self.api_client.response_deserialize(
399
+ response_data=response_data,
400
+ response_types_map=_response_types_map,
401
+ ).data
402
+
403
+
404
+ @validate_call
405
+ async def get_dexpool_snapshots_with_http_info(
406
+ self,
407
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
408
+ pool_address: Annotated[StrictStr, Field(description="GLOBAL.POOLADDRESS.DESCRIPTION")],
409
+ time: Annotated[Optional[StrictInt], Field(description="DTO.DEXPOOL.SNAPSHOT.TIME")] = None,
410
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR")] = None,
411
+ limit: Annotated[Optional[StrictInt], Field(description="DTO.PAGE.LIMIT")] = None,
412
+ _request_timeout: Union[
413
+ None,
414
+ Annotated[StrictFloat, Field(gt=0)],
415
+ Tuple[
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Annotated[StrictFloat, Field(gt=0)]
418
+ ]
419
+ ] = None,
420
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
421
+ _content_type: Optional[StrictStr] = None,
422
+ _headers: Optional[Dict[StrictStr, Any]] = None,
423
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424
+ ) -> ApiResponse[DexPoolSnapshotPage]:
425
+ """CONTROLLER.DEXPOOL.SNAPSHOTS.SUMMARY
426
+
427
+ CONTROLLER.DEXPOOL.SNAPSHOTS.DESCRIPTION
428
+
429
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
430
+ :type chain: ChainSymbol
431
+ :param pool_address: GLOBAL.POOLADDRESS.DESCRIPTION (required)
432
+ :type pool_address: str
433
+ :param time: DTO.DEXPOOL.SNAPSHOT.TIME
434
+ :type time: int
435
+ :param cursor: DTO.PAGE.CURSOR
436
+ :type cursor: str
437
+ :param limit: DTO.PAGE.LIMIT
438
+ :type limit: int
439
+ :param _request_timeout: timeout setting for this request. If one
440
+ number provided, it will be total request
441
+ timeout. It can also be a pair (tuple) of
442
+ (connection, read) timeouts.
443
+ :type _request_timeout: int, tuple(int, int), optional
444
+ :param _request_auth: set to override the auth_settings for an a single
445
+ request; this effectively ignores the
446
+ authentication in the spec for a single request.
447
+ :type _request_auth: dict, optional
448
+ :param _content_type: force content-type for the request.
449
+ :type _content_type: str, Optional
450
+ :param _headers: set to override the headers for a single
451
+ request; this effectively ignores the headers
452
+ in the spec for a single request.
453
+ :type _headers: dict, optional
454
+ :param _host_index: set to override the host_index for a single
455
+ request; this effectively ignores the host_index
456
+ in the spec for a single request.
457
+ :type _host_index: int, optional
458
+ :return: Returns the result object.
459
+ """ # noqa: E501
460
+
461
+ _param = self._get_dexpool_snapshots_serialize(
462
+ chain=chain,
463
+ pool_address=pool_address,
464
+ time=time,
465
+ cursor=cursor,
466
+ limit=limit,
467
+ _request_auth=_request_auth,
468
+ _content_type=_content_type,
469
+ _headers=_headers,
470
+ _host_index=_host_index
471
+ )
472
+
473
+ _response_types_map: Dict[str, Optional[str]] = {
474
+ '200': "DexPoolSnapshotPage",
475
+ }
476
+ response_data = await self.api_client.call_api(
477
+ *_param,
478
+ _request_timeout=_request_timeout
479
+ )
480
+ await response_data.read()
481
+ return self.api_client.response_deserialize(
482
+ response_data=response_data,
483
+ response_types_map=_response_types_map,
484
+ )
485
+
486
+
487
+ @validate_call
488
+ async def get_dexpool_snapshots_without_preload_content(
489
+ self,
490
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
491
+ pool_address: Annotated[StrictStr, Field(description="GLOBAL.POOLADDRESS.DESCRIPTION")],
492
+ time: Annotated[Optional[StrictInt], Field(description="DTO.DEXPOOL.SNAPSHOT.TIME")] = None,
493
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR")] = None,
494
+ limit: Annotated[Optional[StrictInt], Field(description="DTO.PAGE.LIMIT")] = None,
495
+ _request_timeout: Union[
496
+ None,
497
+ Annotated[StrictFloat, Field(gt=0)],
498
+ Tuple[
499
+ Annotated[StrictFloat, Field(gt=0)],
500
+ Annotated[StrictFloat, Field(gt=0)]
501
+ ]
502
+ ] = None,
503
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
504
+ _content_type: Optional[StrictStr] = None,
505
+ _headers: Optional[Dict[StrictStr, Any]] = None,
506
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
507
+ ) -> RESTResponseType:
508
+ """CONTROLLER.DEXPOOL.SNAPSHOTS.SUMMARY
509
+
510
+ CONTROLLER.DEXPOOL.SNAPSHOTS.DESCRIPTION
511
+
512
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
513
+ :type chain: ChainSymbol
514
+ :param pool_address: GLOBAL.POOLADDRESS.DESCRIPTION (required)
515
+ :type pool_address: str
516
+ :param time: DTO.DEXPOOL.SNAPSHOT.TIME
517
+ :type time: int
518
+ :param cursor: DTO.PAGE.CURSOR
519
+ :type cursor: str
520
+ :param limit: DTO.PAGE.LIMIT
521
+ :type limit: int
522
+ :param _request_timeout: timeout setting for this request. If one
523
+ number provided, it will be total request
524
+ timeout. It can also be a pair (tuple) of
525
+ (connection, read) timeouts.
526
+ :type _request_timeout: int, tuple(int, int), optional
527
+ :param _request_auth: set to override the auth_settings for an a single
528
+ request; this effectively ignores the
529
+ authentication in the spec for a single request.
530
+ :type _request_auth: dict, optional
531
+ :param _content_type: force content-type for the request.
532
+ :type _content_type: str, Optional
533
+ :param _headers: set to override the headers for a single
534
+ request; this effectively ignores the headers
535
+ in the spec for a single request.
536
+ :type _headers: dict, optional
537
+ :param _host_index: set to override the host_index for a single
538
+ request; this effectively ignores the host_index
539
+ in the spec for a single request.
540
+ :type _host_index: int, optional
541
+ :return: Returns the result object.
542
+ """ # noqa: E501
543
+
544
+ _param = self._get_dexpool_snapshots_serialize(
545
+ chain=chain,
546
+ pool_address=pool_address,
547
+ time=time,
548
+ cursor=cursor,
549
+ limit=limit,
550
+ _request_auth=_request_auth,
551
+ _content_type=_content_type,
552
+ _headers=_headers,
553
+ _host_index=_host_index
554
+ )
555
+
556
+ _response_types_map: Dict[str, Optional[str]] = {
557
+ '200': "DexPoolSnapshotPage",
558
+ }
559
+ response_data = await self.api_client.call_api(
560
+ *_param,
561
+ _request_timeout=_request_timeout
562
+ )
563
+ return response_data.response
564
+
565
+
566
+ def _get_dexpool_snapshots_serialize(
567
+ self,
568
+ chain,
569
+ pool_address,
570
+ time,
571
+ cursor,
572
+ limit,
573
+ _request_auth,
574
+ _content_type,
575
+ _headers,
576
+ _host_index,
577
+ ) -> RequestSerialized:
578
+
579
+ _host = None
580
+
581
+ _collection_formats: Dict[str, str] = {
582
+ }
583
+
584
+ _path_params: Dict[str, str] = {}
585
+ _query_params: List[Tuple[str, str]] = []
586
+ _header_params: Dict[str, Optional[str]] = _headers or {}
587
+ _form_params: List[Tuple[str, str]] = []
588
+ _files: Dict[
589
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
590
+ ] = {}
591
+ _body_params: Optional[bytes] = None
592
+
593
+ # process the path parameters
594
+ if chain is not None:
595
+ _path_params['chain'] = chain.value
596
+ if pool_address is not None:
597
+ _path_params['poolAddress'] = pool_address
598
+ # process the query parameters
599
+ if time is not None:
600
+
601
+ _query_params.append(('time', time))
602
+
603
+ if cursor is not None:
604
+
605
+ _query_params.append(('cursor', cursor))
606
+
607
+ if limit is not None:
608
+
609
+ _query_params.append(('limit', limit))
610
+
611
+ # process the header parameters
612
+ # process the form parameters
613
+ # process the body parameter
614
+
615
+
616
+ # set the HTTP header `Accept`
617
+ if 'Accept' not in _header_params:
618
+ _header_params['Accept'] = self.api_client.select_header_accept(
619
+ [
620
+ 'application/json'
621
+ ]
622
+ )
623
+
624
+
625
+ # authentication setting
626
+ _auth_settings: List[str] = [
627
+ 'bearer'
628
+ ]
629
+
630
+ return self.api_client.param_serialize(
631
+ method='GET',
632
+ resource_path='/v1/dexpools/{chain}/{poolAddress}/snapshots',
633
+ path_params=_path_params,
634
+ query_params=_query_params,
635
+ header_params=_header_params,
636
+ body=_body_params,
637
+ post_params=_form_params,
638
+ files=_files,
639
+ auth_settings=_auth_settings,
640
+ collection_formats=_collection_formats,
641
+ _host=_host,
642
+ _request_auth=_request_auth
643
+ )
644
+
645
+