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,1352 @@
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, field_validator
21
+ from typing import Optional, Union
22
+ from typing_extensions import Annotated
23
+ from chainstream.openapi_client.models.chain_symbol import ChainSymbol
24
+ from chainstream.openapi_client.models.top_traders_page import TopTradersPage
25
+ from chainstream.openapi_client.models.trade_page import TradePage
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 TradeApi:
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_activities(
47
+ self,
48
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
49
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
50
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="DTO.PAGE.LIMIT")] = None,
51
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
52
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")] = None,
53
+ wallet_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.WALLET_ADDRESS")] = None,
54
+ pool_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.POOL_ADDRESS")] = None,
55
+ before_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_TIMESTAMP")] = None,
56
+ after_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_TIMESTAMP")] = None,
57
+ before_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT")] = None,
58
+ after_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT")] = None,
59
+ transactions_signature: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE")] = None,
60
+ type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.ACTIVITIES_TYPE")] = None,
61
+ _request_timeout: Union[
62
+ None,
63
+ Annotated[StrictFloat, Field(gt=0)],
64
+ Tuple[
65
+ Annotated[StrictFloat, Field(gt=0)],
66
+ Annotated[StrictFloat, Field(gt=0)]
67
+ ]
68
+ ] = None,
69
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
70
+ _content_type: Optional[StrictStr] = None,
71
+ _headers: Optional[Dict[StrictStr, Any]] = None,
72
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
73
+ ) -> TradePage:
74
+ """CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
75
+
76
+ CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
77
+
78
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
79
+ :type chain: ChainSymbol
80
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
81
+ :type cursor: str
82
+ :param limit: DTO.PAGE.LIMIT
83
+ :type limit: float
84
+ :param direction: DTO.PAGE.DIRECTION
85
+ :type direction: str
86
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS
87
+ :type token_address: str
88
+ :param wallet_address: DTO.TRADE.QUERY.WALLET_ADDRESS
89
+ :type wallet_address: str
90
+ :param pool_address: DTO.TRADE.QUERY.POOL_ADDRESS
91
+ :type pool_address: str
92
+ :param before_timestamp: DTO.TRADE.QUERY.BEFORE_TIMESTAMP
93
+ :type before_timestamp: int
94
+ :param after_timestamp: DTO.TRADE.QUERY.AFTER_TIMESTAMP
95
+ :type after_timestamp: int
96
+ :param before_block_height: DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
97
+ :type before_block_height: int
98
+ :param after_block_height: DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
99
+ :type after_block_height: int
100
+ :param transactions_signature: DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE
101
+ :type transactions_signature: str
102
+ :param type: DTO.TRADE.QUERY.ACTIVITIES_TYPE
103
+ :type type: str
104
+ :param _request_timeout: timeout setting for this request. If one
105
+ number provided, it will be total request
106
+ timeout. It can also be a pair (tuple) of
107
+ (connection, read) timeouts.
108
+ :type _request_timeout: int, tuple(int, int), optional
109
+ :param _request_auth: set to override the auth_settings for an a single
110
+ request; this effectively ignores the
111
+ authentication in the spec for a single request.
112
+ :type _request_auth: dict, optional
113
+ :param _content_type: force content-type for the request.
114
+ :type _content_type: str, Optional
115
+ :param _headers: set to override the headers for a single
116
+ request; this effectively ignores the headers
117
+ in the spec for a single request.
118
+ :type _headers: dict, optional
119
+ :param _host_index: set to override the host_index for a single
120
+ request; this effectively ignores the host_index
121
+ in the spec for a single request.
122
+ :type _host_index: int, optional
123
+ :return: Returns the result object.
124
+ """ # noqa: E501
125
+
126
+ _param = self._get_activities_serialize(
127
+ chain=chain,
128
+ cursor=cursor,
129
+ limit=limit,
130
+ direction=direction,
131
+ token_address=token_address,
132
+ wallet_address=wallet_address,
133
+ pool_address=pool_address,
134
+ before_timestamp=before_timestamp,
135
+ after_timestamp=after_timestamp,
136
+ before_block_height=before_block_height,
137
+ after_block_height=after_block_height,
138
+ transactions_signature=transactions_signature,
139
+ type=type,
140
+ _request_auth=_request_auth,
141
+ _content_type=_content_type,
142
+ _headers=_headers,
143
+ _host_index=_host_index
144
+ )
145
+
146
+ _response_types_map: Dict[str, Optional[str]] = {
147
+ '200': "TradePage",
148
+ }
149
+ response_data = await self.api_client.call_api(
150
+ *_param,
151
+ _request_timeout=_request_timeout
152
+ )
153
+ await response_data.read()
154
+ return self.api_client.response_deserialize(
155
+ response_data=response_data,
156
+ response_types_map=_response_types_map,
157
+ ).data
158
+
159
+
160
+ @validate_call
161
+ async def get_activities_with_http_info(
162
+ self,
163
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
164
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
165
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="DTO.PAGE.LIMIT")] = None,
166
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
167
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")] = None,
168
+ wallet_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.WALLET_ADDRESS")] = None,
169
+ pool_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.POOL_ADDRESS")] = None,
170
+ before_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_TIMESTAMP")] = None,
171
+ after_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_TIMESTAMP")] = None,
172
+ before_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT")] = None,
173
+ after_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT")] = None,
174
+ transactions_signature: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE")] = None,
175
+ type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.ACTIVITIES_TYPE")] = None,
176
+ _request_timeout: Union[
177
+ None,
178
+ Annotated[StrictFloat, Field(gt=0)],
179
+ Tuple[
180
+ Annotated[StrictFloat, Field(gt=0)],
181
+ Annotated[StrictFloat, Field(gt=0)]
182
+ ]
183
+ ] = None,
184
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
185
+ _content_type: Optional[StrictStr] = None,
186
+ _headers: Optional[Dict[StrictStr, Any]] = None,
187
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
188
+ ) -> ApiResponse[TradePage]:
189
+ """CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
190
+
191
+ CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
192
+
193
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
194
+ :type chain: ChainSymbol
195
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
196
+ :type cursor: str
197
+ :param limit: DTO.PAGE.LIMIT
198
+ :type limit: float
199
+ :param direction: DTO.PAGE.DIRECTION
200
+ :type direction: str
201
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS
202
+ :type token_address: str
203
+ :param wallet_address: DTO.TRADE.QUERY.WALLET_ADDRESS
204
+ :type wallet_address: str
205
+ :param pool_address: DTO.TRADE.QUERY.POOL_ADDRESS
206
+ :type pool_address: str
207
+ :param before_timestamp: DTO.TRADE.QUERY.BEFORE_TIMESTAMP
208
+ :type before_timestamp: int
209
+ :param after_timestamp: DTO.TRADE.QUERY.AFTER_TIMESTAMP
210
+ :type after_timestamp: int
211
+ :param before_block_height: DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
212
+ :type before_block_height: int
213
+ :param after_block_height: DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
214
+ :type after_block_height: int
215
+ :param transactions_signature: DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE
216
+ :type transactions_signature: str
217
+ :param type: DTO.TRADE.QUERY.ACTIVITIES_TYPE
218
+ :type type: str
219
+ :param _request_timeout: timeout setting for this request. If one
220
+ number provided, it will be total request
221
+ timeout. It can also be a pair (tuple) of
222
+ (connection, read) timeouts.
223
+ :type _request_timeout: int, tuple(int, int), optional
224
+ :param _request_auth: set to override the auth_settings for an a single
225
+ request; this effectively ignores the
226
+ authentication in the spec for a single request.
227
+ :type _request_auth: dict, optional
228
+ :param _content_type: force content-type for the request.
229
+ :type _content_type: str, Optional
230
+ :param _headers: set to override the headers for a single
231
+ request; this effectively ignores the headers
232
+ in the spec for a single request.
233
+ :type _headers: dict, optional
234
+ :param _host_index: set to override the host_index for a single
235
+ request; this effectively ignores the host_index
236
+ in the spec for a single request.
237
+ :type _host_index: int, optional
238
+ :return: Returns the result object.
239
+ """ # noqa: E501
240
+
241
+ _param = self._get_activities_serialize(
242
+ chain=chain,
243
+ cursor=cursor,
244
+ limit=limit,
245
+ direction=direction,
246
+ token_address=token_address,
247
+ wallet_address=wallet_address,
248
+ pool_address=pool_address,
249
+ before_timestamp=before_timestamp,
250
+ after_timestamp=after_timestamp,
251
+ before_block_height=before_block_height,
252
+ after_block_height=after_block_height,
253
+ transactions_signature=transactions_signature,
254
+ type=type,
255
+ _request_auth=_request_auth,
256
+ _content_type=_content_type,
257
+ _headers=_headers,
258
+ _host_index=_host_index
259
+ )
260
+
261
+ _response_types_map: Dict[str, Optional[str]] = {
262
+ '200': "TradePage",
263
+ }
264
+ response_data = await self.api_client.call_api(
265
+ *_param,
266
+ _request_timeout=_request_timeout
267
+ )
268
+ await response_data.read()
269
+ return self.api_client.response_deserialize(
270
+ response_data=response_data,
271
+ response_types_map=_response_types_map,
272
+ )
273
+
274
+
275
+ @validate_call
276
+ async def get_activities_without_preload_content(
277
+ self,
278
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
279
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
280
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="DTO.PAGE.LIMIT")] = None,
281
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
282
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")] = None,
283
+ wallet_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.WALLET_ADDRESS")] = None,
284
+ pool_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.POOL_ADDRESS")] = None,
285
+ before_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_TIMESTAMP")] = None,
286
+ after_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_TIMESTAMP")] = None,
287
+ before_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT")] = None,
288
+ after_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT")] = None,
289
+ transactions_signature: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE")] = None,
290
+ type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.ACTIVITIES_TYPE")] = None,
291
+ _request_timeout: Union[
292
+ None,
293
+ Annotated[StrictFloat, Field(gt=0)],
294
+ Tuple[
295
+ Annotated[StrictFloat, Field(gt=0)],
296
+ Annotated[StrictFloat, Field(gt=0)]
297
+ ]
298
+ ] = None,
299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
300
+ _content_type: Optional[StrictStr] = None,
301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
303
+ ) -> RESTResponseType:
304
+ """CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
305
+
306
+ CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
307
+
308
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
309
+ :type chain: ChainSymbol
310
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
311
+ :type cursor: str
312
+ :param limit: DTO.PAGE.LIMIT
313
+ :type limit: float
314
+ :param direction: DTO.PAGE.DIRECTION
315
+ :type direction: str
316
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS
317
+ :type token_address: str
318
+ :param wallet_address: DTO.TRADE.QUERY.WALLET_ADDRESS
319
+ :type wallet_address: str
320
+ :param pool_address: DTO.TRADE.QUERY.POOL_ADDRESS
321
+ :type pool_address: str
322
+ :param before_timestamp: DTO.TRADE.QUERY.BEFORE_TIMESTAMP
323
+ :type before_timestamp: int
324
+ :param after_timestamp: DTO.TRADE.QUERY.AFTER_TIMESTAMP
325
+ :type after_timestamp: int
326
+ :param before_block_height: DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
327
+ :type before_block_height: int
328
+ :param after_block_height: DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
329
+ :type after_block_height: int
330
+ :param transactions_signature: DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE
331
+ :type transactions_signature: str
332
+ :param type: DTO.TRADE.QUERY.ACTIVITIES_TYPE
333
+ :type type: str
334
+ :param _request_timeout: timeout setting for this request. If one
335
+ number provided, it will be total request
336
+ timeout. It can also be a pair (tuple) of
337
+ (connection, read) timeouts.
338
+ :type _request_timeout: int, tuple(int, int), optional
339
+ :param _request_auth: set to override the auth_settings for an a single
340
+ request; this effectively ignores the
341
+ authentication in the spec for a single request.
342
+ :type _request_auth: dict, optional
343
+ :param _content_type: force content-type for the request.
344
+ :type _content_type: str, Optional
345
+ :param _headers: set to override the headers for a single
346
+ request; this effectively ignores the headers
347
+ in the spec for a single request.
348
+ :type _headers: dict, optional
349
+ :param _host_index: set to override the host_index for a single
350
+ request; this effectively ignores the host_index
351
+ in the spec for a single request.
352
+ :type _host_index: int, optional
353
+ :return: Returns the result object.
354
+ """ # noqa: E501
355
+
356
+ _param = self._get_activities_serialize(
357
+ chain=chain,
358
+ cursor=cursor,
359
+ limit=limit,
360
+ direction=direction,
361
+ token_address=token_address,
362
+ wallet_address=wallet_address,
363
+ pool_address=pool_address,
364
+ before_timestamp=before_timestamp,
365
+ after_timestamp=after_timestamp,
366
+ before_block_height=before_block_height,
367
+ after_block_height=after_block_height,
368
+ transactions_signature=transactions_signature,
369
+ type=type,
370
+ _request_auth=_request_auth,
371
+ _content_type=_content_type,
372
+ _headers=_headers,
373
+ _host_index=_host_index
374
+ )
375
+
376
+ _response_types_map: Dict[str, Optional[str]] = {
377
+ '200': "TradePage",
378
+ }
379
+ response_data = await self.api_client.call_api(
380
+ *_param,
381
+ _request_timeout=_request_timeout
382
+ )
383
+ return response_data.response
384
+
385
+
386
+ def _get_activities_serialize(
387
+ self,
388
+ chain,
389
+ cursor,
390
+ limit,
391
+ direction,
392
+ token_address,
393
+ wallet_address,
394
+ pool_address,
395
+ before_timestamp,
396
+ after_timestamp,
397
+ before_block_height,
398
+ after_block_height,
399
+ transactions_signature,
400
+ type,
401
+ _request_auth,
402
+ _content_type,
403
+ _headers,
404
+ _host_index,
405
+ ) -> RequestSerialized:
406
+
407
+ _host = None
408
+
409
+ _collection_formats: Dict[str, str] = {
410
+ }
411
+
412
+ _path_params: Dict[str, str] = {}
413
+ _query_params: List[Tuple[str, str]] = []
414
+ _header_params: Dict[str, Optional[str]] = _headers or {}
415
+ _form_params: List[Tuple[str, str]] = []
416
+ _files: Dict[
417
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
418
+ ] = {}
419
+ _body_params: Optional[bytes] = None
420
+
421
+ # process the path parameters
422
+ if chain is not None:
423
+ _path_params['chain'] = chain.value
424
+ # process the query parameters
425
+ if cursor is not None:
426
+
427
+ _query_params.append(('cursor', cursor))
428
+
429
+ if limit is not None:
430
+
431
+ _query_params.append(('limit', limit))
432
+
433
+ if direction is not None:
434
+
435
+ _query_params.append(('direction', direction))
436
+
437
+ if token_address is not None:
438
+
439
+ _query_params.append(('tokenAddress', token_address))
440
+
441
+ if wallet_address is not None:
442
+
443
+ _query_params.append(('walletAddress', wallet_address))
444
+
445
+ if pool_address is not None:
446
+
447
+ _query_params.append(('poolAddress', pool_address))
448
+
449
+ if before_timestamp is not None:
450
+
451
+ _query_params.append(('beforeTimestamp', before_timestamp))
452
+
453
+ if after_timestamp is not None:
454
+
455
+ _query_params.append(('afterTimestamp', after_timestamp))
456
+
457
+ if before_block_height is not None:
458
+
459
+ _query_params.append(('beforeBlockHeight', before_block_height))
460
+
461
+ if after_block_height is not None:
462
+
463
+ _query_params.append(('afterBlockHeight', after_block_height))
464
+
465
+ if transactions_signature is not None:
466
+
467
+ _query_params.append(('transactionsSignature', transactions_signature))
468
+
469
+ if type is not None:
470
+
471
+ _query_params.append(('type', type))
472
+
473
+ # process the header parameters
474
+ # process the form parameters
475
+ # process the body parameter
476
+
477
+
478
+ # set the HTTP header `Accept`
479
+ if 'Accept' not in _header_params:
480
+ _header_params['Accept'] = self.api_client.select_header_accept(
481
+ [
482
+ 'application/json'
483
+ ]
484
+ )
485
+
486
+
487
+ # authentication setting
488
+ _auth_settings: List[str] = [
489
+ 'bearer'
490
+ ]
491
+
492
+ return self.api_client.param_serialize(
493
+ method='GET',
494
+ resource_path='/v1/trade/{chain}/activities',
495
+ path_params=_path_params,
496
+ query_params=_query_params,
497
+ header_params=_header_params,
498
+ body=_body_params,
499
+ post_params=_form_params,
500
+ files=_files,
501
+ auth_settings=_auth_settings,
502
+ collection_formats=_collection_formats,
503
+ _host=_host,
504
+ _request_auth=_request_auth
505
+ )
506
+
507
+
508
+
509
+
510
+ @validate_call
511
+ async def get_top_traders(
512
+ self,
513
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
514
+ token_address: Annotated[StrictStr, Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")],
515
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
516
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.TRADE.QUERY.LIMIT")] = None,
517
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
518
+ time_frame: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TIME_FRAME")] = None,
519
+ sort_type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.SORT_TYPE")] = None,
520
+ sort_by: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.SORT_BY")] = None,
521
+ _request_timeout: Union[
522
+ None,
523
+ Annotated[StrictFloat, Field(gt=0)],
524
+ Tuple[
525
+ Annotated[StrictFloat, Field(gt=0)],
526
+ Annotated[StrictFloat, Field(gt=0)]
527
+ ]
528
+ ] = None,
529
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
530
+ _content_type: Optional[StrictStr] = None,
531
+ _headers: Optional[Dict[StrictStr, Any]] = None,
532
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
533
+ ) -> TopTradersPage:
534
+ """CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
535
+
536
+ CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
537
+
538
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
539
+ :type chain: ChainSymbol
540
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS (required)
541
+ :type token_address: str
542
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
543
+ :type cursor: str
544
+ :param limit: DTO.TRADE.QUERY.LIMIT
545
+ :type limit: int
546
+ :param direction: DTO.PAGE.DIRECTION
547
+ :type direction: str
548
+ :param time_frame: DTO.TRADE.QUERY.TIME_FRAME
549
+ :type time_frame: str
550
+ :param sort_type: DTO.TRADE.QUERY.SORT_TYPE
551
+ :type sort_type: str
552
+ :param sort_by: DTO.TRADE.QUERY.SORT_BY
553
+ :type sort_by: str
554
+ :param _request_timeout: timeout setting for this request. If one
555
+ number provided, it will be total request
556
+ timeout. It can also be a pair (tuple) of
557
+ (connection, read) timeouts.
558
+ :type _request_timeout: int, tuple(int, int), optional
559
+ :param _request_auth: set to override the auth_settings for an a single
560
+ request; this effectively ignores the
561
+ authentication in the spec for a single request.
562
+ :type _request_auth: dict, optional
563
+ :param _content_type: force content-type for the request.
564
+ :type _content_type: str, Optional
565
+ :param _headers: set to override the headers for a single
566
+ request; this effectively ignores the headers
567
+ in the spec for a single request.
568
+ :type _headers: dict, optional
569
+ :param _host_index: set to override the host_index for a single
570
+ request; this effectively ignores the host_index
571
+ in the spec for a single request.
572
+ :type _host_index: int, optional
573
+ :return: Returns the result object.
574
+ """ # noqa: E501
575
+
576
+ _param = self._get_top_traders_serialize(
577
+ chain=chain,
578
+ token_address=token_address,
579
+ cursor=cursor,
580
+ limit=limit,
581
+ direction=direction,
582
+ time_frame=time_frame,
583
+ sort_type=sort_type,
584
+ sort_by=sort_by,
585
+ _request_auth=_request_auth,
586
+ _content_type=_content_type,
587
+ _headers=_headers,
588
+ _host_index=_host_index
589
+ )
590
+
591
+ _response_types_map: Dict[str, Optional[str]] = {
592
+ '200': "TopTradersPage",
593
+ }
594
+ response_data = await self.api_client.call_api(
595
+ *_param,
596
+ _request_timeout=_request_timeout
597
+ )
598
+ await response_data.read()
599
+ return self.api_client.response_deserialize(
600
+ response_data=response_data,
601
+ response_types_map=_response_types_map,
602
+ ).data
603
+
604
+
605
+ @validate_call
606
+ async def get_top_traders_with_http_info(
607
+ self,
608
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
609
+ token_address: Annotated[StrictStr, Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")],
610
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
611
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.TRADE.QUERY.LIMIT")] = None,
612
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
613
+ time_frame: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TIME_FRAME")] = None,
614
+ sort_type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.SORT_TYPE")] = None,
615
+ sort_by: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.SORT_BY")] = None,
616
+ _request_timeout: Union[
617
+ None,
618
+ Annotated[StrictFloat, Field(gt=0)],
619
+ Tuple[
620
+ Annotated[StrictFloat, Field(gt=0)],
621
+ Annotated[StrictFloat, Field(gt=0)]
622
+ ]
623
+ ] = None,
624
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
625
+ _content_type: Optional[StrictStr] = None,
626
+ _headers: Optional[Dict[StrictStr, Any]] = None,
627
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
628
+ ) -> ApiResponse[TopTradersPage]:
629
+ """CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
630
+
631
+ CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
632
+
633
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
634
+ :type chain: ChainSymbol
635
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS (required)
636
+ :type token_address: str
637
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
638
+ :type cursor: str
639
+ :param limit: DTO.TRADE.QUERY.LIMIT
640
+ :type limit: int
641
+ :param direction: DTO.PAGE.DIRECTION
642
+ :type direction: str
643
+ :param time_frame: DTO.TRADE.QUERY.TIME_FRAME
644
+ :type time_frame: str
645
+ :param sort_type: DTO.TRADE.QUERY.SORT_TYPE
646
+ :type sort_type: str
647
+ :param sort_by: DTO.TRADE.QUERY.SORT_BY
648
+ :type sort_by: str
649
+ :param _request_timeout: timeout setting for this request. If one
650
+ number provided, it will be total request
651
+ timeout. It can also be a pair (tuple) of
652
+ (connection, read) timeouts.
653
+ :type _request_timeout: int, tuple(int, int), optional
654
+ :param _request_auth: set to override the auth_settings for an a single
655
+ request; this effectively ignores the
656
+ authentication in the spec for a single request.
657
+ :type _request_auth: dict, optional
658
+ :param _content_type: force content-type for the request.
659
+ :type _content_type: str, Optional
660
+ :param _headers: set to override the headers for a single
661
+ request; this effectively ignores the headers
662
+ in the spec for a single request.
663
+ :type _headers: dict, optional
664
+ :param _host_index: set to override the host_index for a single
665
+ request; this effectively ignores the host_index
666
+ in the spec for a single request.
667
+ :type _host_index: int, optional
668
+ :return: Returns the result object.
669
+ """ # noqa: E501
670
+
671
+ _param = self._get_top_traders_serialize(
672
+ chain=chain,
673
+ token_address=token_address,
674
+ cursor=cursor,
675
+ limit=limit,
676
+ direction=direction,
677
+ time_frame=time_frame,
678
+ sort_type=sort_type,
679
+ sort_by=sort_by,
680
+ _request_auth=_request_auth,
681
+ _content_type=_content_type,
682
+ _headers=_headers,
683
+ _host_index=_host_index
684
+ )
685
+
686
+ _response_types_map: Dict[str, Optional[str]] = {
687
+ '200': "TopTradersPage",
688
+ }
689
+ response_data = await self.api_client.call_api(
690
+ *_param,
691
+ _request_timeout=_request_timeout
692
+ )
693
+ await response_data.read()
694
+ return self.api_client.response_deserialize(
695
+ response_data=response_data,
696
+ response_types_map=_response_types_map,
697
+ )
698
+
699
+
700
+ @validate_call
701
+ async def get_top_traders_without_preload_content(
702
+ self,
703
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
704
+ token_address: Annotated[StrictStr, Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")],
705
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
706
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.TRADE.QUERY.LIMIT")] = None,
707
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
708
+ time_frame: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TIME_FRAME")] = None,
709
+ sort_type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.SORT_TYPE")] = None,
710
+ sort_by: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.SORT_BY")] = None,
711
+ _request_timeout: Union[
712
+ None,
713
+ Annotated[StrictFloat, Field(gt=0)],
714
+ Tuple[
715
+ Annotated[StrictFloat, Field(gt=0)],
716
+ Annotated[StrictFloat, Field(gt=0)]
717
+ ]
718
+ ] = None,
719
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
720
+ _content_type: Optional[StrictStr] = None,
721
+ _headers: Optional[Dict[StrictStr, Any]] = None,
722
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
+ ) -> RESTResponseType:
724
+ """CONTROLLER.TRADE.GET.TOP_TRADERS.SUMMARY
725
+
726
+ CONTROLLER.TRADE.GET.TOP_TRADERS.DESCRIPTION
727
+
728
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
729
+ :type chain: ChainSymbol
730
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS (required)
731
+ :type token_address: str
732
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
733
+ :type cursor: str
734
+ :param limit: DTO.TRADE.QUERY.LIMIT
735
+ :type limit: int
736
+ :param direction: DTO.PAGE.DIRECTION
737
+ :type direction: str
738
+ :param time_frame: DTO.TRADE.QUERY.TIME_FRAME
739
+ :type time_frame: str
740
+ :param sort_type: DTO.TRADE.QUERY.SORT_TYPE
741
+ :type sort_type: str
742
+ :param sort_by: DTO.TRADE.QUERY.SORT_BY
743
+ :type sort_by: str
744
+ :param _request_timeout: timeout setting for this request. If one
745
+ number provided, it will be total request
746
+ timeout. It can also be a pair (tuple) of
747
+ (connection, read) timeouts.
748
+ :type _request_timeout: int, tuple(int, int), optional
749
+ :param _request_auth: set to override the auth_settings for an a single
750
+ request; this effectively ignores the
751
+ authentication in the spec for a single request.
752
+ :type _request_auth: dict, optional
753
+ :param _content_type: force content-type for the request.
754
+ :type _content_type: str, Optional
755
+ :param _headers: set to override the headers for a single
756
+ request; this effectively ignores the headers
757
+ in the spec for a single request.
758
+ :type _headers: dict, optional
759
+ :param _host_index: set to override the host_index for a single
760
+ request; this effectively ignores the host_index
761
+ in the spec for a single request.
762
+ :type _host_index: int, optional
763
+ :return: Returns the result object.
764
+ """ # noqa: E501
765
+
766
+ _param = self._get_top_traders_serialize(
767
+ chain=chain,
768
+ token_address=token_address,
769
+ cursor=cursor,
770
+ limit=limit,
771
+ direction=direction,
772
+ time_frame=time_frame,
773
+ sort_type=sort_type,
774
+ sort_by=sort_by,
775
+ _request_auth=_request_auth,
776
+ _content_type=_content_type,
777
+ _headers=_headers,
778
+ _host_index=_host_index
779
+ )
780
+
781
+ _response_types_map: Dict[str, Optional[str]] = {
782
+ '200': "TopTradersPage",
783
+ }
784
+ response_data = await self.api_client.call_api(
785
+ *_param,
786
+ _request_timeout=_request_timeout
787
+ )
788
+ return response_data.response
789
+
790
+
791
+ def _get_top_traders_serialize(
792
+ self,
793
+ chain,
794
+ token_address,
795
+ cursor,
796
+ limit,
797
+ direction,
798
+ time_frame,
799
+ sort_type,
800
+ sort_by,
801
+ _request_auth,
802
+ _content_type,
803
+ _headers,
804
+ _host_index,
805
+ ) -> RequestSerialized:
806
+
807
+ _host = None
808
+
809
+ _collection_formats: Dict[str, str] = {
810
+ }
811
+
812
+ _path_params: Dict[str, str] = {}
813
+ _query_params: List[Tuple[str, str]] = []
814
+ _header_params: Dict[str, Optional[str]] = _headers or {}
815
+ _form_params: List[Tuple[str, str]] = []
816
+ _files: Dict[
817
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
818
+ ] = {}
819
+ _body_params: Optional[bytes] = None
820
+
821
+ # process the path parameters
822
+ if chain is not None:
823
+ _path_params['chain'] = chain.value
824
+ # process the query parameters
825
+ if cursor is not None:
826
+
827
+ _query_params.append(('cursor', cursor))
828
+
829
+ if limit is not None:
830
+
831
+ _query_params.append(('limit', limit))
832
+
833
+ if direction is not None:
834
+
835
+ _query_params.append(('direction', direction))
836
+
837
+ if token_address is not None:
838
+
839
+ _query_params.append(('tokenAddress', token_address))
840
+
841
+ if time_frame is not None:
842
+
843
+ _query_params.append(('timeFrame', time_frame))
844
+
845
+ if sort_type is not None:
846
+
847
+ _query_params.append(('sortType', sort_type))
848
+
849
+ if sort_by is not None:
850
+
851
+ _query_params.append(('sortBy', sort_by))
852
+
853
+ # process the header parameters
854
+ # process the form parameters
855
+ # process the body parameter
856
+
857
+
858
+ # set the HTTP header `Accept`
859
+ if 'Accept' not in _header_params:
860
+ _header_params['Accept'] = self.api_client.select_header_accept(
861
+ [
862
+ 'application/json'
863
+ ]
864
+ )
865
+
866
+
867
+ # authentication setting
868
+ _auth_settings: List[str] = [
869
+ 'bearer'
870
+ ]
871
+
872
+ return self.api_client.param_serialize(
873
+ method='GET',
874
+ resource_path='/v1/trade/{chain}/top-traders',
875
+ path_params=_path_params,
876
+ query_params=_query_params,
877
+ header_params=_header_params,
878
+ body=_body_params,
879
+ post_params=_form_params,
880
+ files=_files,
881
+ auth_settings=_auth_settings,
882
+ collection_formats=_collection_formats,
883
+ _host=_host,
884
+ _request_auth=_request_auth
885
+ )
886
+
887
+
888
+
889
+
890
+ @validate_call
891
+ async def get_trades(
892
+ self,
893
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
894
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
895
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="DTO.PAGE.LIMIT")] = None,
896
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
897
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")] = None,
898
+ wallet_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.WALLET_ADDRESS")] = None,
899
+ pool_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.POOL_ADDRESS")] = None,
900
+ before_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_TIMESTAMP")] = None,
901
+ after_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_TIMESTAMP")] = None,
902
+ before_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT")] = None,
903
+ after_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT")] = None,
904
+ transactions_signature: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE")] = None,
905
+ type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRADES_TYPE")] = None,
906
+ _request_timeout: Union[
907
+ None,
908
+ Annotated[StrictFloat, Field(gt=0)],
909
+ Tuple[
910
+ Annotated[StrictFloat, Field(gt=0)],
911
+ Annotated[StrictFloat, Field(gt=0)]
912
+ ]
913
+ ] = None,
914
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
915
+ _content_type: Optional[StrictStr] = None,
916
+ _headers: Optional[Dict[StrictStr, Any]] = None,
917
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
918
+ ) -> TradePage:
919
+ """CONTROLLER.TRADE.GET.TOKEN.SUMMARY
920
+
921
+ CONTROLLER.TRADE.GET.TOKEN.DESCRIPTION
922
+
923
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
924
+ :type chain: ChainSymbol
925
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
926
+ :type cursor: str
927
+ :param limit: DTO.PAGE.LIMIT
928
+ :type limit: float
929
+ :param direction: DTO.PAGE.DIRECTION
930
+ :type direction: str
931
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS
932
+ :type token_address: str
933
+ :param wallet_address: DTO.TRADE.QUERY.WALLET_ADDRESS
934
+ :type wallet_address: str
935
+ :param pool_address: DTO.TRADE.QUERY.POOL_ADDRESS
936
+ :type pool_address: str
937
+ :param before_timestamp: DTO.TRADE.QUERY.BEFORE_TIMESTAMP
938
+ :type before_timestamp: int
939
+ :param after_timestamp: DTO.TRADE.QUERY.AFTER_TIMESTAMP
940
+ :type after_timestamp: int
941
+ :param before_block_height: DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
942
+ :type before_block_height: int
943
+ :param after_block_height: DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
944
+ :type after_block_height: int
945
+ :param transactions_signature: DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE
946
+ :type transactions_signature: str
947
+ :param type: DTO.TRADE.QUERY.TRADES_TYPE
948
+ :type type: str
949
+ :param _request_timeout: timeout setting for this request. If one
950
+ number provided, it will be total request
951
+ timeout. It can also be a pair (tuple) of
952
+ (connection, read) timeouts.
953
+ :type _request_timeout: int, tuple(int, int), optional
954
+ :param _request_auth: set to override the auth_settings for an a single
955
+ request; this effectively ignores the
956
+ authentication in the spec for a single request.
957
+ :type _request_auth: dict, optional
958
+ :param _content_type: force content-type for the request.
959
+ :type _content_type: str, Optional
960
+ :param _headers: set to override the headers for a single
961
+ request; this effectively ignores the headers
962
+ in the spec for a single request.
963
+ :type _headers: dict, optional
964
+ :param _host_index: set to override the host_index for a single
965
+ request; this effectively ignores the host_index
966
+ in the spec for a single request.
967
+ :type _host_index: int, optional
968
+ :return: Returns the result object.
969
+ """ # noqa: E501
970
+
971
+ _param = self._get_trades_serialize(
972
+ chain=chain,
973
+ cursor=cursor,
974
+ limit=limit,
975
+ direction=direction,
976
+ token_address=token_address,
977
+ wallet_address=wallet_address,
978
+ pool_address=pool_address,
979
+ before_timestamp=before_timestamp,
980
+ after_timestamp=after_timestamp,
981
+ before_block_height=before_block_height,
982
+ after_block_height=after_block_height,
983
+ transactions_signature=transactions_signature,
984
+ type=type,
985
+ _request_auth=_request_auth,
986
+ _content_type=_content_type,
987
+ _headers=_headers,
988
+ _host_index=_host_index
989
+ )
990
+
991
+ _response_types_map: Dict[str, Optional[str]] = {
992
+ '200': "TradePage",
993
+ }
994
+ response_data = await self.api_client.call_api(
995
+ *_param,
996
+ _request_timeout=_request_timeout
997
+ )
998
+ await response_data.read()
999
+ return self.api_client.response_deserialize(
1000
+ response_data=response_data,
1001
+ response_types_map=_response_types_map,
1002
+ ).data
1003
+
1004
+
1005
+ @validate_call
1006
+ async def get_trades_with_http_info(
1007
+ self,
1008
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1009
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
1010
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="DTO.PAGE.LIMIT")] = None,
1011
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
1012
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")] = None,
1013
+ wallet_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.WALLET_ADDRESS")] = None,
1014
+ pool_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.POOL_ADDRESS")] = None,
1015
+ before_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_TIMESTAMP")] = None,
1016
+ after_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_TIMESTAMP")] = None,
1017
+ before_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT")] = None,
1018
+ after_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT")] = None,
1019
+ transactions_signature: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE")] = None,
1020
+ type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRADES_TYPE")] = None,
1021
+ _request_timeout: Union[
1022
+ None,
1023
+ Annotated[StrictFloat, Field(gt=0)],
1024
+ Tuple[
1025
+ Annotated[StrictFloat, Field(gt=0)],
1026
+ Annotated[StrictFloat, Field(gt=0)]
1027
+ ]
1028
+ ] = None,
1029
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1030
+ _content_type: Optional[StrictStr] = None,
1031
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1032
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1033
+ ) -> ApiResponse[TradePage]:
1034
+ """CONTROLLER.TRADE.GET.TOKEN.SUMMARY
1035
+
1036
+ CONTROLLER.TRADE.GET.TOKEN.DESCRIPTION
1037
+
1038
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1039
+ :type chain: ChainSymbol
1040
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
1041
+ :type cursor: str
1042
+ :param limit: DTO.PAGE.LIMIT
1043
+ :type limit: float
1044
+ :param direction: DTO.PAGE.DIRECTION
1045
+ :type direction: str
1046
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS
1047
+ :type token_address: str
1048
+ :param wallet_address: DTO.TRADE.QUERY.WALLET_ADDRESS
1049
+ :type wallet_address: str
1050
+ :param pool_address: DTO.TRADE.QUERY.POOL_ADDRESS
1051
+ :type pool_address: str
1052
+ :param before_timestamp: DTO.TRADE.QUERY.BEFORE_TIMESTAMP
1053
+ :type before_timestamp: int
1054
+ :param after_timestamp: DTO.TRADE.QUERY.AFTER_TIMESTAMP
1055
+ :type after_timestamp: int
1056
+ :param before_block_height: DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
1057
+ :type before_block_height: int
1058
+ :param after_block_height: DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
1059
+ :type after_block_height: int
1060
+ :param transactions_signature: DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE
1061
+ :type transactions_signature: str
1062
+ :param type: DTO.TRADE.QUERY.TRADES_TYPE
1063
+ :type type: str
1064
+ :param _request_timeout: timeout setting for this request. If one
1065
+ number provided, it will be total request
1066
+ timeout. It can also be a pair (tuple) of
1067
+ (connection, read) timeouts.
1068
+ :type _request_timeout: int, tuple(int, int), optional
1069
+ :param _request_auth: set to override the auth_settings for an a single
1070
+ request; this effectively ignores the
1071
+ authentication in the spec for a single request.
1072
+ :type _request_auth: dict, optional
1073
+ :param _content_type: force content-type for the request.
1074
+ :type _content_type: str, Optional
1075
+ :param _headers: set to override the headers for a single
1076
+ request; this effectively ignores the headers
1077
+ in the spec for a single request.
1078
+ :type _headers: dict, optional
1079
+ :param _host_index: set to override the host_index for a single
1080
+ request; this effectively ignores the host_index
1081
+ in the spec for a single request.
1082
+ :type _host_index: int, optional
1083
+ :return: Returns the result object.
1084
+ """ # noqa: E501
1085
+
1086
+ _param = self._get_trades_serialize(
1087
+ chain=chain,
1088
+ cursor=cursor,
1089
+ limit=limit,
1090
+ direction=direction,
1091
+ token_address=token_address,
1092
+ wallet_address=wallet_address,
1093
+ pool_address=pool_address,
1094
+ before_timestamp=before_timestamp,
1095
+ after_timestamp=after_timestamp,
1096
+ before_block_height=before_block_height,
1097
+ after_block_height=after_block_height,
1098
+ transactions_signature=transactions_signature,
1099
+ type=type,
1100
+ _request_auth=_request_auth,
1101
+ _content_type=_content_type,
1102
+ _headers=_headers,
1103
+ _host_index=_host_index
1104
+ )
1105
+
1106
+ _response_types_map: Dict[str, Optional[str]] = {
1107
+ '200': "TradePage",
1108
+ }
1109
+ response_data = await self.api_client.call_api(
1110
+ *_param,
1111
+ _request_timeout=_request_timeout
1112
+ )
1113
+ await response_data.read()
1114
+ return self.api_client.response_deserialize(
1115
+ response_data=response_data,
1116
+ response_types_map=_response_types_map,
1117
+ )
1118
+
1119
+
1120
+ @validate_call
1121
+ async def get_trades_without_preload_content(
1122
+ self,
1123
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1124
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR.DESCRIPTION")] = None,
1125
+ limit: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="DTO.PAGE.LIMIT")] = None,
1126
+ direction: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.DIRECTION")] = None,
1127
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TOKEN_ADDRESS")] = None,
1128
+ wallet_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.WALLET_ADDRESS")] = None,
1129
+ pool_address: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.POOL_ADDRESS")] = None,
1130
+ before_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_TIMESTAMP")] = None,
1131
+ after_timestamp: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_TIMESTAMP")] = None,
1132
+ before_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT")] = None,
1133
+ after_block_height: Annotated[Optional[StrictInt], Field(description="DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT")] = None,
1134
+ transactions_signature: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE")] = None,
1135
+ type: Annotated[Optional[StrictStr], Field(description="DTO.TRADE.QUERY.TRADES_TYPE")] = None,
1136
+ _request_timeout: Union[
1137
+ None,
1138
+ Annotated[StrictFloat, Field(gt=0)],
1139
+ Tuple[
1140
+ Annotated[StrictFloat, Field(gt=0)],
1141
+ Annotated[StrictFloat, Field(gt=0)]
1142
+ ]
1143
+ ] = None,
1144
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1145
+ _content_type: Optional[StrictStr] = None,
1146
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1147
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1148
+ ) -> RESTResponseType:
1149
+ """CONTROLLER.TRADE.GET.TOKEN.SUMMARY
1150
+
1151
+ CONTROLLER.TRADE.GET.TOKEN.DESCRIPTION
1152
+
1153
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1154
+ :type chain: ChainSymbol
1155
+ :param cursor: DTO.PAGE.CURSOR.DESCRIPTION
1156
+ :type cursor: str
1157
+ :param limit: DTO.PAGE.LIMIT
1158
+ :type limit: float
1159
+ :param direction: DTO.PAGE.DIRECTION
1160
+ :type direction: str
1161
+ :param token_address: DTO.TRADE.QUERY.TOKEN_ADDRESS
1162
+ :type token_address: str
1163
+ :param wallet_address: DTO.TRADE.QUERY.WALLET_ADDRESS
1164
+ :type wallet_address: str
1165
+ :param pool_address: DTO.TRADE.QUERY.POOL_ADDRESS
1166
+ :type pool_address: str
1167
+ :param before_timestamp: DTO.TRADE.QUERY.BEFORE_TIMESTAMP
1168
+ :type before_timestamp: int
1169
+ :param after_timestamp: DTO.TRADE.QUERY.AFTER_TIMESTAMP
1170
+ :type after_timestamp: int
1171
+ :param before_block_height: DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
1172
+ :type before_block_height: int
1173
+ :param after_block_height: DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
1174
+ :type after_block_height: int
1175
+ :param transactions_signature: DTO.TRADE.QUERY.TRANSACTIONS_SIGNATURE
1176
+ :type transactions_signature: str
1177
+ :param type: DTO.TRADE.QUERY.TRADES_TYPE
1178
+ :type type: str
1179
+ :param _request_timeout: timeout setting for this request. If one
1180
+ number provided, it will be total request
1181
+ timeout. It can also be a pair (tuple) of
1182
+ (connection, read) timeouts.
1183
+ :type _request_timeout: int, tuple(int, int), optional
1184
+ :param _request_auth: set to override the auth_settings for an a single
1185
+ request; this effectively ignores the
1186
+ authentication in the spec for a single request.
1187
+ :type _request_auth: dict, optional
1188
+ :param _content_type: force content-type for the request.
1189
+ :type _content_type: str, Optional
1190
+ :param _headers: set to override the headers for a single
1191
+ request; this effectively ignores the headers
1192
+ in the spec for a single request.
1193
+ :type _headers: dict, optional
1194
+ :param _host_index: set to override the host_index for a single
1195
+ request; this effectively ignores the host_index
1196
+ in the spec for a single request.
1197
+ :type _host_index: int, optional
1198
+ :return: Returns the result object.
1199
+ """ # noqa: E501
1200
+
1201
+ _param = self._get_trades_serialize(
1202
+ chain=chain,
1203
+ cursor=cursor,
1204
+ limit=limit,
1205
+ direction=direction,
1206
+ token_address=token_address,
1207
+ wallet_address=wallet_address,
1208
+ pool_address=pool_address,
1209
+ before_timestamp=before_timestamp,
1210
+ after_timestamp=after_timestamp,
1211
+ before_block_height=before_block_height,
1212
+ after_block_height=after_block_height,
1213
+ transactions_signature=transactions_signature,
1214
+ type=type,
1215
+ _request_auth=_request_auth,
1216
+ _content_type=_content_type,
1217
+ _headers=_headers,
1218
+ _host_index=_host_index
1219
+ )
1220
+
1221
+ _response_types_map: Dict[str, Optional[str]] = {
1222
+ '200': "TradePage",
1223
+ }
1224
+ response_data = await self.api_client.call_api(
1225
+ *_param,
1226
+ _request_timeout=_request_timeout
1227
+ )
1228
+ return response_data.response
1229
+
1230
+
1231
+ def _get_trades_serialize(
1232
+ self,
1233
+ chain,
1234
+ cursor,
1235
+ limit,
1236
+ direction,
1237
+ token_address,
1238
+ wallet_address,
1239
+ pool_address,
1240
+ before_timestamp,
1241
+ after_timestamp,
1242
+ before_block_height,
1243
+ after_block_height,
1244
+ transactions_signature,
1245
+ type,
1246
+ _request_auth,
1247
+ _content_type,
1248
+ _headers,
1249
+ _host_index,
1250
+ ) -> RequestSerialized:
1251
+
1252
+ _host = None
1253
+
1254
+ _collection_formats: Dict[str, str] = {
1255
+ }
1256
+
1257
+ _path_params: Dict[str, str] = {}
1258
+ _query_params: List[Tuple[str, str]] = []
1259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1260
+ _form_params: List[Tuple[str, str]] = []
1261
+ _files: Dict[
1262
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1263
+ ] = {}
1264
+ _body_params: Optional[bytes] = None
1265
+
1266
+ # process the path parameters
1267
+ if chain is not None:
1268
+ _path_params['chain'] = chain.value
1269
+ # process the query parameters
1270
+ if cursor is not None:
1271
+
1272
+ _query_params.append(('cursor', cursor))
1273
+
1274
+ if limit is not None:
1275
+
1276
+ _query_params.append(('limit', limit))
1277
+
1278
+ if direction is not None:
1279
+
1280
+ _query_params.append(('direction', direction))
1281
+
1282
+ if token_address is not None:
1283
+
1284
+ _query_params.append(('tokenAddress', token_address))
1285
+
1286
+ if wallet_address is not None:
1287
+
1288
+ _query_params.append(('walletAddress', wallet_address))
1289
+
1290
+ if pool_address is not None:
1291
+
1292
+ _query_params.append(('poolAddress', pool_address))
1293
+
1294
+ if before_timestamp is not None:
1295
+
1296
+ _query_params.append(('beforeTimestamp', before_timestamp))
1297
+
1298
+ if after_timestamp is not None:
1299
+
1300
+ _query_params.append(('afterTimestamp', after_timestamp))
1301
+
1302
+ if before_block_height is not None:
1303
+
1304
+ _query_params.append(('beforeBlockHeight', before_block_height))
1305
+
1306
+ if after_block_height is not None:
1307
+
1308
+ _query_params.append(('afterBlockHeight', after_block_height))
1309
+
1310
+ if transactions_signature is not None:
1311
+
1312
+ _query_params.append(('transactionsSignature', transactions_signature))
1313
+
1314
+ if type is not None:
1315
+
1316
+ _query_params.append(('type', type))
1317
+
1318
+ # process the header parameters
1319
+ # process the form parameters
1320
+ # process the body parameter
1321
+
1322
+
1323
+ # set the HTTP header `Accept`
1324
+ if 'Accept' not in _header_params:
1325
+ _header_params['Accept'] = self.api_client.select_header_accept(
1326
+ [
1327
+ 'application/json'
1328
+ ]
1329
+ )
1330
+
1331
+
1332
+ # authentication setting
1333
+ _auth_settings: List[str] = [
1334
+ 'bearer'
1335
+ ]
1336
+
1337
+ return self.api_client.param_serialize(
1338
+ method='GET',
1339
+ resource_path='/v1/trade/{chain}',
1340
+ path_params=_path_params,
1341
+ query_params=_query_params,
1342
+ header_params=_header_params,
1343
+ body=_body_params,
1344
+ post_params=_form_params,
1345
+ files=_files,
1346
+ auth_settings=_auth_settings,
1347
+ collection_formats=_collection_formats,
1348
+ _host=_host,
1349
+ _request_auth=_request_auth
1350
+ )
1351
+
1352
+