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.
- chainstream/__init__.py +46 -0
- chainstream/client.py +104 -0
- chainstream/openapi_client/__init__.py +156 -0
- chainstream/openapi_client/api/__init__.py +20 -0
- chainstream/openapi_client/api/blockchain_api.py +549 -0
- chainstream/openapi_client/api/defi_sol_moonshot_api.py +590 -0
- chainstream/openapi_client/api/defi_sol_pumpfun_api.py +314 -0
- chainstream/openapi_client/api/dex_api.py +1576 -0
- chainstream/openapi_client/api/dex_pool_api.py +645 -0
- chainstream/openapi_client/api/endpoint_api.py +1934 -0
- chainstream/openapi_client/api/ipfs_api.py +283 -0
- chainstream/openapi_client/api/jobs_api.py +562 -0
- chainstream/openapi_client/api/kyt_api.py +3743 -0
- chainstream/openapi_client/api/ranking_api.py +2067 -0
- chainstream/openapi_client/api/red_packet_api.py +2444 -0
- chainstream/openapi_client/api/token_api.py +9211 -0
- chainstream/openapi_client/api/trade_api.py +1352 -0
- chainstream/openapi_client/api/transaction_api.py +882 -0
- chainstream/openapi_client/api/wallet_api.py +1608 -0
- chainstream/openapi_client/api/watchlist_api.py +316 -0
- chainstream/openapi_client/api_client.py +801 -0
- chainstream/openapi_client/api_response.py +21 -0
- chainstream/openapi_client/configuration.py +572 -0
- chainstream/openapi_client/exceptions.py +217 -0
- chainstream/openapi_client/models/__init__.py +122 -0
- chainstream/openapi_client/models/address_exposure.py +94 -0
- chainstream/openapi_client/models/address_risk_response_dto.py +112 -0
- chainstream/openapi_client/models/alert_detail.py +100 -0
- chainstream/openapi_client/models/alterya_identification.py +106 -0
- chainstream/openapi_client/models/balance_change_type.py +38 -0
- chainstream/openapi_client/models/balance_token_type.py +38 -0
- chainstream/openapi_client/models/balance_update_dto.py +130 -0
- chainstream/openapi_client/models/balance_update_page.py +104 -0
- chainstream/openapi_client/models/blockchain_dto.py +94 -0
- chainstream/openapi_client/models/blockchain_latest_block_dto.py +90 -0
- chainstream/openapi_client/models/boolean_result_dto.py +88 -0
- chainstream/openapi_client/models/calculate_pnl_input.py +88 -0
- chainstream/openapi_client/models/candle.py +101 -0
- chainstream/openapi_client/models/chain.py +39 -0
- chainstream/openapi_client/models/chain_symbol.py +39 -0
- chainstream/openapi_client/models/chainalysis_address_identification.py +92 -0
- chainstream/openapi_client/models/claim_red_packet_input.py +103 -0
- chainstream/openapi_client/models/create_endpoint_input.py +102 -0
- chainstream/openapi_client/models/create_red_packet_input.py +112 -0
- chainstream/openapi_client/models/create_red_packet_reply.py +90 -0
- chainstream/openapi_client/models/create_token_input.py +110 -0
- chainstream/openapi_client/models/create_token_reply.py +90 -0
- chainstream/openapi_client/models/dev_token_dto.py +106 -0
- chainstream/openapi_client/models/dex_dto.py +94 -0
- chainstream/openapi_client/models/dex_page.py +106 -0
- chainstream/openapi_client/models/dex_pool_dto.py +161 -0
- chainstream/openapi_client/models/dex_pool_snapshot_dto.py +111 -0
- chainstream/openapi_client/models/dex_pool_snapshot_page.py +104 -0
- chainstream/openapi_client/models/dex_pool_token_liquidity.py +100 -0
- chainstream/openapi_client/models/dex_pool_token_snapshot_dto.py +100 -0
- chainstream/openapi_client/models/dex_quote_response.py +98 -0
- chainstream/openapi_client/models/direct_exposure_detail.py +90 -0
- chainstream/openapi_client/models/endpoint_list_response.py +102 -0
- chainstream/openapi_client/models/endpoint_operation_response.py +88 -0
- chainstream/openapi_client/models/endpoint_response.py +108 -0
- chainstream/openapi_client/models/endpoint_secret_response.py +88 -0
- chainstream/openapi_client/models/estimate_gas_limit_input.py +94 -0
- chainstream/openapi_client/models/estimate_gas_limit_response.py +90 -0
- chainstream/openapi_client/models/filter_condition.py +102 -0
- chainstream/openapi_client/models/gas_price_response.py +90 -0
- chainstream/openapi_client/models/job_dto.py +90 -0
- chainstream/openapi_client/models/job_streaming_dto.py +90 -0
- chainstream/openapi_client/models/kyt_register_transfer_request.py +108 -0
- chainstream/openapi_client/models/kyt_register_withdrawal_request.py +111 -0
- chainstream/openapi_client/models/link.py +97 -0
- chainstream/openapi_client/models/moonshot_create_token_input.py +145 -0
- chainstream/openapi_client/models/moonshot_create_token_reply.py +90 -0
- chainstream/openapi_client/models/moonshot_submit_create_token200_response.py +90 -0
- chainstream/openapi_client/models/moonshot_submit_create_token_input.py +90 -0
- chainstream/openapi_client/models/network_identification_org.py +88 -0
- chainstream/openapi_client/models/on_chain_activity.py +88 -0
- chainstream/openapi_client/models/pump_create_token_input.py +155 -0
- chainstream/openapi_client/models/pump_create_token_reply.py +90 -0
- chainstream/openapi_client/models/red_packet_claim_dto.py +103 -0
- chainstream/openapi_client/models/red_packet_claims_page.py +104 -0
- chainstream/openapi_client/models/red_packet_dto.py +121 -0
- chainstream/openapi_client/models/red_packet_reply.py +88 -0
- chainstream/openapi_client/models/red_packet_send_tx_input.py +88 -0
- chainstream/openapi_client/models/red_packet_send_tx_response.py +88 -0
- chainstream/openapi_client/models/red_packets_page.py +104 -0
- chainstream/openapi_client/models/register_address_request.py +88 -0
- chainstream/openapi_client/models/register_address_response_dto.py +88 -0
- chainstream/openapi_client/models/resolution.py +46 -0
- chainstream/openapi_client/models/send_tx_input.py +102 -0
- chainstream/openapi_client/models/send_tx_response.py +92 -0
- chainstream/openapi_client/models/swap_input.py +119 -0
- chainstream/openapi_client/models/swap_reply.py +90 -0
- chainstream/openapi_client/models/swap_route_input.py +127 -0
- chainstream/openapi_client/models/swap_route_response.py +98 -0
- chainstream/openapi_client/models/token.py +158 -0
- chainstream/openapi_client/models/token_creation_dto.py +107 -0
- chainstream/openapi_client/models/token_creation_page.py +106 -0
- chainstream/openapi_client/models/token_creators_dto.py +92 -0
- chainstream/openapi_client/models/token_extra_dto.py +128 -0
- chainstream/openapi_client/models/token_holder.py +94 -0
- chainstream/openapi_client/models/token_holder_page.py +106 -0
- chainstream/openapi_client/models/token_liquidity_snapshot_dto.py +106 -0
- chainstream/openapi_client/models/token_liquidity_snapshot_page.py +104 -0
- chainstream/openapi_client/models/token_list_page.py +106 -0
- chainstream/openapi_client/models/token_market_data.py +174 -0
- chainstream/openapi_client/models/token_metadata.py +132 -0
- chainstream/openapi_client/models/token_page.py +108 -0
- chainstream/openapi_client/models/token_price_dto.py +94 -0
- chainstream/openapi_client/models/token_price_page.py +106 -0
- chainstream/openapi_client/models/token_social_medias_dto.py +112 -0
- chainstream/openapi_client/models/token_stat.py +340 -0
- chainstream/openapi_client/models/token_trader.py +113 -0
- chainstream/openapi_client/models/token_trader_tag.py +45 -0
- chainstream/openapi_client/models/top_traders_dto.py +110 -0
- chainstream/openapi_client/models/top_traders_page.py +106 -0
- chainstream/openapi_client/models/trade_detail_dto.py +136 -0
- chainstream/openapi_client/models/trade_event.py +113 -0
- chainstream/openapi_client/models/trade_page.py +106 -0
- chainstream/openapi_client/models/trade_type.py +38 -0
- chainstream/openapi_client/models/transfer_alerts_response_dto.py +96 -0
- chainstream/openapi_client/models/transfer_base_response_dto.py +112 -0
- chainstream/openapi_client/models/transfer_direct_exposure_response_dto.py +92 -0
- chainstream/openapi_client/models/transfer_network_identifications_response_dto.py +98 -0
- chainstream/openapi_client/models/update_endpoint_input.py +104 -0
- chainstream/openapi_client/models/wallet_balance_detail_dto.py +136 -0
- chainstream/openapi_client/models/wallet_balances_dto.py +100 -0
- chainstream/openapi_client/models/wallet_pnl_dto.py +132 -0
- chainstream/openapi_client/models/withdrawal_address_identifications_response_dto.py +98 -0
- chainstream/openapi_client/models/withdrawal_base_response_dto.py +106 -0
- chainstream/openapi_client/models/withdrawal_fraud_assessment_response_dto.py +96 -0
- chainstream/openapi_client/rest.py +213 -0
- chainstream/openapi_client/test/__init__.py +0 -0
- chainstream/openapi_client/test/test_address_exposure.py +59 -0
- chainstream/openapi_client/test/test_address_risk_response_dto.py +81 -0
- chainstream/openapi_client/test/test_alert_detail.py +65 -0
- chainstream/openapi_client/test/test_alterya_identification.py +69 -0
- chainstream/openapi_client/test/test_balance_change_type.py +34 -0
- chainstream/openapi_client/test/test_balance_token_type.py +34 -0
- chainstream/openapi_client/test/test_balance_update_dto.py +93 -0
- chainstream/openapi_client/test/test_balance_update_page.py +105 -0
- chainstream/openapi_client/test/test_blockchain_api.py +46 -0
- chainstream/openapi_client/test/test_blockchain_dto.py +59 -0
- chainstream/openapi_client/test/test_blockchain_latest_block_dto.py +55 -0
- chainstream/openapi_client/test/test_boolean_result_dto.py +53 -0
- chainstream/openapi_client/test/test_calculate_pnl_input.py +52 -0
- chainstream/openapi_client/test/test_candle.py +65 -0
- chainstream/openapi_client/test/test_chain.py +34 -0
- chainstream/openapi_client/test/test_chain_symbol.py +34 -0
- chainstream/openapi_client/test/test_chainalysis_address_identification.py +57 -0
- chainstream/openapi_client/test/test_claim_red_packet_input.py +58 -0
- chainstream/openapi_client/test/test_create_endpoint_input.py +63 -0
- chainstream/openapi_client/test/test_create_red_packet_input.py +64 -0
- chainstream/openapi_client/test/test_create_red_packet_reply.py +55 -0
- chainstream/openapi_client/test/test_create_token_input.py +63 -0
- chainstream/openapi_client/test/test_create_token_reply.py +55 -0
- chainstream/openapi_client/test/test_defi_sol_moonshot_api.py +46 -0
- chainstream/openapi_client/test/test_defi_sol_pumpfun_api.py +39 -0
- chainstream/openapi_client/test/test_dev_token_dto.py +441 -0
- chainstream/openapi_client/test/test_dex_api.py +67 -0
- chainstream/openapi_client/test/test_dex_dto.py +56 -0
- chainstream/openapi_client/test/test_dex_page.py +70 -0
- chainstream/openapi_client/test/test_dex_pool_api.py +46 -0
- chainstream/openapi_client/test/test_dex_pool_dto.py +88 -0
- chainstream/openapi_client/test/test_dex_pool_snapshot_dto.py +96 -0
- chainstream/openapi_client/test/test_dex_pool_snapshot_page.py +81 -0
- chainstream/openapi_client/test/test_dex_pool_token_liquidity.py +65 -0
- chainstream/openapi_client/test/test_dex_pool_token_snapshot_dto.py +65 -0
- chainstream/openapi_client/test/test_dex_quote_response.py +57 -0
- chainstream/openapi_client/test/test_direct_exposure_detail.py +55 -0
- chainstream/openapi_client/test/test_endpoint_api.py +81 -0
- chainstream/openapi_client/test/test_endpoint_list_response.py +72 -0
- chainstream/openapi_client/test/test_endpoint_operation_response.py +52 -0
- chainstream/openapi_client/test/test_endpoint_response.py +66 -0
- chainstream/openapi_client/test/test_endpoint_secret_response.py +52 -0
- chainstream/openapi_client/test/test_estimate_gas_limit_input.py +58 -0
- chainstream/openapi_client/test/test_estimate_gas_limit_response.py +55 -0
- chainstream/openapi_client/test/test_filter_condition.py +54 -0
- chainstream/openapi_client/test/test_gas_price_response.py +55 -0
- chainstream/openapi_client/test/test_ipfs_api.py +39 -0
- chainstream/openapi_client/test/test_job_dto.py +55 -0
- chainstream/openapi_client/test/test_job_streaming_dto.py +55 -0
- chainstream/openapi_client/test/test_jobs_api.py +46 -0
- chainstream/openapi_client/test/test_kyt_api.py +130 -0
- chainstream/openapi_client/test/test_kyt_register_transfer_request.py +59 -0
- chainstream/openapi_client/test/test_kyt_register_withdrawal_request.py +65 -0
- chainstream/openapi_client/test/test_link.py +55 -0
- chainstream/openapi_client/test/test_moonshot_create_token_input.py +79 -0
- chainstream/openapi_client/test/test_moonshot_create_token_reply.py +55 -0
- chainstream/openapi_client/test/test_moonshot_submit_create_token200_response.py +53 -0
- chainstream/openapi_client/test/test_moonshot_submit_create_token_input.py +54 -0
- chainstream/openapi_client/test/test_network_identification_org.py +53 -0
- chainstream/openapi_client/test/test_on_chain_activity.py +53 -0
- chainstream/openapi_client/test/test_pump_create_token_input.py +71 -0
- chainstream/openapi_client/test/test_pump_create_token_reply.py +54 -0
- chainstream/openapi_client/test/test_ranking_api.py +67 -0
- chainstream/openapi_client/test/test_red_packet_api.py +88 -0
- chainstream/openapi_client/test/test_red_packet_claim_dto.py +67 -0
- chainstream/openapi_client/test/test_red_packet_claims_page.py +81 -0
- chainstream/openapi_client/test/test_red_packet_dto.py +85 -0
- chainstream/openapi_client/test/test_red_packet_reply.py +53 -0
- chainstream/openapi_client/test/test_red_packet_send_tx_input.py +53 -0
- chainstream/openapi_client/test/test_red_packet_send_tx_response.py +53 -0
- chainstream/openapi_client/test/test_red_packets_page.py +99 -0
- chainstream/openapi_client/test/test_register_address_request.py +53 -0
- chainstream/openapi_client/test/test_register_address_response_dto.py +53 -0
- chainstream/openapi_client/test/test_resolution.py +34 -0
- chainstream/openapi_client/test/test_send_tx_input.py +55 -0
- chainstream/openapi_client/test/test_send_tx_response.py +57 -0
- chainstream/openapi_client/test/test_swap_input.py +65 -0
- chainstream/openapi_client/test/test_swap_reply.py +55 -0
- chainstream/openapi_client/test/test_swap_route_input.py +69 -0
- chainstream/openapi_client/test/test_swap_route_response.py +85 -0
- chainstream/openapi_client/test/test_token.py +352 -0
- chainstream/openapi_client/test/test_token_api.py +193 -0
- chainstream/openapi_client/test/test_token_creation_dto.py +64 -0
- chainstream/openapi_client/test/test_token_creation_page.py +76 -0
- chainstream/openapi_client/test/test_token_creators_dto.py +54 -0
- chainstream/openapi_client/test/test_token_extra_dto.py +72 -0
- chainstream/openapi_client/test/test_token_holder.py +59 -0
- chainstream/openapi_client/test/test_token_holder_page.py +70 -0
- chainstream/openapi_client/test/test_token_liquidity_snapshot_dto.py +71 -0
- chainstream/openapi_client/test/test_token_liquidity_snapshot_page.py +83 -0
- chainstream/openapi_client/test/test_token_list_page.py +154 -0
- chainstream/openapi_client/test/test_token_market_data.py +101 -0
- chainstream/openapi_client/test/test_token_metadata.py +110 -0
- chainstream/openapi_client/test/test_token_page.py +155 -0
- chainstream/openapi_client/test/test_token_price_dto.py +59 -0
- chainstream/openapi_client/test/test_token_price_page.py +70 -0
- chainstream/openapi_client/test/test_token_social_medias_dto.py +64 -0
- chainstream/openapi_client/test/test_token_stat.py +257 -0
- chainstream/openapi_client/test/test_token_trader.py +65 -0
- chainstream/openapi_client/test/test_token_trader_tag.py +34 -0
- chainstream/openapi_client/test/test_top_traders_dto.py +75 -0
- chainstream/openapi_client/test/test_top_traders_page.py +86 -0
- chainstream/openapi_client/test/test_trade_api.py +53 -0
- chainstream/openapi_client/test/test_trade_detail_dto.py +101 -0
- chainstream/openapi_client/test/test_trade_event.py +77 -0
- chainstream/openapi_client/test/test_trade_page.py +112 -0
- chainstream/openapi_client/test/test_trade_type.py +34 -0
- chainstream/openapi_client/test/test_transaction_api.py +53 -0
- chainstream/openapi_client/test/test_transfer_alerts_response_dto.py +71 -0
- chainstream/openapi_client/test/test_transfer_base_response_dto.py +77 -0
- chainstream/openapi_client/test/test_transfer_direct_exposure_response_dto.py +57 -0
- chainstream/openapi_client/test/test_transfer_network_identifications_response_dto.py +61 -0
- chainstream/openapi_client/test/test_update_endpoint_input.py +64 -0
- chainstream/openapi_client/test/test_wallet_api.py +67 -0
- chainstream/openapi_client/test/test_wallet_balance_detail_dto.py +101 -0
- chainstream/openapi_client/test/test_wallet_balances_dto.py +111 -0
- chainstream/openapi_client/test/test_wallet_pnl_dto.py +97 -0
- chainstream/openapi_client/test/test_watchlist_api.py +39 -0
- chainstream/openapi_client/test/test_withdrawal_address_identifications_response_dto.py +65 -0
- chainstream/openapi_client/test/test_withdrawal_base_response_dto.py +71 -0
- chainstream/openapi_client/test/test_withdrawal_fraud_assessment_response_dto.py +73 -0
- chainstream/stream/__init__.py +74 -0
- chainstream/stream/client.py +761 -0
- chainstream/stream/fields.py +284 -0
- chainstream/stream/models.py +415 -0
- chainstream_sdk-0.1.0.dist-info/METADATA +80 -0
- chainstream_sdk-0.1.0.dist-info/RECORD +261 -0
- chainstream_sdk-0.1.0.dist-info/WHEEL +4 -0
- chainstream_sdk-0.1.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class TokenLiquiditySnapshotDTO(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TokenLiquiditySnapshotDTO
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
snapshot_time: StrictInt = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.SNAPSHOT_TIME", alias="snapshotTime")
|
|
31
|
+
max_liquidity_pool_address: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.MAX_LIQUIDITY_POOL_ADDRESS", alias="maxLiquidityPoolAddress")
|
|
32
|
+
max_liquidity_in_usd: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.MAX_LIQUIDITY_IN_USD", alias="maxLiquidityInUsd")
|
|
33
|
+
max_liquidity_in_native: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.MAX_LIQUIDITY_IN_NATIVE", alias="maxLiquidityInNative")
|
|
34
|
+
total_liquidity_in_usd: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.TOTAL_LIQUIDITY_IN_USD", alias="totalLiquidityInUsd")
|
|
35
|
+
total_liquidity_in_native: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.TOTAL_LIQUIDITY_IN_NATIVE", alias="totalLiquidityInNative")
|
|
36
|
+
pool_count: StrictInt = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.POOL_COUNT", alias="poolCount")
|
|
37
|
+
price_usd: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.PRICE_USD", alias="priceUsd")
|
|
38
|
+
price_native: StrictStr = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.PRICE_NATIVE", alias="priceNative")
|
|
39
|
+
calculated_at: StrictInt = Field(description="DTO.TOKEN.LIQUIDITY_SNAPSHOT.CALCULATED_AT", alias="calculatedAt")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["snapshotTime", "maxLiquidityPoolAddress", "maxLiquidityInUsd", "maxLiquidityInNative", "totalLiquidityInUsd", "totalLiquidityInNative", "poolCount", "priceUsd", "priceNative", "calculatedAt"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of TokenLiquiditySnapshotDTO from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of TokenLiquiditySnapshotDTO from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"snapshotTime": obj.get("snapshotTime"),
|
|
94
|
+
"maxLiquidityPoolAddress": obj.get("maxLiquidityPoolAddress"),
|
|
95
|
+
"maxLiquidityInUsd": obj.get("maxLiquidityInUsd"),
|
|
96
|
+
"maxLiquidityInNative": obj.get("maxLiquidityInNative"),
|
|
97
|
+
"totalLiquidityInUsd": obj.get("totalLiquidityInUsd"),
|
|
98
|
+
"totalLiquidityInNative": obj.get("totalLiquidityInNative"),
|
|
99
|
+
"poolCount": obj.get("poolCount"),
|
|
100
|
+
"priceUsd": obj.get("priceUsd"),
|
|
101
|
+
"priceNative": obj.get("priceNative"),
|
|
102
|
+
"calculatedAt": obj.get("calculatedAt")
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from chainstream.openapi_client.models.token_liquidity_snapshot_dto import TokenLiquiditySnapshotDTO
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TokenLiquiditySnapshotPage(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TokenLiquiditySnapshotPage
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
data: List[TokenLiquiditySnapshotDTO] = Field(description="DTO.PAGE.DATA")
|
|
32
|
+
start_cursor: Optional[StrictStr] = Field(default=None, description="DTO.PAGE.START_CURSOR", alias="startCursor")
|
|
33
|
+
end_cursor: Optional[StrictStr] = Field(default=None, description="DTO.PAGE.END_CURSOR", alias="endCursor")
|
|
34
|
+
has_next: StrictBool = Field(description="DTO.PAGE.HAS_NEXT", alias="hasNext")
|
|
35
|
+
has_prev: StrictBool = Field(description="DTO.PAGE.HAS_PREV", alias="hasPrev")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["data", "startCursor", "endCursor", "hasNext", "hasPrev"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of TokenLiquiditySnapshotPage from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
|
78
|
+
_items = []
|
|
79
|
+
if self.data:
|
|
80
|
+
for _item_data in self.data:
|
|
81
|
+
if _item_data:
|
|
82
|
+
_items.append(_item_data.to_dict())
|
|
83
|
+
_dict['data'] = _items
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of TokenLiquiditySnapshotPage from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"data": [TokenLiquiditySnapshotDTO.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
|
97
|
+
"startCursor": obj.get("startCursor"),
|
|
98
|
+
"endCursor": obj.get("endCursor"),
|
|
99
|
+
"hasNext": obj.get("hasNext") if obj.get("hasNext") is not None else False,
|
|
100
|
+
"hasPrev": obj.get("hasPrev") if obj.get("hasPrev") is not None else False
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
103
|
+
|
|
104
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from chainstream.openapi_client.models.token import Token
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TokenListPage(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TokenListPage
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
has_next: Optional[StrictBool] = Field(default=False, description="DTO.PAGE.HAS_NEXT", alias="hasNext")
|
|
32
|
+
has_prev: Optional[StrictBool] = Field(default=False, description="DTO.PAGE.HAS_PREV", alias="hasPrev")
|
|
33
|
+
start_cursor: Optional[StrictStr] = Field(default=None, description="DTO.PAGE.START_CURSOR", alias="startCursor")
|
|
34
|
+
end_cursor: Optional[StrictStr] = Field(default=None, description="DTO.PAGE.END_CURSOR", alias="endCursor")
|
|
35
|
+
total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="DTO.PAGE.TOTAL")
|
|
36
|
+
data: List[Token] = Field(description="DTO.TOKEN.PAGE.DATA")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["hasNext", "hasPrev", "startCursor", "endCursor", "total", "data"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of TokenListPage from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.data:
|
|
81
|
+
for _item_data in self.data:
|
|
82
|
+
if _item_data:
|
|
83
|
+
_items.append(_item_data.to_dict())
|
|
84
|
+
_dict['data'] = _items
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of TokenListPage from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"hasNext": obj.get("hasNext") if obj.get("hasNext") is not None else False,
|
|
98
|
+
"hasPrev": obj.get("hasPrev") if obj.get("hasPrev") is not None else False,
|
|
99
|
+
"startCursor": obj.get("startCursor"),
|
|
100
|
+
"endCursor": obj.get("endCursor"),
|
|
101
|
+
"total": obj.get("total"),
|
|
102
|
+
"data": [Token.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class TokenMarketData(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TokenMarketData
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
total_supply: StrictStr = Field(description="DTO.TOKEN.MARKET_CAP.TOTAL_SUPPLY", alias="totalSupply")
|
|
31
|
+
market_cap_in_sol: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.MARKET_CAP_IN_SOL", alias="marketCapInSol")
|
|
32
|
+
market_cap_in_usd: StrictStr = Field(description="DTO.TOKEN.MARKET_CAP.MARKET_CAP_IN_USD", alias="marketCapInUsd")
|
|
33
|
+
top10_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.TOP10_TOTAL_HOLDINGS", alias="top10TotalHoldings")
|
|
34
|
+
top10_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.TOP10_HOLDINGS_RATIO", alias="top10HoldingsRatio")
|
|
35
|
+
top100_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.TOP100_TOTAL_HOLDINGS", alias="top100TotalHoldings")
|
|
36
|
+
top100_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.TOP100_HOLDINGS_RATIO", alias="top100HoldingsRatio")
|
|
37
|
+
holders: StrictStr = Field(description="DTO.TOKEN.MARKET_CAP.HOLDERS")
|
|
38
|
+
price_in_sol: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.PRICE_IN_SOL", alias="priceInSol")
|
|
39
|
+
price_in_usd: StrictStr = Field(description="DTO.TOKEN.MARKET_CAP.PRICE_IN_USD", alias="priceInUsd")
|
|
40
|
+
max_pool_tvl_in_sol: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.MAX_POOL_TVL_IN_SOL", alias="maxPoolTvlInSol")
|
|
41
|
+
max_pool_tvl_in_usd: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.MAX_POOL_TVL_IN_USD", alias="maxPoolTvlInUsd")
|
|
42
|
+
total_tvl_in_sol: StrictStr = Field(description="DTO.TOKEN.MARKET_CAP.TOTAL_TVL_IN_SOL", alias="totalTvlInSol")
|
|
43
|
+
total_tvl_in_usd: StrictStr = Field(description="DTO.TOKEN.MARKET_CAP.TOTAL_TVL_IN_USD", alias="totalTvlInUsd")
|
|
44
|
+
completion_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.COMPLETION_RATIO", alias="completionRatio")
|
|
45
|
+
top50_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.TOP50_TOTAL_HOLDINGS", alias="top50TotalHoldings")
|
|
46
|
+
top50_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.TOP50_HOLDINGS_RATIO", alias="top50HoldingsRatio")
|
|
47
|
+
bluechip_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.BLUECHIP_TOTAL_HOLDERS", alias="bluechipTotalHolders")
|
|
48
|
+
bluechip_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.BLUECHIP_TOTAL_HOLDINGS", alias="bluechipTotalHoldings")
|
|
49
|
+
bluechip_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.BLUECHIP_HOLDINGS_RATIO", alias="bluechipHoldingsRatio")
|
|
50
|
+
kol_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.KOL_TOTAL_HOLDERS", alias="kolTotalHolders")
|
|
51
|
+
kol_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.KOL_TOTAL_HOLDINGS", alias="kolTotalHoldings")
|
|
52
|
+
kol_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.KOL_HOLDINGS_RATIO", alias="kolHoldingsRatio")
|
|
53
|
+
sniper_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.SNIPER_TOTAL_HOLDERS", alias="sniperTotalHolders")
|
|
54
|
+
sniper_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.SNIPER_TOTAL_HOLDINGS", alias="sniperTotalHoldings")
|
|
55
|
+
sniper_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.SNIPER_HOLDINGS_RATIO", alias="sniperHoldingsRatio")
|
|
56
|
+
pro_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.PRO_TOTAL_HOLDERS", alias="proTotalHolders")
|
|
57
|
+
pro_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.PRO_TOTAL_HOLDINGS", alias="proTotalHoldings")
|
|
58
|
+
pro_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.PRO_HOLDINGS_RATIO", alias="proHoldingsRatio")
|
|
59
|
+
insider_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.INSIDER_TOTAL_HOLDERS", alias="insiderTotalHolders")
|
|
60
|
+
insider_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.INSIDER_TOTAL_HOLDINGS", alias="insiderTotalHoldings")
|
|
61
|
+
insider_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.INSIDER_HOLDINGS_RATIO", alias="insiderHoldingsRatio")
|
|
62
|
+
sandwish_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.SANDWISH_TOTAL_HOLDERS", alias="sandwishTotalHolders")
|
|
63
|
+
sandwish_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.SANDWISH_TOTAL_HOLDINGS", alias="sandwishTotalHoldings")
|
|
64
|
+
sandwish_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.SANDWISH_HOLDINGS_RATIO", alias="sandwishHoldingsRatio")
|
|
65
|
+
fresh_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.FRESH_TOTAL_HOLDERS", alias="freshTotalHolders")
|
|
66
|
+
fresh_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.FRESH_TOTAL_HOLDINGS", alias="freshTotalHoldings")
|
|
67
|
+
fresh_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.FRESH_HOLDINGS_RATIO", alias="freshHoldingsRatio")
|
|
68
|
+
bundle_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.BUNDLE_TOTAL_HOLDERS", alias="bundleTotalHolders")
|
|
69
|
+
bundle_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.BUNDLE_TOTAL_HOLDINGS", alias="bundleTotalHoldings")
|
|
70
|
+
bundle_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.BUNDLE_HOLDINGS_RATIO", alias="bundleHoldingsRatio")
|
|
71
|
+
dev_total_holders: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.DEV_TOTAL_HOLDERS", alias="devTotalHolders")
|
|
72
|
+
dev_total_holdings: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.DEV_TOTAL_HOLDINGS", alias="devTotalHoldings")
|
|
73
|
+
dev_holdings_ratio: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.MARKET_CAP.DEV_HOLDINGS_RATIO", alias="devHoldingsRatio")
|
|
74
|
+
__properties: ClassVar[List[str]] = ["totalSupply", "marketCapInSol", "marketCapInUsd", "top10TotalHoldings", "top10HoldingsRatio", "top100TotalHoldings", "top100HoldingsRatio", "holders", "priceInSol", "priceInUsd", "maxPoolTvlInSol", "maxPoolTvlInUsd", "totalTvlInSol", "totalTvlInUsd", "completionRatio", "top50TotalHoldings", "top50HoldingsRatio", "bluechipTotalHolders", "bluechipTotalHoldings", "bluechipHoldingsRatio", "kolTotalHolders", "kolTotalHoldings", "kolHoldingsRatio", "sniperTotalHolders", "sniperTotalHoldings", "sniperHoldingsRatio", "proTotalHolders", "proTotalHoldings", "proHoldingsRatio", "insiderTotalHolders", "insiderTotalHoldings", "insiderHoldingsRatio", "sandwishTotalHolders", "sandwishTotalHoldings", "sandwishHoldingsRatio", "freshTotalHolders", "freshTotalHoldings", "freshHoldingsRatio", "bundleTotalHolders", "bundleTotalHoldings", "bundleHoldingsRatio", "devTotalHolders", "devTotalHoldings", "devHoldingsRatio"]
|
|
75
|
+
|
|
76
|
+
model_config = ConfigDict(
|
|
77
|
+
populate_by_name=True,
|
|
78
|
+
validate_assignment=True,
|
|
79
|
+
protected_namespaces=(),
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def to_str(self) -> str:
|
|
84
|
+
"""Returns the string representation of the model using alias"""
|
|
85
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
86
|
+
|
|
87
|
+
def to_json(self) -> str:
|
|
88
|
+
"""Returns the JSON representation of the model using alias"""
|
|
89
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
90
|
+
return json.dumps(self.to_dict())
|
|
91
|
+
|
|
92
|
+
@classmethod
|
|
93
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
94
|
+
"""Create an instance of TokenMarketData from a JSON string"""
|
|
95
|
+
return cls.from_dict(json.loads(json_str))
|
|
96
|
+
|
|
97
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
98
|
+
"""Return the dictionary representation of the model using alias.
|
|
99
|
+
|
|
100
|
+
This has the following differences from calling pydantic's
|
|
101
|
+
`self.model_dump(by_alias=True)`:
|
|
102
|
+
|
|
103
|
+
* `None` is only added to the output dict for nullable fields that
|
|
104
|
+
were set at model initialization. Other fields with value `None`
|
|
105
|
+
are ignored.
|
|
106
|
+
"""
|
|
107
|
+
excluded_fields: Set[str] = set([
|
|
108
|
+
])
|
|
109
|
+
|
|
110
|
+
_dict = self.model_dump(
|
|
111
|
+
by_alias=True,
|
|
112
|
+
exclude=excluded_fields,
|
|
113
|
+
exclude_none=True,
|
|
114
|
+
)
|
|
115
|
+
return _dict
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
119
|
+
"""Create an instance of TokenMarketData from a dict"""
|
|
120
|
+
if obj is None:
|
|
121
|
+
return None
|
|
122
|
+
|
|
123
|
+
if not isinstance(obj, dict):
|
|
124
|
+
return cls.model_validate(obj)
|
|
125
|
+
|
|
126
|
+
_obj = cls.model_validate({
|
|
127
|
+
"totalSupply": obj.get("totalSupply"),
|
|
128
|
+
"marketCapInSol": obj.get("marketCapInSol"),
|
|
129
|
+
"marketCapInUsd": obj.get("marketCapInUsd"),
|
|
130
|
+
"top10TotalHoldings": obj.get("top10TotalHoldings"),
|
|
131
|
+
"top10HoldingsRatio": obj.get("top10HoldingsRatio"),
|
|
132
|
+
"top100TotalHoldings": obj.get("top100TotalHoldings"),
|
|
133
|
+
"top100HoldingsRatio": obj.get("top100HoldingsRatio"),
|
|
134
|
+
"holders": obj.get("holders"),
|
|
135
|
+
"priceInSol": obj.get("priceInSol"),
|
|
136
|
+
"priceInUsd": obj.get("priceInUsd"),
|
|
137
|
+
"maxPoolTvlInSol": obj.get("maxPoolTvlInSol"),
|
|
138
|
+
"maxPoolTvlInUsd": obj.get("maxPoolTvlInUsd"),
|
|
139
|
+
"totalTvlInSol": obj.get("totalTvlInSol"),
|
|
140
|
+
"totalTvlInUsd": obj.get("totalTvlInUsd"),
|
|
141
|
+
"completionRatio": obj.get("completionRatio"),
|
|
142
|
+
"top50TotalHoldings": obj.get("top50TotalHoldings"),
|
|
143
|
+
"top50HoldingsRatio": obj.get("top50HoldingsRatio"),
|
|
144
|
+
"bluechipTotalHolders": obj.get("bluechipTotalHolders"),
|
|
145
|
+
"bluechipTotalHoldings": obj.get("bluechipTotalHoldings"),
|
|
146
|
+
"bluechipHoldingsRatio": obj.get("bluechipHoldingsRatio"),
|
|
147
|
+
"kolTotalHolders": obj.get("kolTotalHolders"),
|
|
148
|
+
"kolTotalHoldings": obj.get("kolTotalHoldings"),
|
|
149
|
+
"kolHoldingsRatio": obj.get("kolHoldingsRatio"),
|
|
150
|
+
"sniperTotalHolders": obj.get("sniperTotalHolders"),
|
|
151
|
+
"sniperTotalHoldings": obj.get("sniperTotalHoldings"),
|
|
152
|
+
"sniperHoldingsRatio": obj.get("sniperHoldingsRatio"),
|
|
153
|
+
"proTotalHolders": obj.get("proTotalHolders"),
|
|
154
|
+
"proTotalHoldings": obj.get("proTotalHoldings"),
|
|
155
|
+
"proHoldingsRatio": obj.get("proHoldingsRatio"),
|
|
156
|
+
"insiderTotalHolders": obj.get("insiderTotalHolders"),
|
|
157
|
+
"insiderTotalHoldings": obj.get("insiderTotalHoldings"),
|
|
158
|
+
"insiderHoldingsRatio": obj.get("insiderHoldingsRatio"),
|
|
159
|
+
"sandwishTotalHolders": obj.get("sandwishTotalHolders"),
|
|
160
|
+
"sandwishTotalHoldings": obj.get("sandwishTotalHoldings"),
|
|
161
|
+
"sandwishHoldingsRatio": obj.get("sandwishHoldingsRatio"),
|
|
162
|
+
"freshTotalHolders": obj.get("freshTotalHolders"),
|
|
163
|
+
"freshTotalHoldings": obj.get("freshTotalHoldings"),
|
|
164
|
+
"freshHoldingsRatio": obj.get("freshHoldingsRatio"),
|
|
165
|
+
"bundleTotalHolders": obj.get("bundleTotalHolders"),
|
|
166
|
+
"bundleTotalHoldings": obj.get("bundleTotalHoldings"),
|
|
167
|
+
"bundleHoldingsRatio": obj.get("bundleHoldingsRatio"),
|
|
168
|
+
"devTotalHolders": obj.get("devTotalHolders"),
|
|
169
|
+
"devTotalHoldings": obj.get("devTotalHoldings"),
|
|
170
|
+
"devHoldingsRatio": obj.get("devHoldingsRatio")
|
|
171
|
+
})
|
|
172
|
+
return _obj
|
|
173
|
+
|
|
174
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from chainstream.openapi_client.models.token_creators_dto import TokenCreatorsDTO
|
|
24
|
+
from chainstream.openapi_client.models.token_extra_dto import TokenExtraDTO
|
|
25
|
+
from chainstream.openapi_client.models.token_social_medias_dto import TokenSocialMediasDTO
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class TokenMetadata(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
TokenMetadata
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
chain: StrictStr = Field(description="DTO.TOKEN.METADATA.CHAIN")
|
|
34
|
+
decimals: StrictInt = Field(description="DTO.TOKEN.METADATA.DECIMALS")
|
|
35
|
+
name: StrictStr = Field(description="DTO.TOKEN.METADATA.NAME")
|
|
36
|
+
symbol: StrictStr = Field(description="DTO.TOKEN.METADATA.SYMBOL")
|
|
37
|
+
metadata_address: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.METADATA.METADATA_ADDRESS", alias="metadataAddress")
|
|
38
|
+
address: StrictStr = Field(description="DTO.TOKEN.METADATA.ADDRESS")
|
|
39
|
+
token_creators: Optional[List[TokenCreatorsDTO]] = Field(default=None, description="DTO.TOKEN.METADATA.TOKEN_CREATORS", alias="tokenCreators")
|
|
40
|
+
image_url: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.METADATA.IMAGE_URL", alias="imageUrl")
|
|
41
|
+
uri: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.METADATA.URI")
|
|
42
|
+
extra: Optional[TokenExtraDTO] = Field(default=None, description="DTO.TOKEN.METADATA.EXTRA")
|
|
43
|
+
social_medias: Optional[TokenSocialMediasDTO] = Field(default=None, description="DTO.TOKEN.METADATA.SOCIAL_MEDIAS", alias="socialMedias")
|
|
44
|
+
token_created_at: Optional[StrictInt] = Field(default=None, description="DTO.TOKEN.METADATA.TOKEN_CREATED_AT", alias="tokenCreatedAt")
|
|
45
|
+
description: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.METADATA.DESCRIPTION")
|
|
46
|
+
dev_total_tokens: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.METADATA.DEV_TOTAL_TOKENS", alias="devTotalTokens")
|
|
47
|
+
dev_last_token_created_at: Optional[StrictStr] = Field(default=None, description="DTO.TOKEN.METADATA.DEV_LAST_TOKEN_CREATED_AT", alias="devLastTokenCreatedAt")
|
|
48
|
+
__properties: ClassVar[List[str]] = ["chain", "decimals", "name", "symbol", "metadataAddress", "address", "tokenCreators", "imageUrl", "uri", "extra", "socialMedias", "tokenCreatedAt", "description", "devTotalTokens", "devLastTokenCreatedAt"]
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_str(self) -> str:
|
|
58
|
+
"""Returns the string representation of the model using alias"""
|
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
def to_json(self) -> str:
|
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
|
63
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
+
"""Create an instance of TokenMetadata from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
|
73
|
+
|
|
74
|
+
This has the following differences from calling pydantic's
|
|
75
|
+
`self.model_dump(by_alias=True)`:
|
|
76
|
+
|
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
|
78
|
+
were set at model initialization. Other fields with value `None`
|
|
79
|
+
are ignored.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
])
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each item in token_creators (list)
|
|
90
|
+
_items = []
|
|
91
|
+
if self.token_creators:
|
|
92
|
+
for _item_token_creators in self.token_creators:
|
|
93
|
+
if _item_token_creators:
|
|
94
|
+
_items.append(_item_token_creators.to_dict())
|
|
95
|
+
_dict['tokenCreators'] = _items
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of extra
|
|
97
|
+
if self.extra:
|
|
98
|
+
_dict['extra'] = self.extra.to_dict()
|
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of social_medias
|
|
100
|
+
if self.social_medias:
|
|
101
|
+
_dict['socialMedias'] = self.social_medias.to_dict()
|
|
102
|
+
return _dict
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
106
|
+
"""Create an instance of TokenMetadata from a dict"""
|
|
107
|
+
if obj is None:
|
|
108
|
+
return None
|
|
109
|
+
|
|
110
|
+
if not isinstance(obj, dict):
|
|
111
|
+
return cls.model_validate(obj)
|
|
112
|
+
|
|
113
|
+
_obj = cls.model_validate({
|
|
114
|
+
"chain": obj.get("chain"),
|
|
115
|
+
"decimals": obj.get("decimals"),
|
|
116
|
+
"name": obj.get("name"),
|
|
117
|
+
"symbol": obj.get("symbol"),
|
|
118
|
+
"metadataAddress": obj.get("metadataAddress"),
|
|
119
|
+
"address": obj.get("address"),
|
|
120
|
+
"tokenCreators": [TokenCreatorsDTO.from_dict(_item) for _item in obj["tokenCreators"]] if obj.get("tokenCreators") is not None else None,
|
|
121
|
+
"imageUrl": obj.get("imageUrl"),
|
|
122
|
+
"uri": obj.get("uri"),
|
|
123
|
+
"extra": TokenExtraDTO.from_dict(obj["extra"]) if obj.get("extra") is not None else None,
|
|
124
|
+
"socialMedias": TokenSocialMediasDTO.from_dict(obj["socialMedias"]) if obj.get("socialMedias") is not None else None,
|
|
125
|
+
"tokenCreatedAt": obj.get("tokenCreatedAt"),
|
|
126
|
+
"description": obj.get("description"),
|
|
127
|
+
"devTotalTokens": obj.get("devTotalTokens"),
|
|
128
|
+
"devLastTokenCreatedAt": obj.get("devLastTokenCreatedAt")
|
|
129
|
+
})
|
|
130
|
+
return _obj
|
|
131
|
+
|
|
132
|
+
|