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