# coding: utf-8

"""
    CryptoAPIs

    Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.  # noqa: E501

    The version of the OpenAPI document: 2021-03-20
    Contact: developers@cryptoapis.io
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


import re  # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictStr

from typing import Optional

from cryptoapis.models.block_height_reached_r import BlockHeightReachedR
from cryptoapis.models.block_height_reached_rb import BlockHeightReachedRB
from cryptoapis.models.mined_transaction_r import MinedTransactionR
from cryptoapis.models.mined_transaction_rb import MinedTransactionRB
from cryptoapis.models.new_block_r import NewBlockR
from cryptoapis.models.new_block_rb import NewBlockRB
from cryptoapis.models.new_confirmed_coins_transactions_and_each_confirmation_r import NewConfirmedCoinsTransactionsAndEachConfirmationR
from cryptoapis.models.new_confirmed_coins_transactions_and_each_confirmation_rb import NewConfirmedCoinsTransactionsAndEachConfirmationRB
from cryptoapis.models.new_confirmed_coins_transactions_r import NewConfirmedCoinsTransactionsR
from cryptoapis.models.new_confirmed_coins_transactions_rb import NewConfirmedCoinsTransactionsRB
from cryptoapis.models.new_confirmed_internal_transactions_and_each_confirmation_r import NewConfirmedInternalTransactionsAndEachConfirmationR
from cryptoapis.models.new_confirmed_internal_transactions_and_each_confirmation_rb import NewConfirmedInternalTransactionsAndEachConfirmationRB
from cryptoapis.models.new_confirmed_internal_transactions_r import NewConfirmedInternalTransactionsR
from cryptoapis.models.new_confirmed_internal_transactions_rb import NewConfirmedInternalTransactionsRB
from cryptoapis.models.new_confirmed_tokens_transactions_and_each_confirmation_r import NewConfirmedTokensTransactionsAndEachConfirmationR
from cryptoapis.models.new_confirmed_tokens_transactions_and_each_confirmation_rb import NewConfirmedTokensTransactionsAndEachConfirmationRB
from cryptoapis.models.new_confirmed_tokens_transactions_r import NewConfirmedTokensTransactionsR
from cryptoapis.models.new_confirmed_tokens_transactions_rb import NewConfirmedTokensTransactionsRB
from cryptoapis.models.new_unconfirmed_coins_transactions_r import NewUnconfirmedCoinsTransactionsR
from cryptoapis.models.new_unconfirmed_coins_transactions_rb import NewUnconfirmedCoinsTransactionsRB
from cryptoapis.models.new_unconfirmed_tokens_transactions_r import NewUnconfirmedTokensTransactionsR
from cryptoapis.models.new_unconfirmed_tokens_transactions_rb import NewUnconfirmedTokensTransactionsRB

from cryptoapis.api_client import ApiClient
from cryptoapis.api_response import ApiResponse
from cryptoapis.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class CreateSubscriptionsForApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_arguments
    def block_height_reached(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, block_height_reached_rb : Optional[BlockHeightReachedRB] = None, **kwargs) -> BlockHeightReachedR:  # noqa: E501
        """Block Height Reached  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific block height that hasn't been reached yet. In this case the event is when the specified block height in the request body is reached in a said blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.block_height_reached(blockchain, network, context, block_height_reached_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param block_height_reached_rb:
        :type block_height_reached_rb: BlockHeightReachedRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: BlockHeightReachedR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the block_height_reached_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.block_height_reached_with_http_info(blockchain, network, context, block_height_reached_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def block_height_reached_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, block_height_reached_rb : Optional[BlockHeightReachedRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Block Height Reached  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific block height that hasn't been reached yet. In this case the event is when the specified block height in the request body is reached in a said blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.block_height_reached_with_http_info(blockchain, network, context, block_height_reached_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param block_height_reached_rb:
        :type block_height_reached_rb: BlockHeightReachedRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(BlockHeightReachedR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'block_height_reached_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method block_height_reached" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['block_height_reached_rb'] is not None:
            _body_params = _params['block_height_reached_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '201': "BlockHeightReachedR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/block-height-reached', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def mined_transaction(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, mined_transaction_rb : Optional[MinedTransactionRB] = None, **kwargs) -> MinedTransactionR:  # noqa: E501
        """Mined Transaction  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a specific transaction is mined. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified `transactionId`.    A transaction is mined when it is included in a new block in the blockchain.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.mined_transaction(blockchain, network, context, mined_transaction_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param mined_transaction_rb:
        :type mined_transaction_rb: MinedTransactionRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: MinedTransactionR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the mined_transaction_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.mined_transaction_with_http_info(blockchain, network, context, mined_transaction_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def mined_transaction_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, mined_transaction_rb : Optional[MinedTransactionRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """Mined Transaction  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a specific transaction is mined. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified `transactionId`.    A transaction is mined when it is included in a new block in the blockchain.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.mined_transaction_with_http_info(blockchain, network, context, mined_transaction_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param mined_transaction_rb:
        :type mined_transaction_rb: MinedTransactionRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(MinedTransactionR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'mined_transaction_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method mined_transaction" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['mined_transaction_rb'] is not None:
            _body_params = _params['mined_transaction_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '200': "MinedTransactionR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/transaction-mined', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_block(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_block_rb : Optional[NewBlockRB] = None, **kwargs) -> NewBlockR:  # noqa: E501
        """New Block  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a new block is mined in the specific blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.    A new block is mined when it is added to the chain once a consensus is reached by the majority of the miners, which is when the block gets validated and added to the blockchain.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_block(blockchain, network, context, new_block_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_block_rb:
        :type new_block_rb: NewBlockRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewBlockR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_block_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_block_with_http_info(blockchain, network, context, new_block_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_block_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_block_rb : Optional[NewBlockRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New Block  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when a new block is mined in the specific blockchain. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.    A new block is mined when it is added to the chain once a consensus is reached by the majority of the miners, which is when the block gets validated and added to the blockchain.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_block_with_http_info(blockchain, network, context, new_block_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_block_rb:
        :type new_block_rb: NewBlockRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewBlockR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_block_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_block" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_block_rb'] is not None:
            _body_params = _params['new_block_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '200': "NewBlockR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/block-mined', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_confirmed_coins_transactions(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_coins_transactions_rb : Optional[NewConfirmedCoinsTransactionsRB] = None, **kwargs) -> NewConfirmedCoinsTransactionsR:  # noqa: E501
        """New confirmed coins transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer's address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block.    {note}For UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that.{/note}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_coins_transactions(blockchain, network, context, new_confirmed_coins_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_coins_transactions_rb:
        :type new_confirmed_coins_transactions_rb: NewConfirmedCoinsTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewConfirmedCoinsTransactionsR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_confirmed_coins_transactions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_confirmed_coins_transactions_with_http_info(blockchain, network, context, new_confirmed_coins_transactions_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_confirmed_coins_transactions_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_coins_transactions_rb : Optional[NewConfirmedCoinsTransactionsRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New confirmed coins transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer's address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block.    {note}For UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that.{/note}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_coins_transactions_with_http_info(blockchain, network, context, new_confirmed_coins_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_coins_transactions_rb:
        :type new_confirmed_coins_transactions_rb: NewConfirmedCoinsTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewConfirmedCoinsTransactionsR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_confirmed_coins_transactions_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_confirmed_coins_transactions" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_confirmed_coins_transactions_rb'] is not None:
            _body_params = _params['new_confirmed_coins_transactions_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '200': "NewConfirmedCoinsTransactionsR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_confirmed_coins_transactions_and_each_confirmation(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_coins_transactions_and_each_confirmation_rb : Optional[NewConfirmedCoinsTransactionsAndEachConfirmationRB] = None, **kwargs) -> NewConfirmedCoinsTransactionsAndEachConfirmationR:  # noqa: E501
        """New confirmed coins transactions and each confirmation  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer's address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **coins transactions only, not tokens**.    {note}For UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that.{/note}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_coins_transactions_and_each_confirmation(blockchain, network, context, new_confirmed_coins_transactions_and_each_confirmation_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_coins_transactions_and_each_confirmation_rb:
        :type new_confirmed_coins_transactions_and_each_confirmation_rb: NewConfirmedCoinsTransactionsAndEachConfirmationRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewConfirmedCoinsTransactionsAndEachConfirmationR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_confirmed_coins_transactions_and_each_confirmation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_confirmed_coins_transactions_and_each_confirmation_with_http_info(blockchain, network, context, new_confirmed_coins_transactions_and_each_confirmation_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_confirmed_coins_transactions_and_each_confirmation_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_coins_transactions_and_each_confirmation_rb : Optional[NewConfirmedCoinsTransactionsAndEachConfirmationRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New confirmed coins transactions and each confirmation  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for coins from/to the customer's address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **coins transactions only, not tokens**.    {note}For UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that.{/note}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_coins_transactions_and_each_confirmation_with_http_info(blockchain, network, context, new_confirmed_coins_transactions_and_each_confirmation_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_coins_transactions_and_each_confirmation_rb:
        :type new_confirmed_coins_transactions_and_each_confirmation_rb: NewConfirmedCoinsTransactionsAndEachConfirmationRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewConfirmedCoinsTransactionsAndEachConfirmationR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_confirmed_coins_transactions_and_each_confirmation_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_confirmed_coins_transactions_and_each_confirmation" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_confirmed_coins_transactions_and_each_confirmation_rb'] is not None:
            _body_params = _params['new_confirmed_coins_transactions_and_each_confirmation_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '201': "NewConfirmedCoinsTransactionsAndEachConfirmationR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed-each-confirmation', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_confirmed_internal_transactions(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_internal_transactions_rb : Optional[NewConfirmedInternalTransactionsRB] = None, **kwargs) -> NewConfirmedInternalTransactionsR:  # noqa: E501
        """New Confirmed Internal Transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs.    Being confirmed means that the transactions are verified by miners and added to the next block.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_internal_transactions(blockchain, network, context, new_confirmed_internal_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_internal_transactions_rb:
        :type new_confirmed_internal_transactions_rb: NewConfirmedInternalTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewConfirmedInternalTransactionsR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_confirmed_internal_transactions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_confirmed_internal_transactions_with_http_info(blockchain, network, context, new_confirmed_internal_transactions_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_confirmed_internal_transactions_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_internal_transactions_rb : Optional[NewConfirmedInternalTransactionsRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New Confirmed Internal Transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs.    Being confirmed means that the transactions are verified by miners and added to the next block.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_internal_transactions_with_http_info(blockchain, network, context, new_confirmed_internal_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_internal_transactions_rb:
        :type new_confirmed_internal_transactions_rb: NewConfirmedInternalTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewConfirmedInternalTransactionsR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_confirmed_internal_transactions_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_confirmed_internal_transactions" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_confirmed_internal_transactions_rb'] is not None:
            _body_params = _params['new_confirmed_internal_transactions_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '200': "NewConfirmedInternalTransactionsR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_confirmed_internal_transactions_and_each_confirmation(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_internal_transactions_and_each_confirmation_rb : Optional[NewConfirmedInternalTransactionsAndEachConfirmationRB] = None, **kwargs) -> NewConfirmedInternalTransactionsAndEachConfirmationR:  # noqa: E501
        """New Confirmed Internal Transactions And Each Confirmation  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. Includes also a response at each confirmation the transaction receives until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs.     Being confirmed means that the transactions are verified by miners and added to the next block.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_internal_transactions_and_each_confirmation(blockchain, network, context, new_confirmed_internal_transactions_and_each_confirmation_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_internal_transactions_and_each_confirmation_rb:
        :type new_confirmed_internal_transactions_and_each_confirmation_rb: NewConfirmedInternalTransactionsAndEachConfirmationRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewConfirmedInternalTransactionsAndEachConfirmationR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_confirmed_internal_transactions_and_each_confirmation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_confirmed_internal_transactions_and_each_confirmation_with_http_info(blockchain, network, context, new_confirmed_internal_transactions_and_each_confirmation_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_confirmed_internal_transactions_and_each_confirmation_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_internal_transactions_and_each_confirmation_rb : Optional[NewConfirmedInternalTransactionsAndEachConfirmationRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New Confirmed Internal Transactions And Each Confirmation  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new confirmed internal transactions. Includes also a response at each confirmation the transaction receives until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs.     Being confirmed means that the transactions are verified by miners and added to the next block.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_internal_transactions_and_each_confirmation_with_http_info(blockchain, network, context, new_confirmed_internal_transactions_and_each_confirmation_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_internal_transactions_and_each_confirmation_rb:
        :type new_confirmed_internal_transactions_and_each_confirmation_rb: NewConfirmedInternalTransactionsAndEachConfirmationRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewConfirmedInternalTransactionsAndEachConfirmationR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_confirmed_internal_transactions_and_each_confirmation_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_confirmed_internal_transactions_and_each_confirmation" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_confirmed_internal_transactions_and_each_confirmation_rb'] is not None:
            _body_params = _params['new_confirmed_internal_transactions_and_each_confirmation_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '201': "NewConfirmedInternalTransactionsAndEachConfirmationR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed-each-confirmation', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_confirmed_tokens_transactions(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_tokens_transactions_rb : Optional[NewConfirmedTokensTransactionsRB] = None, **kwargs) -> NewConfirmedTokensTransactionsR:  # noqa: E501
        """New confirmed tokens transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer's address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_tokens_transactions(blockchain, network, context, new_confirmed_tokens_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_tokens_transactions_rb:
        :type new_confirmed_tokens_transactions_rb: NewConfirmedTokensTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewConfirmedTokensTransactionsR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_confirmed_tokens_transactions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_confirmed_tokens_transactions_with_http_info(blockchain, network, context, new_confirmed_tokens_transactions_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_confirmed_tokens_transactions_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_tokens_transactions_rb : Optional[NewConfirmedTokensTransactionsRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New confirmed tokens transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer's address. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_tokens_transactions_with_http_info(blockchain, network, context, new_confirmed_tokens_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_tokens_transactions_rb:
        :type new_confirmed_tokens_transactions_rb: NewConfirmedTokensTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewConfirmedTokensTransactionsR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_confirmed_tokens_transactions_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_confirmed_tokens_transactions" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_confirmed_tokens_transactions_rb'] is not None:
            _body_params = _params['new_confirmed_tokens_transactions_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '201': "NewConfirmedTokensTransactionsR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_confirmed_tokens_transactions_and_each_confirmation(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_tokens_transactions_and_each_confirmation_rb : Optional[NewConfirmedTokensTransactionsAndEachConfirmationRB] = None, **kwargs) -> NewConfirmedTokensTransactionsAndEachConfirmationR:  # noqa: E501
        """New confirmed tokens transactions and each confirmation  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer's address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_tokens_transactions_and_each_confirmation(blockchain, network, context, new_confirmed_tokens_transactions_and_each_confirmation_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_tokens_transactions_and_each_confirmation_rb:
        :type new_confirmed_tokens_transactions_and_each_confirmation_rb: NewConfirmedTokensTransactionsAndEachConfirmationRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewConfirmedTokensTransactionsAndEachConfirmationR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_confirmed_tokens_transactions_and_each_confirmation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_confirmed_tokens_transactions_and_each_confirmation_with_http_info(blockchain, network, context, new_confirmed_tokens_transactions_and_each_confirmation_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_confirmed_tokens_transactions_and_each_confirmation_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_confirmed_tokens_transactions_and_each_confirmation_rb : Optional[NewConfirmedTokensTransactionsAndEachConfirmationRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New confirmed tokens transactions and each confirmation  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new incoming or outgoing confirmed transactions for tokens from/to the customer's address with also a response at each confirmation the transaction has received until the specified confirmations limit is reached. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.     Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to **tokens transactions only, not coins**.    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_confirmed_tokens_transactions_and_each_confirmation_with_http_info(blockchain, network, context, new_confirmed_tokens_transactions_and_each_confirmation_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_confirmed_tokens_transactions_and_each_confirmation_rb:
        :type new_confirmed_tokens_transactions_and_each_confirmation_rb: NewConfirmedTokensTransactionsAndEachConfirmationRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewConfirmedTokensTransactionsAndEachConfirmationR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_confirmed_tokens_transactions_and_each_confirmation_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_confirmed_tokens_transactions_and_each_confirmation" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_confirmed_tokens_transactions_and_each_confirmation_rb'] is not None:
            _body_params = _params['new_confirmed_tokens_transactions_and_each_confirmation_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '200': "NewConfirmedTokensTransactionsAndEachConfirmationR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed-each-confirmation', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_unconfirmed_coins_transactions(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_unconfirmed_coins_transactions_rb : Optional[NewUnconfirmedCoinsTransactionsRB] = None, **kwargs) -> NewUnconfirmedCoinsTransactionsR:  # noqa: E501
        """New Unconfirmed Coins Transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed coins transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.    Unconfirmed coins transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations.    {note}For UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that.{/note}    {warning}We cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets.{/warning}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {note}It is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn't necessarily** mean they will get confirmed.{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_unconfirmed_coins_transactions(blockchain, network, context, new_unconfirmed_coins_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_unconfirmed_coins_transactions_rb:
        :type new_unconfirmed_coins_transactions_rb: NewUnconfirmedCoinsTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewUnconfirmedCoinsTransactionsR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_unconfirmed_coins_transactions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_unconfirmed_coins_transactions_with_http_info(blockchain, network, context, new_unconfirmed_coins_transactions_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_unconfirmed_coins_transactions_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_unconfirmed_coins_transactions_rb : Optional[NewUnconfirmedCoinsTransactionsRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New Unconfirmed Coins Transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed coins transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.    Unconfirmed coins transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations.    {note}For UTXO-based protocols like Bitcoin a transaction could have multiple inputs and outputs which means the address could in as both sender and recipient. [Here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-data-returned-for-utxo-based-transactions) is how we inform you on that.{/note}    {warning}We cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets.{/warning}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {note}It is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn't necessarily** mean they will get confirmed.{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_unconfirmed_coins_transactions_with_http_info(blockchain, network, context, new_unconfirmed_coins_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_unconfirmed_coins_transactions_rb:
        :type new_unconfirmed_coins_transactions_rb: NewUnconfirmedCoinsTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewUnconfirmedCoinsTransactionsR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_unconfirmed_coins_transactions_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_unconfirmed_coins_transactions" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_unconfirmed_coins_transactions_rb'] is not None:
            _body_params = _params['new_unconfirmed_coins_transactions_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '201': "NewUnconfirmedCoinsTransactionsR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-unconfirmed', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def new_unconfirmed_tokens_transactions(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_unconfirmed_tokens_transactions_rb : Optional[NewUnconfirmedTokensTransactionsRB] = None, **kwargs) -> NewUnconfirmedTokensTransactionsR:  # noqa: E501
        """New Unconfirmed Tokens Transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed tokens transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.    Unconfirmed tokens transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations.    {warning}We cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets.{/warning}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {note}It is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn't necessarily** mean they will get confirmed.{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_unconfirmed_tokens_transactions(blockchain, network, context, new_unconfirmed_tokens_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_unconfirmed_tokens_transactions_rb:
        :type new_unconfirmed_tokens_transactions_rb: NewUnconfirmedTokensTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: NewUnconfirmedTokensTransactionsR
        """
        kwargs['_return_http_data_only'] = True
        if '_preload_content' in kwargs:
            raise ValueError("Error! Please call the new_unconfirmed_tokens_transactions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
        return self.new_unconfirmed_tokens_transactions_with_http_info(blockchain, network, context, new_unconfirmed_tokens_transactions_rb, **kwargs)  # noqa: E501

    @validate_arguments
    def new_unconfirmed_tokens_transactions_with_http_info(self, blockchain : Annotated[StrictStr, Field(..., description="Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.")], network : Annotated[StrictStr, Field(..., description="Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.")], context : Annotated[Optional[StrictStr], Field(description="In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.")] = None, new_unconfirmed_tokens_transactions_rb : Optional[NewUnconfirmedTokensTransactionsRB] = None, **kwargs) -> ApiResponse:  # noqa: E501
        """New Unconfirmed Tokens Transactions  # noqa: E501

        Through this endpoint customers can create callback subscriptions for a specific event. In this case the event is when there are new unconfirmed tokens transactions for the user. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs. The information is returned per specified address.    Unconfirmed tokens transactions remain in the mempool (memory pool) until they are confirmed by miners and added to the next block. Sometimes spikes in transaction activity can cause delays in confirmations.    {warning}We cannot guarantee at 100% that webhooks for unconfirmed transactions will always be received. Some may **not get received** due to the possibility of some nodes not being updated with that information. This can occur in networks with low activity and/or not many nodes, e.g. Testnet networks and rarely Mainnets.{/warning}    {note}To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](https://developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url).{/note}    {note}It is also **important to note** that just because pending unconfirmed transactions are in the mempool, **doesn't necessarily** mean they will get confirmed.{/note}    {warning}Crypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur.{/warning}  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.new_unconfirmed_tokens_transactions_with_http_info(blockchain, network, context, new_unconfirmed_tokens_transactions_rb, async_req=True)
        >>> result = thread.get()

        :param blockchain: Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. (required)
        :type blockchain: str
        :param network: Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks. (required)
        :type network: str
        :param context: In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
        :type context: str
        :param new_unconfirmed_tokens_transactions_rb:
        :type new_unconfirmed_tokens_transactions_rb: NewUnconfirmedTokensTransactionsRB
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the 
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(NewUnconfirmedTokensTransactionsR, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'blockchain',
            'network',
            'context',
            'new_unconfirmed_tokens_transactions_rb'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method new_unconfirmed_tokens_transactions" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['blockchain']:
            _path_params['blockchain'] = _params['blockchain']

        if _params['network']:
            _path_params['network'] = _params['network']


        # process the query parameters
        _query_params = []
        if _params.get('context') is not None:  # noqa: E501
            _query_params.append(('context', _params['context']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params['new_unconfirmed_tokens_transactions_rb'] is not None:
            _body_params = _params['new_unconfirmed_tokens_transactions_rb']

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get('_content_type',
            self.api_client.select_header_content_type(
                ['application/json']))
        if _content_types_list:
                _header_params['Content-Type'] = _content_types_list

        # authentication setting
        _auth_settings = ['ApiKey']  # noqa: E501

        _response_types_map = {
            '201': "NewUnconfirmedTokensTransactionsR",
            '400': "object",
            '401': "object",
            '402': "object",
            '403': "object",
            '409': "object",
            '415': "object",
            '422': "object",
            '429': "object",
            '500': "object",
        }

        return self.api_client.call_api(
            '/blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-unconfirmed', 'POST',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))
