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,1608 @@
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 List, Optional
22
+ from typing_extensions import Annotated
23
+ from chainstream.openapi_client.models.balance_change_type import BalanceChangeType
24
+ from chainstream.openapi_client.models.balance_token_type import BalanceTokenType
25
+ from chainstream.openapi_client.models.balance_update_page import BalanceUpdatePage
26
+ from chainstream.openapi_client.models.boolean_result_dto import BooleanResultDTO
27
+ from chainstream.openapi_client.models.calculate_pnl_input import CalculatePnlInput
28
+ from chainstream.openapi_client.models.chain_symbol import ChainSymbol
29
+ from chainstream.openapi_client.models.wallet_balances_dto import WalletBalancesDTO
30
+ from chainstream.openapi_client.models.wallet_pnl_dto import WalletPnlDTO
31
+
32
+ from chainstream.openapi_client.api_client import ApiClient, RequestSerialized
33
+ from chainstream.openapi_client.api_response import ApiResponse
34
+ from chainstream.openapi_client.rest import RESTResponseType
35
+
36
+
37
+ class WalletApi:
38
+ """NOTE: This class is auto generated by OpenAPI Generator
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+ """
43
+
44
+ def __init__(self, api_client=None) -> None:
45
+ if api_client is None:
46
+ api_client = ApiClient.get_default()
47
+ self.api_client = api_client
48
+
49
+
50
+ @validate_call
51
+ async def calculate_pnl(
52
+ self,
53
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
54
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
55
+ calculate_pnl_input: CalculatePnlInput,
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Annotated[StrictFloat, Field(gt=0)]
62
+ ]
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> BooleanResultDTO:
69
+ """CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
70
+
71
+ CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
72
+
73
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
74
+ :type chain: ChainSymbol
75
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
76
+ :type wallet_address: str
77
+ :param calculate_pnl_input: (required)
78
+ :type calculate_pnl_input: CalculatePnlInput
79
+ :param _request_timeout: timeout setting for this request. If one
80
+ number provided, it will be total request
81
+ timeout. It can also be a pair (tuple) of
82
+ (connection, read) timeouts.
83
+ :type _request_timeout: int, tuple(int, int), optional
84
+ :param _request_auth: set to override the auth_settings for an a single
85
+ request; this effectively ignores the
86
+ authentication in the spec for a single request.
87
+ :type _request_auth: dict, optional
88
+ :param _content_type: force content-type for the request.
89
+ :type _content_type: str, Optional
90
+ :param _headers: set to override the headers for a single
91
+ request; this effectively ignores the headers
92
+ in the spec for a single request.
93
+ :type _headers: dict, optional
94
+ :param _host_index: set to override the host_index for a single
95
+ request; this effectively ignores the host_index
96
+ in the spec for a single request.
97
+ :type _host_index: int, optional
98
+ :return: Returns the result object.
99
+ """ # noqa: E501
100
+
101
+ _param = self._calculate_pnl_serialize(
102
+ chain=chain,
103
+ wallet_address=wallet_address,
104
+ calculate_pnl_input=calculate_pnl_input,
105
+ _request_auth=_request_auth,
106
+ _content_type=_content_type,
107
+ _headers=_headers,
108
+ _host_index=_host_index
109
+ )
110
+
111
+ _response_types_map: Dict[str, Optional[str]] = {
112
+ '200': "BooleanResultDTO",
113
+ }
114
+ response_data = await self.api_client.call_api(
115
+ *_param,
116
+ _request_timeout=_request_timeout
117
+ )
118
+ await response_data.read()
119
+ return self.api_client.response_deserialize(
120
+ response_data=response_data,
121
+ response_types_map=_response_types_map,
122
+ ).data
123
+
124
+
125
+ @validate_call
126
+ async def calculate_pnl_with_http_info(
127
+ self,
128
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
129
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
130
+ calculate_pnl_input: CalculatePnlInput,
131
+ _request_timeout: Union[
132
+ None,
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Tuple[
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Annotated[StrictFloat, Field(gt=0)]
137
+ ]
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[BooleanResultDTO]:
144
+ """CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
145
+
146
+ CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
147
+
148
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
149
+ :type chain: ChainSymbol
150
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
151
+ :type wallet_address: str
152
+ :param calculate_pnl_input: (required)
153
+ :type calculate_pnl_input: CalculatePnlInput
154
+ :param _request_timeout: timeout setting for this request. If one
155
+ number provided, it will be total request
156
+ timeout. It can also be a pair (tuple) of
157
+ (connection, read) timeouts.
158
+ :type _request_timeout: int, tuple(int, int), optional
159
+ :param _request_auth: set to override the auth_settings for an a single
160
+ request; this effectively ignores the
161
+ authentication in the spec for a single request.
162
+ :type _request_auth: dict, optional
163
+ :param _content_type: force content-type for the request.
164
+ :type _content_type: str, Optional
165
+ :param _headers: set to override the headers for a single
166
+ request; this effectively ignores the headers
167
+ in the spec for a single request.
168
+ :type _headers: dict, optional
169
+ :param _host_index: set to override the host_index for a single
170
+ request; this effectively ignores the host_index
171
+ in the spec for a single request.
172
+ :type _host_index: int, optional
173
+ :return: Returns the result object.
174
+ """ # noqa: E501
175
+
176
+ _param = self._calculate_pnl_serialize(
177
+ chain=chain,
178
+ wallet_address=wallet_address,
179
+ calculate_pnl_input=calculate_pnl_input,
180
+ _request_auth=_request_auth,
181
+ _content_type=_content_type,
182
+ _headers=_headers,
183
+ _host_index=_host_index
184
+ )
185
+
186
+ _response_types_map: Dict[str, Optional[str]] = {
187
+ '200': "BooleanResultDTO",
188
+ }
189
+ response_data = await self.api_client.call_api(
190
+ *_param,
191
+ _request_timeout=_request_timeout
192
+ )
193
+ await response_data.read()
194
+ return self.api_client.response_deserialize(
195
+ response_data=response_data,
196
+ response_types_map=_response_types_map,
197
+ )
198
+
199
+
200
+ @validate_call
201
+ async def calculate_pnl_without_preload_content(
202
+ self,
203
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
204
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
205
+ calculate_pnl_input: CalculatePnlInput,
206
+ _request_timeout: Union[
207
+ None,
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Tuple[
210
+ Annotated[StrictFloat, Field(gt=0)],
211
+ Annotated[StrictFloat, Field(gt=0)]
212
+ ]
213
+ ] = None,
214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
215
+ _content_type: Optional[StrictStr] = None,
216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
218
+ ) -> RESTResponseType:
219
+ """CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
220
+
221
+ CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
222
+
223
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
224
+ :type chain: ChainSymbol
225
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
226
+ :type wallet_address: str
227
+ :param calculate_pnl_input: (required)
228
+ :type calculate_pnl_input: CalculatePnlInput
229
+ :param _request_timeout: timeout setting for this request. If one
230
+ number provided, it will be total request
231
+ timeout. It can also be a pair (tuple) of
232
+ (connection, read) timeouts.
233
+ :type _request_timeout: int, tuple(int, int), optional
234
+ :param _request_auth: set to override the auth_settings for an a single
235
+ request; this effectively ignores the
236
+ authentication in the spec for a single request.
237
+ :type _request_auth: dict, optional
238
+ :param _content_type: force content-type for the request.
239
+ :type _content_type: str, Optional
240
+ :param _headers: set to override the headers for a single
241
+ request; this effectively ignores the headers
242
+ in the spec for a single request.
243
+ :type _headers: dict, optional
244
+ :param _host_index: set to override the host_index for a single
245
+ request; this effectively ignores the host_index
246
+ in the spec for a single request.
247
+ :type _host_index: int, optional
248
+ :return: Returns the result object.
249
+ """ # noqa: E501
250
+
251
+ _param = self._calculate_pnl_serialize(
252
+ chain=chain,
253
+ wallet_address=wallet_address,
254
+ calculate_pnl_input=calculate_pnl_input,
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': "BooleanResultDTO",
263
+ }
264
+ response_data = await self.api_client.call_api(
265
+ *_param,
266
+ _request_timeout=_request_timeout
267
+ )
268
+ return response_data.response
269
+
270
+
271
+ def _calculate_pnl_serialize(
272
+ self,
273
+ chain,
274
+ wallet_address,
275
+ calculate_pnl_input,
276
+ _request_auth,
277
+ _content_type,
278
+ _headers,
279
+ _host_index,
280
+ ) -> RequestSerialized:
281
+
282
+ _host = None
283
+
284
+ _collection_formats: Dict[str, str] = {
285
+ }
286
+
287
+ _path_params: Dict[str, str] = {}
288
+ _query_params: List[Tuple[str, str]] = []
289
+ _header_params: Dict[str, Optional[str]] = _headers or {}
290
+ _form_params: List[Tuple[str, str]] = []
291
+ _files: Dict[
292
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
293
+ ] = {}
294
+ _body_params: Optional[bytes] = None
295
+
296
+ # process the path parameters
297
+ if chain is not None:
298
+ _path_params['chain'] = chain.value
299
+ if wallet_address is not None:
300
+ _path_params['walletAddress'] = wallet_address
301
+ # process the query parameters
302
+ # process the header parameters
303
+ # process the form parameters
304
+ # process the body parameter
305
+ if calculate_pnl_input is not None:
306
+ _body_params = calculate_pnl_input
307
+
308
+
309
+ # set the HTTP header `Accept`
310
+ if 'Accept' not in _header_params:
311
+ _header_params['Accept'] = self.api_client.select_header_accept(
312
+ [
313
+ 'application/json'
314
+ ]
315
+ )
316
+
317
+ # set the HTTP header `Content-Type`
318
+ if _content_type:
319
+ _header_params['Content-Type'] = _content_type
320
+ else:
321
+ _default_content_type = (
322
+ self.api_client.select_header_content_type(
323
+ [
324
+ 'application/json'
325
+ ]
326
+ )
327
+ )
328
+ if _default_content_type is not None:
329
+ _header_params['Content-Type'] = _default_content_type
330
+
331
+ # authentication setting
332
+ _auth_settings: List[str] = [
333
+ 'bearer'
334
+ ]
335
+
336
+ return self.api_client.param_serialize(
337
+ method='POST',
338
+ resource_path='/v1/wallet/{chain}/{walletAddress}/calculate-pnl',
339
+ path_params=_path_params,
340
+ query_params=_query_params,
341
+ header_params=_header_params,
342
+ body=_body_params,
343
+ post_params=_form_params,
344
+ files=_files,
345
+ auth_settings=_auth_settings,
346
+ collection_formats=_collection_formats,
347
+ _host=_host,
348
+ _request_auth=_request_auth
349
+ )
350
+
351
+
352
+
353
+
354
+ @validate_call
355
+ async def get_balance(
356
+ self,
357
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
358
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
359
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.WALLET.BALANCE.QUERY.TOKEN_ADDRESS")] = None,
360
+ _request_timeout: Union[
361
+ None,
362
+ Annotated[StrictFloat, Field(gt=0)],
363
+ Tuple[
364
+ Annotated[StrictFloat, Field(gt=0)],
365
+ Annotated[StrictFloat, Field(gt=0)]
366
+ ]
367
+ ] = None,
368
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
369
+ _content_type: Optional[StrictStr] = None,
370
+ _headers: Optional[Dict[StrictStr, Any]] = None,
371
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
372
+ ) -> WalletBalancesDTO:
373
+ """CONTROLLER.WALLET.GET_BALANCES.SUMMARY
374
+
375
+ CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
376
+
377
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
378
+ :type chain: ChainSymbol
379
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
380
+ :type wallet_address: str
381
+ :param token_address: DTO.WALLET.BALANCE.QUERY.TOKEN_ADDRESS
382
+ :type token_address: str
383
+ :param _request_timeout: timeout setting for this request. If one
384
+ number provided, it will be total request
385
+ timeout. It can also be a pair (tuple) of
386
+ (connection, read) timeouts.
387
+ :type _request_timeout: int, tuple(int, int), optional
388
+ :param _request_auth: set to override the auth_settings for an a single
389
+ request; this effectively ignores the
390
+ authentication in the spec for a single request.
391
+ :type _request_auth: dict, optional
392
+ :param _content_type: force content-type for the request.
393
+ :type _content_type: str, Optional
394
+ :param _headers: set to override the headers for a single
395
+ request; this effectively ignores the headers
396
+ in the spec for a single request.
397
+ :type _headers: dict, optional
398
+ :param _host_index: set to override the host_index for a single
399
+ request; this effectively ignores the host_index
400
+ in the spec for a single request.
401
+ :type _host_index: int, optional
402
+ :return: Returns the result object.
403
+ """ # noqa: E501
404
+
405
+ _param = self._get_balance_serialize(
406
+ chain=chain,
407
+ wallet_address=wallet_address,
408
+ token_address=token_address,
409
+ _request_auth=_request_auth,
410
+ _content_type=_content_type,
411
+ _headers=_headers,
412
+ _host_index=_host_index
413
+ )
414
+
415
+ _response_types_map: Dict[str, Optional[str]] = {
416
+ '200': "WalletBalancesDTO",
417
+ }
418
+ response_data = await self.api_client.call_api(
419
+ *_param,
420
+ _request_timeout=_request_timeout
421
+ )
422
+ await response_data.read()
423
+ return self.api_client.response_deserialize(
424
+ response_data=response_data,
425
+ response_types_map=_response_types_map,
426
+ ).data
427
+
428
+
429
+ @validate_call
430
+ async def get_balance_with_http_info(
431
+ self,
432
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
433
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
434
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.WALLET.BALANCE.QUERY.TOKEN_ADDRESS")] = None,
435
+ _request_timeout: Union[
436
+ None,
437
+ Annotated[StrictFloat, Field(gt=0)],
438
+ Tuple[
439
+ Annotated[StrictFloat, Field(gt=0)],
440
+ Annotated[StrictFloat, Field(gt=0)]
441
+ ]
442
+ ] = None,
443
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
444
+ _content_type: Optional[StrictStr] = None,
445
+ _headers: Optional[Dict[StrictStr, Any]] = None,
446
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
447
+ ) -> ApiResponse[WalletBalancesDTO]:
448
+ """CONTROLLER.WALLET.GET_BALANCES.SUMMARY
449
+
450
+ CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
451
+
452
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
453
+ :type chain: ChainSymbol
454
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
455
+ :type wallet_address: str
456
+ :param token_address: DTO.WALLET.BALANCE.QUERY.TOKEN_ADDRESS
457
+ :type token_address: str
458
+ :param _request_timeout: timeout setting for this request. If one
459
+ number provided, it will be total request
460
+ timeout. It can also be a pair (tuple) of
461
+ (connection, read) timeouts.
462
+ :type _request_timeout: int, tuple(int, int), optional
463
+ :param _request_auth: set to override the auth_settings for an a single
464
+ request; this effectively ignores the
465
+ authentication in the spec for a single request.
466
+ :type _request_auth: dict, optional
467
+ :param _content_type: force content-type for the request.
468
+ :type _content_type: str, Optional
469
+ :param _headers: set to override the headers for a single
470
+ request; this effectively ignores the headers
471
+ in the spec for a single request.
472
+ :type _headers: dict, optional
473
+ :param _host_index: set to override the host_index for a single
474
+ request; this effectively ignores the host_index
475
+ in the spec for a single request.
476
+ :type _host_index: int, optional
477
+ :return: Returns the result object.
478
+ """ # noqa: E501
479
+
480
+ _param = self._get_balance_serialize(
481
+ chain=chain,
482
+ wallet_address=wallet_address,
483
+ token_address=token_address,
484
+ _request_auth=_request_auth,
485
+ _content_type=_content_type,
486
+ _headers=_headers,
487
+ _host_index=_host_index
488
+ )
489
+
490
+ _response_types_map: Dict[str, Optional[str]] = {
491
+ '200': "WalletBalancesDTO",
492
+ }
493
+ response_data = await self.api_client.call_api(
494
+ *_param,
495
+ _request_timeout=_request_timeout
496
+ )
497
+ await response_data.read()
498
+ return self.api_client.response_deserialize(
499
+ response_data=response_data,
500
+ response_types_map=_response_types_map,
501
+ )
502
+
503
+
504
+ @validate_call
505
+ async def get_balance_without_preload_content(
506
+ self,
507
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
508
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
509
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.WALLET.BALANCE.QUERY.TOKEN_ADDRESS")] = None,
510
+ _request_timeout: Union[
511
+ None,
512
+ Annotated[StrictFloat, Field(gt=0)],
513
+ Tuple[
514
+ Annotated[StrictFloat, Field(gt=0)],
515
+ Annotated[StrictFloat, Field(gt=0)]
516
+ ]
517
+ ] = None,
518
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
519
+ _content_type: Optional[StrictStr] = None,
520
+ _headers: Optional[Dict[StrictStr, Any]] = None,
521
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
522
+ ) -> RESTResponseType:
523
+ """CONTROLLER.WALLET.GET_BALANCES.SUMMARY
524
+
525
+ CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
526
+
527
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
528
+ :type chain: ChainSymbol
529
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
530
+ :type wallet_address: str
531
+ :param token_address: DTO.WALLET.BALANCE.QUERY.TOKEN_ADDRESS
532
+ :type token_address: str
533
+ :param _request_timeout: timeout setting for this request. If one
534
+ number provided, it will be total request
535
+ timeout. It can also be a pair (tuple) of
536
+ (connection, read) timeouts.
537
+ :type _request_timeout: int, tuple(int, int), optional
538
+ :param _request_auth: set to override the auth_settings for an a single
539
+ request; this effectively ignores the
540
+ authentication in the spec for a single request.
541
+ :type _request_auth: dict, optional
542
+ :param _content_type: force content-type for the request.
543
+ :type _content_type: str, Optional
544
+ :param _headers: set to override the headers for a single
545
+ request; this effectively ignores the headers
546
+ in the spec for a single request.
547
+ :type _headers: dict, optional
548
+ :param _host_index: set to override the host_index for a single
549
+ request; this effectively ignores the host_index
550
+ in the spec for a single request.
551
+ :type _host_index: int, optional
552
+ :return: Returns the result object.
553
+ """ # noqa: E501
554
+
555
+ _param = self._get_balance_serialize(
556
+ chain=chain,
557
+ wallet_address=wallet_address,
558
+ token_address=token_address,
559
+ _request_auth=_request_auth,
560
+ _content_type=_content_type,
561
+ _headers=_headers,
562
+ _host_index=_host_index
563
+ )
564
+
565
+ _response_types_map: Dict[str, Optional[str]] = {
566
+ '200': "WalletBalancesDTO",
567
+ }
568
+ response_data = await self.api_client.call_api(
569
+ *_param,
570
+ _request_timeout=_request_timeout
571
+ )
572
+ return response_data.response
573
+
574
+
575
+ def _get_balance_serialize(
576
+ self,
577
+ chain,
578
+ wallet_address,
579
+ token_address,
580
+ _request_auth,
581
+ _content_type,
582
+ _headers,
583
+ _host_index,
584
+ ) -> RequestSerialized:
585
+
586
+ _host = None
587
+
588
+ _collection_formats: Dict[str, str] = {
589
+ }
590
+
591
+ _path_params: Dict[str, str] = {}
592
+ _query_params: List[Tuple[str, str]] = []
593
+ _header_params: Dict[str, Optional[str]] = _headers or {}
594
+ _form_params: List[Tuple[str, str]] = []
595
+ _files: Dict[
596
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
597
+ ] = {}
598
+ _body_params: Optional[bytes] = None
599
+
600
+ # process the path parameters
601
+ if chain is not None:
602
+ _path_params['chain'] = chain.value
603
+ if wallet_address is not None:
604
+ _path_params['walletAddress'] = wallet_address
605
+ # process the query parameters
606
+ if token_address is not None:
607
+
608
+ _query_params.append(('tokenAddress', token_address))
609
+
610
+ # process the header parameters
611
+ # process the form parameters
612
+ # process the body parameter
613
+
614
+
615
+ # set the HTTP header `Accept`
616
+ if 'Accept' not in _header_params:
617
+ _header_params['Accept'] = self.api_client.select_header_accept(
618
+ [
619
+ 'application/json'
620
+ ]
621
+ )
622
+
623
+
624
+ # authentication setting
625
+ _auth_settings: List[str] = [
626
+ 'bearer'
627
+ ]
628
+
629
+ return self.api_client.param_serialize(
630
+ method='GET',
631
+ resource_path='/v1/wallet/{chain}/{walletAddress}/balance',
632
+ path_params=_path_params,
633
+ query_params=_query_params,
634
+ header_params=_header_params,
635
+ body=_body_params,
636
+ post_params=_form_params,
637
+ files=_files,
638
+ auth_settings=_auth_settings,
639
+ collection_formats=_collection_formats,
640
+ _host=_host,
641
+ _request_auth=_request_auth
642
+ )
643
+
644
+
645
+
646
+
647
+ @validate_call
648
+ async def get_balance_updates(
649
+ self,
650
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
651
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
652
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TOKEN_ADDRESS")] = None,
653
+ time_from: Annotated[Optional[StrictInt], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_FROM")] = None,
654
+ time_to: Annotated[Optional[StrictInt], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_TO")] = None,
655
+ type: Annotated[Optional[BalanceTokenType], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TYPE")] = None,
656
+ change_type: Annotated[Optional[BalanceChangeType], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.CHANGE_TYPE")] = None,
657
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR")] = None,
658
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.PAGE.LIMIT")] = None,
659
+ _request_timeout: Union[
660
+ None,
661
+ Annotated[StrictFloat, Field(gt=0)],
662
+ Tuple[
663
+ Annotated[StrictFloat, Field(gt=0)],
664
+ Annotated[StrictFloat, Field(gt=0)]
665
+ ]
666
+ ] = None,
667
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
668
+ _content_type: Optional[StrictStr] = None,
669
+ _headers: Optional[Dict[StrictStr, Any]] = None,
670
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
671
+ ) -> BalanceUpdatePage:
672
+ """CONTROLLER.WALLET.GET_BALANCE_UPDATES.SUMMARY
673
+
674
+ CONTROLLER.WALLET.GET_BALANCE_UPDATES.DESCRIPTION
675
+
676
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
677
+ :type chain: ChainSymbol
678
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
679
+ :type wallet_address: str
680
+ :param token_address: DTO.WALLET.BALANCE_UPDATE.QUERY.TOKEN_ADDRESS
681
+ :type token_address: str
682
+ :param time_from: DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_FROM
683
+ :type time_from: int
684
+ :param time_to: DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_TO
685
+ :type time_to: int
686
+ :param type: DTO.WALLET.BALANCE_UPDATE.QUERY.TYPE
687
+ :type type: BalanceTokenType
688
+ :param change_type: DTO.WALLET.BALANCE_UPDATE.QUERY.CHANGE_TYPE
689
+ :type change_type: BalanceChangeType
690
+ :param cursor: DTO.PAGE.CURSOR
691
+ :type cursor: str
692
+ :param limit: DTO.PAGE.LIMIT
693
+ :type limit: int
694
+ :param _request_timeout: timeout setting for this request. If one
695
+ number provided, it will be total request
696
+ timeout. It can also be a pair (tuple) of
697
+ (connection, read) timeouts.
698
+ :type _request_timeout: int, tuple(int, int), optional
699
+ :param _request_auth: set to override the auth_settings for an a single
700
+ request; this effectively ignores the
701
+ authentication in the spec for a single request.
702
+ :type _request_auth: dict, optional
703
+ :param _content_type: force content-type for the request.
704
+ :type _content_type: str, Optional
705
+ :param _headers: set to override the headers for a single
706
+ request; this effectively ignores the headers
707
+ in the spec for a single request.
708
+ :type _headers: dict, optional
709
+ :param _host_index: set to override the host_index for a single
710
+ request; this effectively ignores the host_index
711
+ in the spec for a single request.
712
+ :type _host_index: int, optional
713
+ :return: Returns the result object.
714
+ """ # noqa: E501
715
+
716
+ _param = self._get_balance_updates_serialize(
717
+ chain=chain,
718
+ wallet_address=wallet_address,
719
+ token_address=token_address,
720
+ time_from=time_from,
721
+ time_to=time_to,
722
+ type=type,
723
+ change_type=change_type,
724
+ cursor=cursor,
725
+ limit=limit,
726
+ _request_auth=_request_auth,
727
+ _content_type=_content_type,
728
+ _headers=_headers,
729
+ _host_index=_host_index
730
+ )
731
+
732
+ _response_types_map: Dict[str, Optional[str]] = {
733
+ '200': "BalanceUpdatePage",
734
+ }
735
+ response_data = await self.api_client.call_api(
736
+ *_param,
737
+ _request_timeout=_request_timeout
738
+ )
739
+ await response_data.read()
740
+ return self.api_client.response_deserialize(
741
+ response_data=response_data,
742
+ response_types_map=_response_types_map,
743
+ ).data
744
+
745
+
746
+ @validate_call
747
+ async def get_balance_updates_with_http_info(
748
+ self,
749
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
750
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
751
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TOKEN_ADDRESS")] = None,
752
+ time_from: Annotated[Optional[StrictInt], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_FROM")] = None,
753
+ time_to: Annotated[Optional[StrictInt], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_TO")] = None,
754
+ type: Annotated[Optional[BalanceTokenType], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TYPE")] = None,
755
+ change_type: Annotated[Optional[BalanceChangeType], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.CHANGE_TYPE")] = None,
756
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR")] = None,
757
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.PAGE.LIMIT")] = None,
758
+ _request_timeout: Union[
759
+ None,
760
+ Annotated[StrictFloat, Field(gt=0)],
761
+ Tuple[
762
+ Annotated[StrictFloat, Field(gt=0)],
763
+ Annotated[StrictFloat, Field(gt=0)]
764
+ ]
765
+ ] = None,
766
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
767
+ _content_type: Optional[StrictStr] = None,
768
+ _headers: Optional[Dict[StrictStr, Any]] = None,
769
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
770
+ ) -> ApiResponse[BalanceUpdatePage]:
771
+ """CONTROLLER.WALLET.GET_BALANCE_UPDATES.SUMMARY
772
+
773
+ CONTROLLER.WALLET.GET_BALANCE_UPDATES.DESCRIPTION
774
+
775
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
776
+ :type chain: ChainSymbol
777
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
778
+ :type wallet_address: str
779
+ :param token_address: DTO.WALLET.BALANCE_UPDATE.QUERY.TOKEN_ADDRESS
780
+ :type token_address: str
781
+ :param time_from: DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_FROM
782
+ :type time_from: int
783
+ :param time_to: DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_TO
784
+ :type time_to: int
785
+ :param type: DTO.WALLET.BALANCE_UPDATE.QUERY.TYPE
786
+ :type type: BalanceTokenType
787
+ :param change_type: DTO.WALLET.BALANCE_UPDATE.QUERY.CHANGE_TYPE
788
+ :type change_type: BalanceChangeType
789
+ :param cursor: DTO.PAGE.CURSOR
790
+ :type cursor: str
791
+ :param limit: DTO.PAGE.LIMIT
792
+ :type limit: int
793
+ :param _request_timeout: timeout setting for this request. If one
794
+ number provided, it will be total request
795
+ timeout. It can also be a pair (tuple) of
796
+ (connection, read) timeouts.
797
+ :type _request_timeout: int, tuple(int, int), optional
798
+ :param _request_auth: set to override the auth_settings for an a single
799
+ request; this effectively ignores the
800
+ authentication in the spec for a single request.
801
+ :type _request_auth: dict, optional
802
+ :param _content_type: force content-type for the request.
803
+ :type _content_type: str, Optional
804
+ :param _headers: set to override the headers for a single
805
+ request; this effectively ignores the headers
806
+ in the spec for a single request.
807
+ :type _headers: dict, optional
808
+ :param _host_index: set to override the host_index for a single
809
+ request; this effectively ignores the host_index
810
+ in the spec for a single request.
811
+ :type _host_index: int, optional
812
+ :return: Returns the result object.
813
+ """ # noqa: E501
814
+
815
+ _param = self._get_balance_updates_serialize(
816
+ chain=chain,
817
+ wallet_address=wallet_address,
818
+ token_address=token_address,
819
+ time_from=time_from,
820
+ time_to=time_to,
821
+ type=type,
822
+ change_type=change_type,
823
+ cursor=cursor,
824
+ limit=limit,
825
+ _request_auth=_request_auth,
826
+ _content_type=_content_type,
827
+ _headers=_headers,
828
+ _host_index=_host_index
829
+ )
830
+
831
+ _response_types_map: Dict[str, Optional[str]] = {
832
+ '200': "BalanceUpdatePage",
833
+ }
834
+ response_data = await self.api_client.call_api(
835
+ *_param,
836
+ _request_timeout=_request_timeout
837
+ )
838
+ await response_data.read()
839
+ return self.api_client.response_deserialize(
840
+ response_data=response_data,
841
+ response_types_map=_response_types_map,
842
+ )
843
+
844
+
845
+ @validate_call
846
+ async def get_balance_updates_without_preload_content(
847
+ self,
848
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
849
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
850
+ token_address: Annotated[Optional[StrictStr], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TOKEN_ADDRESS")] = None,
851
+ time_from: Annotated[Optional[StrictInt], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_FROM")] = None,
852
+ time_to: Annotated[Optional[StrictInt], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_TO")] = None,
853
+ type: Annotated[Optional[BalanceTokenType], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.TYPE")] = None,
854
+ change_type: Annotated[Optional[BalanceChangeType], Field(description="DTO.WALLET.BALANCE_UPDATE.QUERY.CHANGE_TYPE")] = None,
855
+ cursor: Annotated[Optional[StrictStr], Field(description="DTO.PAGE.CURSOR")] = None,
856
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="DTO.PAGE.LIMIT")] = None,
857
+ _request_timeout: Union[
858
+ None,
859
+ Annotated[StrictFloat, Field(gt=0)],
860
+ Tuple[
861
+ Annotated[StrictFloat, Field(gt=0)],
862
+ Annotated[StrictFloat, Field(gt=0)]
863
+ ]
864
+ ] = None,
865
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
866
+ _content_type: Optional[StrictStr] = None,
867
+ _headers: Optional[Dict[StrictStr, Any]] = None,
868
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
869
+ ) -> RESTResponseType:
870
+ """CONTROLLER.WALLET.GET_BALANCE_UPDATES.SUMMARY
871
+
872
+ CONTROLLER.WALLET.GET_BALANCE_UPDATES.DESCRIPTION
873
+
874
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
875
+ :type chain: ChainSymbol
876
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
877
+ :type wallet_address: str
878
+ :param token_address: DTO.WALLET.BALANCE_UPDATE.QUERY.TOKEN_ADDRESS
879
+ :type token_address: str
880
+ :param time_from: DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_FROM
881
+ :type time_from: int
882
+ :param time_to: DTO.WALLET.BALANCE_UPDATE.QUERY.TIME_TO
883
+ :type time_to: int
884
+ :param type: DTO.WALLET.BALANCE_UPDATE.QUERY.TYPE
885
+ :type type: BalanceTokenType
886
+ :param change_type: DTO.WALLET.BALANCE_UPDATE.QUERY.CHANGE_TYPE
887
+ :type change_type: BalanceChangeType
888
+ :param cursor: DTO.PAGE.CURSOR
889
+ :type cursor: str
890
+ :param limit: DTO.PAGE.LIMIT
891
+ :type limit: int
892
+ :param _request_timeout: timeout setting for this request. If one
893
+ number provided, it will be total request
894
+ timeout. It can also be a pair (tuple) of
895
+ (connection, read) timeouts.
896
+ :type _request_timeout: int, tuple(int, int), optional
897
+ :param _request_auth: set to override the auth_settings for an a single
898
+ request; this effectively ignores the
899
+ authentication in the spec for a single request.
900
+ :type _request_auth: dict, optional
901
+ :param _content_type: force content-type for the request.
902
+ :type _content_type: str, Optional
903
+ :param _headers: set to override the headers for a single
904
+ request; this effectively ignores the headers
905
+ in the spec for a single request.
906
+ :type _headers: dict, optional
907
+ :param _host_index: set to override the host_index for a single
908
+ request; this effectively ignores the host_index
909
+ in the spec for a single request.
910
+ :type _host_index: int, optional
911
+ :return: Returns the result object.
912
+ """ # noqa: E501
913
+
914
+ _param = self._get_balance_updates_serialize(
915
+ chain=chain,
916
+ wallet_address=wallet_address,
917
+ token_address=token_address,
918
+ time_from=time_from,
919
+ time_to=time_to,
920
+ type=type,
921
+ change_type=change_type,
922
+ cursor=cursor,
923
+ limit=limit,
924
+ _request_auth=_request_auth,
925
+ _content_type=_content_type,
926
+ _headers=_headers,
927
+ _host_index=_host_index
928
+ )
929
+
930
+ _response_types_map: Dict[str, Optional[str]] = {
931
+ '200': "BalanceUpdatePage",
932
+ }
933
+ response_data = await self.api_client.call_api(
934
+ *_param,
935
+ _request_timeout=_request_timeout
936
+ )
937
+ return response_data.response
938
+
939
+
940
+ def _get_balance_updates_serialize(
941
+ self,
942
+ chain,
943
+ wallet_address,
944
+ token_address,
945
+ time_from,
946
+ time_to,
947
+ type,
948
+ change_type,
949
+ cursor,
950
+ limit,
951
+ _request_auth,
952
+ _content_type,
953
+ _headers,
954
+ _host_index,
955
+ ) -> RequestSerialized:
956
+
957
+ _host = None
958
+
959
+ _collection_formats: Dict[str, str] = {
960
+ }
961
+
962
+ _path_params: Dict[str, str] = {}
963
+ _query_params: List[Tuple[str, str]] = []
964
+ _header_params: Dict[str, Optional[str]] = _headers or {}
965
+ _form_params: List[Tuple[str, str]] = []
966
+ _files: Dict[
967
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
968
+ ] = {}
969
+ _body_params: Optional[bytes] = None
970
+
971
+ # process the path parameters
972
+ if chain is not None:
973
+ _path_params['chain'] = chain.value
974
+ if wallet_address is not None:
975
+ _path_params['walletAddress'] = wallet_address
976
+ # process the query parameters
977
+ if token_address is not None:
978
+
979
+ _query_params.append(('tokenAddress', token_address))
980
+
981
+ if time_from is not None:
982
+
983
+ _query_params.append(('timeFrom', time_from))
984
+
985
+ if time_to is not None:
986
+
987
+ _query_params.append(('timeTo', time_to))
988
+
989
+ if type is not None:
990
+
991
+ _query_params.append(('type', type.value))
992
+
993
+ if change_type is not None:
994
+
995
+ _query_params.append(('changeType', change_type.value))
996
+
997
+ if cursor is not None:
998
+
999
+ _query_params.append(('cursor', cursor))
1000
+
1001
+ if limit is not None:
1002
+
1003
+ _query_params.append(('limit', limit))
1004
+
1005
+ # process the header parameters
1006
+ # process the form parameters
1007
+ # process the body parameter
1008
+
1009
+
1010
+ # set the HTTP header `Accept`
1011
+ if 'Accept' not in _header_params:
1012
+ _header_params['Accept'] = self.api_client.select_header_accept(
1013
+ [
1014
+ 'application/json'
1015
+ ]
1016
+ )
1017
+
1018
+
1019
+ # authentication setting
1020
+ _auth_settings: List[str] = [
1021
+ 'bearer'
1022
+ ]
1023
+
1024
+ return self.api_client.param_serialize(
1025
+ method='GET',
1026
+ resource_path='/v1/wallet/{chain}/{walletAddress}/balance-updates',
1027
+ path_params=_path_params,
1028
+ query_params=_query_params,
1029
+ header_params=_header_params,
1030
+ body=_body_params,
1031
+ post_params=_form_params,
1032
+ files=_files,
1033
+ auth_settings=_auth_settings,
1034
+ collection_formats=_collection_formats,
1035
+ _host=_host,
1036
+ _request_auth=_request_auth
1037
+ )
1038
+
1039
+
1040
+
1041
+
1042
+ @validate_call
1043
+ async def get_pnl(
1044
+ self,
1045
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1046
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
1047
+ token_address: Annotated[Optional[StrictStr], Field(description="GLOBAL.TOKENADDRESS.DESCRIPTION")] = None,
1048
+ _request_timeout: Union[
1049
+ None,
1050
+ Annotated[StrictFloat, Field(gt=0)],
1051
+ Tuple[
1052
+ Annotated[StrictFloat, Field(gt=0)],
1053
+ Annotated[StrictFloat, Field(gt=0)]
1054
+ ]
1055
+ ] = None,
1056
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1057
+ _content_type: Optional[StrictStr] = None,
1058
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1059
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1060
+ ) -> List[WalletPnlDTO]:
1061
+ """CONTROLLER.WALLET.GET_PNL.SUMMARY
1062
+
1063
+ CONTROLLER.WALLET.GET_PNL.DESCRIPTION
1064
+
1065
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1066
+ :type chain: ChainSymbol
1067
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
1068
+ :type wallet_address: str
1069
+ :param token_address: GLOBAL.TOKENADDRESS.DESCRIPTION
1070
+ :type token_address: str
1071
+ :param _request_timeout: timeout setting for this request. If one
1072
+ number provided, it will be total request
1073
+ timeout. It can also be a pair (tuple) of
1074
+ (connection, read) timeouts.
1075
+ :type _request_timeout: int, tuple(int, int), optional
1076
+ :param _request_auth: set to override the auth_settings for an a single
1077
+ request; this effectively ignores the
1078
+ authentication in the spec for a single request.
1079
+ :type _request_auth: dict, optional
1080
+ :param _content_type: force content-type for the request.
1081
+ :type _content_type: str, Optional
1082
+ :param _headers: set to override the headers for a single
1083
+ request; this effectively ignores the headers
1084
+ in the spec for a single request.
1085
+ :type _headers: dict, optional
1086
+ :param _host_index: set to override the host_index for a single
1087
+ request; this effectively ignores the host_index
1088
+ in the spec for a single request.
1089
+ :type _host_index: int, optional
1090
+ :return: Returns the result object.
1091
+ """ # noqa: E501
1092
+
1093
+ _param = self._get_pnl_serialize(
1094
+ chain=chain,
1095
+ wallet_address=wallet_address,
1096
+ token_address=token_address,
1097
+ _request_auth=_request_auth,
1098
+ _content_type=_content_type,
1099
+ _headers=_headers,
1100
+ _host_index=_host_index
1101
+ )
1102
+
1103
+ _response_types_map: Dict[str, Optional[str]] = {
1104
+ '200': "List[WalletPnlDTO]",
1105
+ }
1106
+ response_data = await self.api_client.call_api(
1107
+ *_param,
1108
+ _request_timeout=_request_timeout
1109
+ )
1110
+ await response_data.read()
1111
+ return self.api_client.response_deserialize(
1112
+ response_data=response_data,
1113
+ response_types_map=_response_types_map,
1114
+ ).data
1115
+
1116
+
1117
+ @validate_call
1118
+ async def get_pnl_with_http_info(
1119
+ self,
1120
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1121
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
1122
+ token_address: Annotated[Optional[StrictStr], Field(description="GLOBAL.TOKENADDRESS.DESCRIPTION")] = None,
1123
+ _request_timeout: Union[
1124
+ None,
1125
+ Annotated[StrictFloat, Field(gt=0)],
1126
+ Tuple[
1127
+ Annotated[StrictFloat, Field(gt=0)],
1128
+ Annotated[StrictFloat, Field(gt=0)]
1129
+ ]
1130
+ ] = None,
1131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1132
+ _content_type: Optional[StrictStr] = None,
1133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1135
+ ) -> ApiResponse[List[WalletPnlDTO]]:
1136
+ """CONTROLLER.WALLET.GET_PNL.SUMMARY
1137
+
1138
+ CONTROLLER.WALLET.GET_PNL.DESCRIPTION
1139
+
1140
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1141
+ :type chain: ChainSymbol
1142
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
1143
+ :type wallet_address: str
1144
+ :param token_address: GLOBAL.TOKENADDRESS.DESCRIPTION
1145
+ :type token_address: str
1146
+ :param _request_timeout: timeout setting for this request. If one
1147
+ number provided, it will be total request
1148
+ timeout. It can also be a pair (tuple) of
1149
+ (connection, read) timeouts.
1150
+ :type _request_timeout: int, tuple(int, int), optional
1151
+ :param _request_auth: set to override the auth_settings for an a single
1152
+ request; this effectively ignores the
1153
+ authentication in the spec for a single request.
1154
+ :type _request_auth: dict, optional
1155
+ :param _content_type: force content-type for the request.
1156
+ :type _content_type: str, Optional
1157
+ :param _headers: set to override the headers for a single
1158
+ request; this effectively ignores the headers
1159
+ in the spec for a single request.
1160
+ :type _headers: dict, optional
1161
+ :param _host_index: set to override the host_index for a single
1162
+ request; this effectively ignores the host_index
1163
+ in the spec for a single request.
1164
+ :type _host_index: int, optional
1165
+ :return: Returns the result object.
1166
+ """ # noqa: E501
1167
+
1168
+ _param = self._get_pnl_serialize(
1169
+ chain=chain,
1170
+ wallet_address=wallet_address,
1171
+ token_address=token_address,
1172
+ _request_auth=_request_auth,
1173
+ _content_type=_content_type,
1174
+ _headers=_headers,
1175
+ _host_index=_host_index
1176
+ )
1177
+
1178
+ _response_types_map: Dict[str, Optional[str]] = {
1179
+ '200': "List[WalletPnlDTO]",
1180
+ }
1181
+ response_data = await self.api_client.call_api(
1182
+ *_param,
1183
+ _request_timeout=_request_timeout
1184
+ )
1185
+ await response_data.read()
1186
+ return self.api_client.response_deserialize(
1187
+ response_data=response_data,
1188
+ response_types_map=_response_types_map,
1189
+ )
1190
+
1191
+
1192
+ @validate_call
1193
+ async def get_pnl_without_preload_content(
1194
+ self,
1195
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1196
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
1197
+ token_address: Annotated[Optional[StrictStr], Field(description="GLOBAL.TOKENADDRESS.DESCRIPTION")] = None,
1198
+ _request_timeout: Union[
1199
+ None,
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Tuple[
1202
+ Annotated[StrictFloat, Field(gt=0)],
1203
+ Annotated[StrictFloat, Field(gt=0)]
1204
+ ]
1205
+ ] = None,
1206
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1207
+ _content_type: Optional[StrictStr] = None,
1208
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1209
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1210
+ ) -> RESTResponseType:
1211
+ """CONTROLLER.WALLET.GET_PNL.SUMMARY
1212
+
1213
+ CONTROLLER.WALLET.GET_PNL.DESCRIPTION
1214
+
1215
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1216
+ :type chain: ChainSymbol
1217
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
1218
+ :type wallet_address: str
1219
+ :param token_address: GLOBAL.TOKENADDRESS.DESCRIPTION
1220
+ :type token_address: str
1221
+ :param _request_timeout: timeout setting for this request. If one
1222
+ number provided, it will be total request
1223
+ timeout. It can also be a pair (tuple) of
1224
+ (connection, read) timeouts.
1225
+ :type _request_timeout: int, tuple(int, int), optional
1226
+ :param _request_auth: set to override the auth_settings for an a single
1227
+ request; this effectively ignores the
1228
+ authentication in the spec for a single request.
1229
+ :type _request_auth: dict, optional
1230
+ :param _content_type: force content-type for the request.
1231
+ :type _content_type: str, Optional
1232
+ :param _headers: set to override the headers for a single
1233
+ request; this effectively ignores the headers
1234
+ in the spec for a single request.
1235
+ :type _headers: dict, optional
1236
+ :param _host_index: set to override the host_index for a single
1237
+ request; this effectively ignores the host_index
1238
+ in the spec for a single request.
1239
+ :type _host_index: int, optional
1240
+ :return: Returns the result object.
1241
+ """ # noqa: E501
1242
+
1243
+ _param = self._get_pnl_serialize(
1244
+ chain=chain,
1245
+ wallet_address=wallet_address,
1246
+ token_address=token_address,
1247
+ _request_auth=_request_auth,
1248
+ _content_type=_content_type,
1249
+ _headers=_headers,
1250
+ _host_index=_host_index
1251
+ )
1252
+
1253
+ _response_types_map: Dict[str, Optional[str]] = {
1254
+ '200': "List[WalletPnlDTO]",
1255
+ }
1256
+ response_data = await self.api_client.call_api(
1257
+ *_param,
1258
+ _request_timeout=_request_timeout
1259
+ )
1260
+ return response_data.response
1261
+
1262
+
1263
+ def _get_pnl_serialize(
1264
+ self,
1265
+ chain,
1266
+ wallet_address,
1267
+ token_address,
1268
+ _request_auth,
1269
+ _content_type,
1270
+ _headers,
1271
+ _host_index,
1272
+ ) -> RequestSerialized:
1273
+
1274
+ _host = None
1275
+
1276
+ _collection_formats: Dict[str, str] = {
1277
+ }
1278
+
1279
+ _path_params: Dict[str, str] = {}
1280
+ _query_params: List[Tuple[str, str]] = []
1281
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1282
+ _form_params: List[Tuple[str, str]] = []
1283
+ _files: Dict[
1284
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1285
+ ] = {}
1286
+ _body_params: Optional[bytes] = None
1287
+
1288
+ # process the path parameters
1289
+ if chain is not None:
1290
+ _path_params['chain'] = chain.value
1291
+ if wallet_address is not None:
1292
+ _path_params['walletAddress'] = wallet_address
1293
+ # process the query parameters
1294
+ if token_address is not None:
1295
+
1296
+ _query_params.append(('tokenAddress', token_address))
1297
+
1298
+ # process the header parameters
1299
+ # process the form parameters
1300
+ # process the body parameter
1301
+
1302
+
1303
+ # set the HTTP header `Accept`
1304
+ if 'Accept' not in _header_params:
1305
+ _header_params['Accept'] = self.api_client.select_header_accept(
1306
+ [
1307
+ 'application/json'
1308
+ ]
1309
+ )
1310
+
1311
+
1312
+ # authentication setting
1313
+ _auth_settings: List[str] = [
1314
+ 'bearer'
1315
+ ]
1316
+
1317
+ return self.api_client.param_serialize(
1318
+ method='GET',
1319
+ resource_path='/v1/wallet/{chain}/{walletAddress}',
1320
+ path_params=_path_params,
1321
+ query_params=_query_params,
1322
+ header_params=_header_params,
1323
+ body=_body_params,
1324
+ post_params=_form_params,
1325
+ files=_files,
1326
+ auth_settings=_auth_settings,
1327
+ collection_formats=_collection_formats,
1328
+ _host=_host,
1329
+ _request_auth=_request_auth
1330
+ )
1331
+
1332
+
1333
+
1334
+
1335
+ @validate_call
1336
+ async def get_pnl_stats(
1337
+ self,
1338
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1339
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
1340
+ _request_timeout: Union[
1341
+ None,
1342
+ Annotated[StrictFloat, Field(gt=0)],
1343
+ Tuple[
1344
+ Annotated[StrictFloat, Field(gt=0)],
1345
+ Annotated[StrictFloat, Field(gt=0)]
1346
+ ]
1347
+ ] = None,
1348
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1349
+ _content_type: Optional[StrictStr] = None,
1350
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1351
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1352
+ ) -> List[WalletPnlDTO]:
1353
+ """CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
1354
+
1355
+ CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
1356
+
1357
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1358
+ :type chain: ChainSymbol
1359
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
1360
+ :type wallet_address: str
1361
+ :param _request_timeout: timeout setting for this request. If one
1362
+ number provided, it will be total request
1363
+ timeout. It can also be a pair (tuple) of
1364
+ (connection, read) timeouts.
1365
+ :type _request_timeout: int, tuple(int, int), optional
1366
+ :param _request_auth: set to override the auth_settings for an a single
1367
+ request; this effectively ignores the
1368
+ authentication in the spec for a single request.
1369
+ :type _request_auth: dict, optional
1370
+ :param _content_type: force content-type for the request.
1371
+ :type _content_type: str, Optional
1372
+ :param _headers: set to override the headers for a single
1373
+ request; this effectively ignores the headers
1374
+ in the spec for a single request.
1375
+ :type _headers: dict, optional
1376
+ :param _host_index: set to override the host_index for a single
1377
+ request; this effectively ignores the host_index
1378
+ in the spec for a single request.
1379
+ :type _host_index: int, optional
1380
+ :return: Returns the result object.
1381
+ """ # noqa: E501
1382
+
1383
+ _param = self._get_pnl_stats_serialize(
1384
+ chain=chain,
1385
+ wallet_address=wallet_address,
1386
+ _request_auth=_request_auth,
1387
+ _content_type=_content_type,
1388
+ _headers=_headers,
1389
+ _host_index=_host_index
1390
+ )
1391
+
1392
+ _response_types_map: Dict[str, Optional[str]] = {
1393
+ '200': "List[WalletPnlDTO]",
1394
+ }
1395
+ response_data = await self.api_client.call_api(
1396
+ *_param,
1397
+ _request_timeout=_request_timeout
1398
+ )
1399
+ await response_data.read()
1400
+ return self.api_client.response_deserialize(
1401
+ response_data=response_data,
1402
+ response_types_map=_response_types_map,
1403
+ ).data
1404
+
1405
+
1406
+ @validate_call
1407
+ async def get_pnl_stats_with_http_info(
1408
+ self,
1409
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1410
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
1411
+ _request_timeout: Union[
1412
+ None,
1413
+ Annotated[StrictFloat, Field(gt=0)],
1414
+ Tuple[
1415
+ Annotated[StrictFloat, Field(gt=0)],
1416
+ Annotated[StrictFloat, Field(gt=0)]
1417
+ ]
1418
+ ] = None,
1419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1420
+ _content_type: Optional[StrictStr] = None,
1421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1423
+ ) -> ApiResponse[List[WalletPnlDTO]]:
1424
+ """CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
1425
+
1426
+ CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
1427
+
1428
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1429
+ :type chain: ChainSymbol
1430
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
1431
+ :type wallet_address: str
1432
+ :param _request_timeout: timeout setting for this request. If one
1433
+ number provided, it will be total request
1434
+ timeout. It can also be a pair (tuple) of
1435
+ (connection, read) timeouts.
1436
+ :type _request_timeout: int, tuple(int, int), optional
1437
+ :param _request_auth: set to override the auth_settings for an a single
1438
+ request; this effectively ignores the
1439
+ authentication in the spec for a single request.
1440
+ :type _request_auth: dict, optional
1441
+ :param _content_type: force content-type for the request.
1442
+ :type _content_type: str, Optional
1443
+ :param _headers: set to override the headers for a single
1444
+ request; this effectively ignores the headers
1445
+ in the spec for a single request.
1446
+ :type _headers: dict, optional
1447
+ :param _host_index: set to override the host_index for a single
1448
+ request; this effectively ignores the host_index
1449
+ in the spec for a single request.
1450
+ :type _host_index: int, optional
1451
+ :return: Returns the result object.
1452
+ """ # noqa: E501
1453
+
1454
+ _param = self._get_pnl_stats_serialize(
1455
+ chain=chain,
1456
+ wallet_address=wallet_address,
1457
+ _request_auth=_request_auth,
1458
+ _content_type=_content_type,
1459
+ _headers=_headers,
1460
+ _host_index=_host_index
1461
+ )
1462
+
1463
+ _response_types_map: Dict[str, Optional[str]] = {
1464
+ '200': "List[WalletPnlDTO]",
1465
+ }
1466
+ response_data = await self.api_client.call_api(
1467
+ *_param,
1468
+ _request_timeout=_request_timeout
1469
+ )
1470
+ await response_data.read()
1471
+ return self.api_client.response_deserialize(
1472
+ response_data=response_data,
1473
+ response_types_map=_response_types_map,
1474
+ )
1475
+
1476
+
1477
+ @validate_call
1478
+ async def get_pnl_stats_without_preload_content(
1479
+ self,
1480
+ chain: Annotated[ChainSymbol, Field(description="GLOBAL.CHAIN.DESCRIPTION")],
1481
+ wallet_address: Annotated[StrictStr, Field(description="GLOBAL.WALLETADDRESS.DESCRIPTION")],
1482
+ _request_timeout: Union[
1483
+ None,
1484
+ Annotated[StrictFloat, Field(gt=0)],
1485
+ Tuple[
1486
+ Annotated[StrictFloat, Field(gt=0)],
1487
+ Annotated[StrictFloat, Field(gt=0)]
1488
+ ]
1489
+ ] = None,
1490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1491
+ _content_type: Optional[StrictStr] = None,
1492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1494
+ ) -> RESTResponseType:
1495
+ """CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
1496
+
1497
+ CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
1498
+
1499
+ :param chain: GLOBAL.CHAIN.DESCRIPTION (required)
1500
+ :type chain: ChainSymbol
1501
+ :param wallet_address: GLOBAL.WALLETADDRESS.DESCRIPTION (required)
1502
+ :type wallet_address: str
1503
+ :param _request_timeout: timeout setting for this request. If one
1504
+ number provided, it will be total request
1505
+ timeout. It can also be a pair (tuple) of
1506
+ (connection, read) timeouts.
1507
+ :type _request_timeout: int, tuple(int, int), optional
1508
+ :param _request_auth: set to override the auth_settings for an a single
1509
+ request; this effectively ignores the
1510
+ authentication in the spec for a single request.
1511
+ :type _request_auth: dict, optional
1512
+ :param _content_type: force content-type for the request.
1513
+ :type _content_type: str, Optional
1514
+ :param _headers: set to override the headers for a single
1515
+ request; this effectively ignores the headers
1516
+ in the spec for a single request.
1517
+ :type _headers: dict, optional
1518
+ :param _host_index: set to override the host_index for a single
1519
+ request; this effectively ignores the host_index
1520
+ in the spec for a single request.
1521
+ :type _host_index: int, optional
1522
+ :return: Returns the result object.
1523
+ """ # noqa: E501
1524
+
1525
+ _param = self._get_pnl_stats_serialize(
1526
+ chain=chain,
1527
+ wallet_address=wallet_address,
1528
+ _request_auth=_request_auth,
1529
+ _content_type=_content_type,
1530
+ _headers=_headers,
1531
+ _host_index=_host_index
1532
+ )
1533
+
1534
+ _response_types_map: Dict[str, Optional[str]] = {
1535
+ '200': "List[WalletPnlDTO]",
1536
+ }
1537
+ response_data = await self.api_client.call_api(
1538
+ *_param,
1539
+ _request_timeout=_request_timeout
1540
+ )
1541
+ return response_data.response
1542
+
1543
+
1544
+ def _get_pnl_stats_serialize(
1545
+ self,
1546
+ chain,
1547
+ wallet_address,
1548
+ _request_auth,
1549
+ _content_type,
1550
+ _headers,
1551
+ _host_index,
1552
+ ) -> RequestSerialized:
1553
+
1554
+ _host = None
1555
+
1556
+ _collection_formats: Dict[str, str] = {
1557
+ }
1558
+
1559
+ _path_params: Dict[str, str] = {}
1560
+ _query_params: List[Tuple[str, str]] = []
1561
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1562
+ _form_params: List[Tuple[str, str]] = []
1563
+ _files: Dict[
1564
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1565
+ ] = {}
1566
+ _body_params: Optional[bytes] = None
1567
+
1568
+ # process the path parameters
1569
+ if chain is not None:
1570
+ _path_params['chain'] = chain.value
1571
+ if wallet_address is not None:
1572
+ _path_params['walletAddress'] = wallet_address
1573
+ # process the query parameters
1574
+ # process the header parameters
1575
+ # process the form parameters
1576
+ # process the body parameter
1577
+
1578
+
1579
+ # set the HTTP header `Accept`
1580
+ if 'Accept' not in _header_params:
1581
+ _header_params['Accept'] = self.api_client.select_header_accept(
1582
+ [
1583
+ 'application/json'
1584
+ ]
1585
+ )
1586
+
1587
+
1588
+ # authentication setting
1589
+ _auth_settings: List[str] = [
1590
+ 'bearer'
1591
+ ]
1592
+
1593
+ return self.api_client.param_serialize(
1594
+ method='GET',
1595
+ resource_path='/v1/wallet/{chain}/{walletAddress}/stats',
1596
+ path_params=_path_params,
1597
+ query_params=_query_params,
1598
+ header_params=_header_params,
1599
+ body=_body_params,
1600
+ post_params=_form_params,
1601
+ files=_files,
1602
+ auth_settings=_auth_settings,
1603
+ collection_formats=_collection_formats,
1604
+ _host=_host,
1605
+ _request_auth=_request_auth
1606
+ )
1607
+
1608
+