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,85 @@
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
+
16
+ import unittest
17
+
18
+ from chainstream.openapi_client.models.swap_route_response import SwapRouteResponse
19
+
20
+ class TestSwapRouteResponse(unittest.TestCase):
21
+ """SwapRouteResponse unit test stubs"""
22
+
23
+ def setUp(self):
24
+ pass
25
+
26
+ def tearDown(self):
27
+ pass
28
+
29
+ def make_instance(self, include_optional) -> SwapRouteResponse:
30
+ """Test SwapRouteResponse
31
+ include_optional is a boolean, when False only required
32
+ params are included, when True both required and
33
+ optional params are included """
34
+ # uncomment below to create an instance of `SwapRouteResponse`
35
+ """
36
+ model = SwapRouteResponse()
37
+ if include_optional:
38
+ return SwapRouteResponse(
39
+ args = chainstream.openapi_client.models.swap_route_input.SwapRouteInput(
40
+ dex = 'jupiter',
41
+ user_address = 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
42
+ priority_fee = '1000',
43
+ amount = '1000000000',
44
+ swap_mode = 'ExactIn',
45
+ slippage = 5,
46
+ input_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
47
+ output_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
48
+ recipient_address = '0x0000000000000000000000000000000000000001',
49
+ permit = '66c85d1637257e890e581f724f69f4d4fc17eee156c0619c4719ed0c66eed0e9',
50
+ deadline = 1716806400,
51
+ tip_fee = '1000000',
52
+ is_anti_mev = True, ),
53
+ serialized_tx = 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
54
+ route_info = {inAmount=1000000000, outAmount=985000000, priceImpact=0.15, route=[USDC, SOL]},
55
+ elapsed_time = 245
56
+ )
57
+ else:
58
+ return SwapRouteResponse(
59
+ args = chainstream.openapi_client.models.swap_route_input.SwapRouteInput(
60
+ dex = 'jupiter',
61
+ user_address = 'oQPnhXAbLbMuKHESaGrbXT17CyvWCpLyERSJA9HCYd7',
62
+ priority_fee = '1000',
63
+ amount = '1000000000',
64
+ swap_mode = 'ExactIn',
65
+ slippage = 5,
66
+ input_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
67
+ output_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
68
+ recipient_address = '0x0000000000000000000000000000000000000001',
69
+ permit = '66c85d1637257e890e581f724f69f4d4fc17eee156c0619c4719ed0c66eed0e9',
70
+ deadline = 1716806400,
71
+ tip_fee = '1000000',
72
+ is_anti_mev = True, ),
73
+ serialized_tx = 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
74
+ route_info = {inAmount=1000000000, outAmount=985000000, priceImpact=0.15, route=[USDC, SOL]},
75
+ elapsed_time = 245,
76
+ )
77
+ """
78
+
79
+ def testSwapRouteResponse(self):
80
+ """Test SwapRouteResponse"""
81
+ # inst_req_only = self.make_instance(include_optional=False)
82
+ # inst_req_and_optional = self.make_instance(include_optional=True)
83
+
84
+ if __name__ == '__main__':
85
+ unittest.main()
@@ -0,0 +1,352 @@
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
+
16
+ import unittest
17
+
18
+ from chainstream.openapi_client.models.token import Token
19
+
20
+ class TestToken(unittest.TestCase):
21
+ """Token unit test stubs"""
22
+
23
+ def setUp(self):
24
+ pass
25
+
26
+ def tearDown(self):
27
+ pass
28
+
29
+ def make_instance(self, include_optional) -> Token:
30
+ """Test Token
31
+ include_optional is a boolean, when False only required
32
+ params are included, when True both required and
33
+ optional params are included """
34
+ # uncomment below to create an instance of `Token`
35
+ """
36
+ model = Token()
37
+ if include_optional:
38
+ return Token(
39
+ chain = 'solana',
40
+ decimals = 9,
41
+ name = 'USD Coin',
42
+ symbol = 'USDC',
43
+ metadata_address = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s',
44
+ address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
45
+ token_creators = [
46
+ chainstream.openapi_client.models.token_creators_dto.TokenCreatorsDTO(
47
+ address = '5e2qRc1DNEXmyxP8qwPwJhRWjef7usLyi7v5xjqLr5G7',
48
+ share = 100,
49
+ is_verified = True, )
50
+ ],
51
+ image_url = 'https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png',
52
+ uri = 'https://...',
53
+ extra = chainstream.openapi_client.models.token_extra_dto.TokenExtraDTO(
54
+ collection_address = 'ABCDE',
55
+ edition_nonce = 1,
56
+ fungible = True,
57
+ is_mutable = True,
58
+ key = 'Mint',
59
+ is_native = False,
60
+ primary_sale_happened = False,
61
+ launch_from_program_address = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P',
62
+ launch_from_protocol_family = 'pumpfun',
63
+ program_address = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
64
+ migrated_to_program_address = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA',
65
+ migrated_to_protocol_family = 'Raydium',
66
+ migrated_to_pool_address = '7AvUMqLBou5EAXzyhnizWmPU13u2VguJoBYdcX4bhJtQ',
67
+ migrated_at = 1714857600,
68
+ seller_fee_basis_points = 100,
69
+ token_standard = 'Fungible',
70
+ mint_authority = 'B61ZzjjZskE9yur2CBe4H4NFS3XHdEZdatKNegC9smUV',
71
+ freeze_authority = 'B61ZzjjZskE9yur2CBe4H4NFS3XHdEZdatKNegC9smUV',
72
+ update_authority = 'B61ZzjjZskE9yur2CBe4H4NFS3XHdEZdatKNegC9smUV',
73
+ is_verified_collection = True,
74
+ is_wrapped = False, ),
75
+ social_medias = chainstream.openapi_client.models.token_social_medias_dto.TokenSocialMediasDTO(
76
+ twitter = '@circle',
77
+ telegram = 'https://t.me/circle',
78
+ website = 'https://www.circle.com',
79
+ tiktok = '@circle',
80
+ discord = 'https://discord.gg/circle',
81
+ facebook = 'https://facebook.com/circle',
82
+ github = 'https://github.com/circle',
83
+ instagram = '@circle',
84
+ linkedin = 'https://linkedin.com/company/circle',
85
+ medium = 'https://medium.com/@circle',
86
+ reddit = 'https://reddit.com/r/circle',
87
+ youtube = 'https://youtube.com/@circle',
88
+ bitbucket = 'https://bitbucket.org/circle', ),
89
+ token_created_at = 1710417600000,
90
+ description = 'USDC is a stablecoin pegged to the US dollar',
91
+ dev_total_tokens = '163',
92
+ dev_last_token_created_at = '2025-12-03T09:23:34.000Z',
93
+ market = 'USDC-SOL',
94
+ extension = {website=https://www.circle.com/usdc, twitter=@circle},
95
+ stats = chainstream.openapi_client.models.token_stat.TokenStat(
96
+ address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
97
+ price1m = '1.234',
98
+ buys1m = '150',
99
+ sells1m = '120',
100
+ buy_volumes1m = '50000.45',
101
+ sells_volumes1m = '45000.32',
102
+ volumes1m = '95000.77',
103
+ buy_volumes_in_usd1m = '50000.45',
104
+ sell_volumes_in_usd1m = '45000.32',
105
+ volumes_in_usd1m = '95000.77',
106
+ buyers1m = '50',
107
+ sellers1m = '45',
108
+ open_price_in_usd1m = '1.255',
109
+ close_price_in_usd1m = '1.265',
110
+ price_change_ratio_in_usd1m = '0.01',
111
+ trades1m = '270',
112
+ traders1m = '270',
113
+ high_in_usd1m = '1.275',
114
+ low_in_usd1m = '1.235',
115
+ price5m = '1.245',
116
+ buys5m = '150',
117
+ sells5m = '120',
118
+ buy_volumes5m = '50000.45',
119
+ sells_volumes5m = '45000.32',
120
+ volumes5m = '95000.77',
121
+ buy_volumes_in_usd5m = '50000.45',
122
+ sell_volumes_in_usd5m = '45000.32',
123
+ volumes_in_usd5m = '95000.77',
124
+ buyers5m = '50',
125
+ sellers5m = '45',
126
+ open_price_in_usd5m = '1.255',
127
+ close_price_in_usd5m = '1.265',
128
+ price_change_ratio_in_usd5m = '0.01',
129
+ trades5m = '270',
130
+ traders5m = '270',
131
+ high_in_usd5m = '1.275',
132
+ low_in_usd5m = '1.235',
133
+ price15m = '1.255',
134
+ buys15m = '150',
135
+ sells15m = '120',
136
+ buy_volumes15m = '50000.45',
137
+ sells_volumes15m = '45000.32',
138
+ volumes15m = '95000.77',
139
+ buy_volumes_in_usd15m = '50000.45',
140
+ sell_volumes_in_usd15m = '45000.32',
141
+ volumes_in_usd15m = '95000.77',
142
+ buyers15m = '50',
143
+ sellers15m = '45',
144
+ open_price_in_usd15m = '1.255',
145
+ close_price_in_usd15m = '1.265',
146
+ price_change_ratio_in_usd15m = '0.01',
147
+ trades15m = '270',
148
+ traders15m = '270',
149
+ high_in_usd15m = '1.275',
150
+ low_in_usd15m = '1.235',
151
+ price30m = '1.265',
152
+ buys30m = '150',
153
+ sells30m = '120',
154
+ buy_volumes30m = '50000.45',
155
+ sells_volumes30m = '45000.32',
156
+ volumes30m = '95000.77',
157
+ buy_volumes_in_usd30m = '50000.45',
158
+ sell_volumes_in_usd30m = '45000.32',
159
+ volumes_in_usd30m = '95000.77',
160
+ buyers30m = '50',
161
+ sellers30m = '45',
162
+ open_price_in_usd30m = '1.255',
163
+ close_price_in_usd30m = '1.265',
164
+ price_change_ratio_in_usd30m = '0.01',
165
+ trades30m = '270',
166
+ traders30m = '270',
167
+ high_in_usd30m = '1.275',
168
+ low_in_usd30m = '1.235',
169
+ price1h = '1.275',
170
+ buys1h = '150',
171
+ sells1h = '120',
172
+ buy_volumes1h = '50000.45',
173
+ sells_volumes1h = '45000.32',
174
+ volumes1h = '95000.77',
175
+ buy_volumes_in_usd1h = '50000.45',
176
+ sell_volumes_in_usd1h = '45000.32',
177
+ volumes_in_usd1h = '95000.77',
178
+ buyers1h = '50',
179
+ sellers1h = '45',
180
+ open_price_in_usd1h = '1.255',
181
+ close_price_in_usd1h = '1.265',
182
+ price_change_ratio_in_usd1h = '0.01',
183
+ trades1h = '270',
184
+ traders1h = '270',
185
+ high_in_usd1h = '1.275',
186
+ low_in_usd1h = '1.235',
187
+ price4h = '1.285',
188
+ buys4h = '150',
189
+ sells4h = '120',
190
+ buy_volumes4h = '50000.45',
191
+ sells_volumes4h = '45000.32',
192
+ volumes4h = '95000.77',
193
+ buy_volumes_in_usd4h = '50000.45',
194
+ sell_volumes_in_usd4h = '45000.32',
195
+ volumes_in_usd4h = '95000.77',
196
+ buyers4h = '50',
197
+ sellers4h = '45',
198
+ open_price_in_usd4h = '1.255',
199
+ close_price_in_usd4h = '1.265',
200
+ price_change_ratio_in_usd4h = '0.01',
201
+ trades4h = '270',
202
+ traders4h = '270',
203
+ high_in_usd4h = '1.275',
204
+ low_in_usd4h = '1.235',
205
+ price24h = '1.295',
206
+ buys24h = '150',
207
+ sells24h = '120',
208
+ buy_volumes24h = '50000.45',
209
+ sells_volumes24h = '45000.32',
210
+ volumes24h = '95000.77',
211
+ buy_volumes_in_usd24h = '50000.45',
212
+ sell_volumes_in_usd24h = '45000.32',
213
+ volumes_in_usd24h = '95000.77',
214
+ buyers24h = '50',
215
+ sellers24h = '45',
216
+ open_price_in_usd24h = '1.255',
217
+ close_price_in_usd24h = '1.265',
218
+ price_change_ratio_in_usd24h = '0.01',
219
+ trades24h = '270',
220
+ traders24h = '270',
221
+ high_in_usd24h = '1.275',
222
+ low_in_usd24h = '1.235', ),
223
+ liquidity = [
224
+ chainstream.openapi_client.models.dex_pool_dto.DexPoolDTO(
225
+ program_address = 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc',
226
+ protocol_family = 'OrcaWhirpool',
227
+ image = 'https://ipfs.io/ipfs/bafkreid7667676767676767676767676767676767676767676767676767676767676767',
228
+ chain = 'sol',
229
+ pool_address = '58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2',
230
+ protocol_name = 'OrcaWhirpool AMM V2',
231
+ token_a_address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
232
+ token_b_address = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
233
+ tvl_in_usd = '1000000.45',
234
+ tvl_in_sol = '1000000.45',
235
+ type = 1,
236
+ version = 2,
237
+ liquidity_model = 1,
238
+ fee_rate = '0.003',
239
+ tick_spacing = 64,
240
+ token_count = 2,
241
+ created_block_timestamp = '2024-01-15T10:30:00Z',
242
+ token_a_liquidity = null,
243
+ token_b_liquidity = null, )
244
+ ],
245
+ market_data = chainstream.openapi_client.models.token_market_data.TokenMarketData(
246
+ total_supply = '1000000',
247
+ market_cap_in_sol = '100000',
248
+ market_cap_in_usd = '100000',
249
+ top10_total_holdings = '100000',
250
+ top10_holdings_ratio = '0.1',
251
+ top100_total_holdings = '500000',
252
+ top100_holdings_ratio = '0.5',
253
+ holders = '1000',
254
+ price_in_sol = '0.00000261383847574915906643405542',
255
+ price_in_usd = '0.00000261383847574915906643405542',
256
+ max_pool_tvl_in_sol = '0.00000261383847574915906643405542',
257
+ max_pool_tvl_in_usd = '0.00000261383847574915906643405542',
258
+ total_tvl_in_sol = '0.00000261383847574915906643405542',
259
+ total_tvl_in_usd = '0.00000261383847574915906643405542',
260
+ completion_ratio = '0.1',
261
+ top50_total_holdings = '300000',
262
+ top50_holdings_ratio = '0.3',
263
+ bluechip_total_holders = '10',
264
+ bluechip_total_holdings = '50000',
265
+ bluechip_holdings_ratio = '0.05',
266
+ kol_total_holders = '20',
267
+ kol_total_holdings = '30000',
268
+ kol_holdings_ratio = '0.03',
269
+ sniper_total_holders = '15',
270
+ sniper_total_holdings = '25000',
271
+ sniper_holdings_ratio = '0.025',
272
+ pro_total_holders = '25',
273
+ pro_total_holdings = '40000',
274
+ pro_holdings_ratio = '0.04',
275
+ insider_total_holders = '5',
276
+ insider_total_holdings = '20000',
277
+ insider_holdings_ratio = '0.02',
278
+ sandwish_total_holders = '8',
279
+ sandwish_total_holdings = '15000',
280
+ sandwish_holdings_ratio = '0.015',
281
+ fresh_total_holders = '30',
282
+ fresh_total_holdings = '10000',
283
+ fresh_holdings_ratio = '0.01',
284
+ bundle_total_holders = '12',
285
+ bundle_total_holdings = '18000',
286
+ bundle_holdings_ratio = '0.018',
287
+ dev_total_holders = '3',
288
+ dev_total_holdings = '5000',
289
+ dev_holdings_ratio = '0.005', )
290
+ )
291
+ else:
292
+ return Token(
293
+ chain = 'solana',
294
+ decimals = 9,
295
+ name = 'USD Coin',
296
+ symbol = 'USDC',
297
+ address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
298
+ market_data = chainstream.openapi_client.models.token_market_data.TokenMarketData(
299
+ total_supply = '1000000',
300
+ market_cap_in_sol = '100000',
301
+ market_cap_in_usd = '100000',
302
+ top10_total_holdings = '100000',
303
+ top10_holdings_ratio = '0.1',
304
+ top100_total_holdings = '500000',
305
+ top100_holdings_ratio = '0.5',
306
+ holders = '1000',
307
+ price_in_sol = '0.00000261383847574915906643405542',
308
+ price_in_usd = '0.00000261383847574915906643405542',
309
+ max_pool_tvl_in_sol = '0.00000261383847574915906643405542',
310
+ max_pool_tvl_in_usd = '0.00000261383847574915906643405542',
311
+ total_tvl_in_sol = '0.00000261383847574915906643405542',
312
+ total_tvl_in_usd = '0.00000261383847574915906643405542',
313
+ completion_ratio = '0.1',
314
+ top50_total_holdings = '300000',
315
+ top50_holdings_ratio = '0.3',
316
+ bluechip_total_holders = '10',
317
+ bluechip_total_holdings = '50000',
318
+ bluechip_holdings_ratio = '0.05',
319
+ kol_total_holders = '20',
320
+ kol_total_holdings = '30000',
321
+ kol_holdings_ratio = '0.03',
322
+ sniper_total_holders = '15',
323
+ sniper_total_holdings = '25000',
324
+ sniper_holdings_ratio = '0.025',
325
+ pro_total_holders = '25',
326
+ pro_total_holdings = '40000',
327
+ pro_holdings_ratio = '0.04',
328
+ insider_total_holders = '5',
329
+ insider_total_holdings = '20000',
330
+ insider_holdings_ratio = '0.02',
331
+ sandwish_total_holders = '8',
332
+ sandwish_total_holdings = '15000',
333
+ sandwish_holdings_ratio = '0.015',
334
+ fresh_total_holders = '30',
335
+ fresh_total_holdings = '10000',
336
+ fresh_holdings_ratio = '0.01',
337
+ bundle_total_holders = '12',
338
+ bundle_total_holdings = '18000',
339
+ bundle_holdings_ratio = '0.018',
340
+ dev_total_holders = '3',
341
+ dev_total_holdings = '5000',
342
+ dev_holdings_ratio = '0.005', ),
343
+ )
344
+ """
345
+
346
+ def testToken(self):
347
+ """Test Token"""
348
+ # inst_req_only = self.make_instance(include_optional=False)
349
+ # inst_req_and_optional = self.make_instance(include_optional=True)
350
+
351
+ if __name__ == '__main__':
352
+ unittest.main()
@@ -0,0 +1,193 @@
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
+
16
+ import unittest
17
+
18
+ from chainstream.openapi_client.api.token_api import TokenApi
19
+
20
+
21
+ class TestTokenApi(unittest.IsolatedAsyncioTestCase):
22
+ """TokenApi unit test stubs"""
23
+
24
+ async def asyncSetUp(self) -> None:
25
+ self.api = TokenApi()
26
+
27
+ async def asyncTearDown(self) -> None:
28
+ await self.api.api_client.close()
29
+
30
+ async def test_get_candles(self) -> None:
31
+ """Test case for get_candles
32
+
33
+ CONTROLLER.TOKEN.GET_CANDLES.SUMMARY
34
+ """
35
+ pass
36
+
37
+ async def test_get_creation(self) -> None:
38
+ """Test case for get_creation
39
+
40
+ CONTROLLER.TOKEN.GET_CREATION.SUMMARY
41
+ """
42
+ pass
43
+
44
+ async def test_get_dev_tokens(self) -> None:
45
+ """Test case for get_dev_tokens
46
+
47
+ CONTROLLER.TOKEN.GET_DEV_TOKENS.SUMMARY
48
+ """
49
+ pass
50
+
51
+ async def test_get_holders(self) -> None:
52
+ """Test case for get_holders
53
+
54
+ CONTROLLER.TOKEN.GET_HOLDERS.SUMMARY
55
+ """
56
+ pass
57
+
58
+ async def test_get_holders_multi(self) -> None:
59
+ """Test case for get_holders_multi
60
+
61
+ CONTROLLER.TOKEN.GET_HOLDERS_MULTI.SUMMARY
62
+ """
63
+ pass
64
+
65
+ async def test_get_market_data(self) -> None:
66
+ """Test case for get_market_data
67
+
68
+ CONTROLLER.TOKEN.GET_MARKET_CAP.SUMMARY
69
+ """
70
+ pass
71
+
72
+ async def test_get_market_data_multi(self) -> None:
73
+ """Test case for get_market_data_multi
74
+
75
+ CONTROLLER.TOKEN.GET_MARKET_DATA_MULTI.SUMMARY
76
+ """
77
+ pass
78
+
79
+ async def test_get_metadata(self) -> None:
80
+ """Test case for get_metadata
81
+
82
+ CONTROLLER.TOKEN.GET_METADATA.SUMMARY
83
+ """
84
+ pass
85
+
86
+ async def test_get_metadata_multi(self) -> None:
87
+ """Test case for get_metadata_multi
88
+
89
+ CONTROLLER.TOKEN.GET_METADATA_MULTI.SUMMARY
90
+ """
91
+ pass
92
+
93
+ async def test_get_mint_and_burn(self) -> None:
94
+ """Test case for get_mint_and_burn
95
+
96
+ CONTROLLER.TOKEN.GET_MINT_AND_BURN.SUMMARY
97
+ """
98
+ pass
99
+
100
+ async def test_get_pools(self) -> None:
101
+ """Test case for get_pools
102
+
103
+ CONTROLLER.TOKEN.GET_POOLS.SUMMARY
104
+ """
105
+ pass
106
+
107
+ async def test_get_price_by_time(self) -> None:
108
+ """Test case for get_price_by_time
109
+
110
+ CONTROLLER.TOKEN.GET_PRICE_BY_TIME.SUMMARY
111
+ """
112
+ pass
113
+
114
+ async def test_get_prices(self) -> None:
115
+ """Test case for get_prices
116
+
117
+ CONTROLLER.TOKEN.GET_PRICES.SUMMARY
118
+ """
119
+ pass
120
+
121
+ async def test_get_security(self) -> None:
122
+ """Test case for get_security
123
+
124
+ CONTROLLER.TOKEN.GET_SECURITY.SUMMARY
125
+ """
126
+ pass
127
+
128
+ async def test_get_stats(self) -> None:
129
+ """Test case for get_stats
130
+
131
+ CONTROLLER.TOKEN.GET_STATS.SUMMARY
132
+ """
133
+ pass
134
+
135
+ async def test_get_stats_multi(self) -> None:
136
+ """Test case for get_stats_multi
137
+
138
+ CONTROLLER.TOKEN.GET_STATS_MULTI.SUMMARY
139
+ """
140
+ pass
141
+
142
+ async def test_get_token(self) -> None:
143
+ """Test case for get_token
144
+
145
+ CONTROLLER.TOKEN.GET.SUMMARY
146
+ """
147
+ pass
148
+
149
+ async def test_get_token_liquidity_snapshots(self) -> None:
150
+ """Test case for get_token_liquidity_snapshots
151
+
152
+ CONTROLLER.TOKEN.GET_LIQUIDITY_SNAPSHOTS.SUMMARY
153
+ """
154
+ pass
155
+
156
+ async def test_get_token_traders(self) -> None:
157
+ """Test case for get_token_traders
158
+
159
+ CONTROLLER.TOKEN.GET_TOKEN_TRADERS.SUMMARY
160
+ """
161
+ pass
162
+
163
+ async def test_get_tokens(self) -> None:
164
+ """Test case for get_tokens
165
+
166
+ CONTROLLER.TOKEN.GET_TOKENS.SUMMARY
167
+ """
168
+ pass
169
+
170
+ async def test_get_top_holders(self) -> None:
171
+ """Test case for get_top_holders
172
+
173
+ CONTROLLER.TOKEN.GET_TOP_HOLDERS.SUMMARY
174
+ """
175
+ pass
176
+
177
+ async def test_list_token(self) -> None:
178
+ """Test case for list_token
179
+
180
+ CONTROLLER.TOKEN.GET_TOKEN_LIST.SUMMARY
181
+ """
182
+ pass
183
+
184
+ async def test_search(self) -> None:
185
+ """Test case for search
186
+
187
+ CONTROLLER.TOKEN.SEARCH.SUMMARY
188
+ """
189
+ pass
190
+
191
+
192
+ if __name__ == '__main__':
193
+ unittest.main()