web3research.btc.BitcoinProvider ================================ .. py:class:: web3research.btc.BitcoinProvider(api_token, backend: Optional[str] = None, database: str = 'bitcoin', settings: Optional[Dict[str, Any]] = None, generic_args: Optional[Dict[str, Any]] = None, **kwargs) Bases: :py:obj:`web3research.db.provider.ClickhouseProvider` BitcoinProvider is a provider for fetching data on Bitcoin from the backend. .. py:attribute:: database :value: 'bitcoin' .. py:method:: blocks(where: Optional[str] = None, order_by: Optional[Dict[str, bool]] = {'height': True}, limit: Optional[int] = 100, offset: Optional[int] = 0, parameters: Optional[Dict[str, Any]] = None) -> Generator[Dict[str, Any], None, None] Get blocks from the database. Args: where (str, optional): The WHERE clause. Defaults to None. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to height ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None. Returns: Generator[Dict[str, Any], None, None]: A generator of blocks. .. py:method:: inputs(where: Optional[str] = None, order_by: Optional[Dict[str, bool]] = {'blockHeight': True, 'txIndex': True, 'index': True}, limit: Optional[int] = 100, offset: Optional[int] = 0, parameters: Optional[Dict[str, Any]] = None) -> Generator[Dict[str, Any], None, None] Get transaction inputs from the database. Args: where (str, optional): The WHERE clause. Defaults to None. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to blockHeight, txIndex and index ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None. Returns: Generator[Dict[str, Any], None, None]: A generator of transaction inputs. .. py:method:: outputs(where: Optional[str] = None, order_by: Optional[Dict[str, bool]] = {'blockHeight': True, 'txIndex': True, 'index': True}, limit: Optional[int] = 100, offset: Optional[int] = 0, parameters: Optional[Dict[str, Any]] = None) -> Generator[Dict[str, Any], None, None] Get transaction outputs from the database. Args: where (str, optional): The WHERE clause. Defaults to None. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to blockHeight, txIndex and index ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None. Returns: Generator[Dict[str, Any], None, None]: A generator of transaction outputs. .. py:method:: transactions(where: Optional[str] = None, order_by: Optional[Dict[str, bool]] = {'blockHeight': True, 'txIndex': True}, limit: Optional[int] = 100, offset: Optional[int] = 0, parameters: Optional[Dict[str, Any]] = None) -> Generator[Dict[str, Any], None, None] Get unique transactions from the database by aggregating inputs. This method provides a view of Bitcoin transactions by selecting unique transaction information from the inputs table, which contains transaction-level data. Args: where (str, optional): The WHERE clause. Defaults to None. order_by (Dict[str, bool], optional): The ORDER BY clause. Defaults to blockHeight and txIndex ascending. limit (int, optional): The LIMIT clause. Defaults to 100. offset (int, optional): The OFFSET clause. Defaults to 0. parameters (Dict[str, Any], optional): The query parameters. Defaults to None. Returns: Generator[Dict[str, Any], None, None]: A generator of transactions.