# Removed Functions

### AI Agent SDK

#### 3.2 Get transaction by address

Retrieve a list of transactions for the specified blockchain\
address from the Crypto.com developer platform within a specified block range.

{% tabs %}
{% tab title="Query" %}

* Arguments

  ```python
  address (str): The blockchain address to query (CronosIds with the `.cro` suffix are supported).
  startBlock (int): The starting block number to get transactions from. The maximum range is 10,000 blocks.
  endBlock (int): The ending block number to get transactions to. The maximum range is 10,000 blocks.
  session (str, optional): Session identifier for pagination. Defaults to "".
  limit (str, optional): Maximum number of transactions to return. Defaults to "20".
  ```
* Example Query

  ```
  "Get transactions of <example-address> from block <example-start-block> to <example-end-block>"
  ```

{% endtab %}

{% tab title="Response" %}

* Returns

  ```python
  str: A formatted string containing the list of transactions.
  ```
* Example Response

  ```
  The transactions for the address <example-address> are:

  * Transaction 1: 
    - Block Number: <example-block-number>
    - Transaction Hash: <example-transaction-hash>
    - Status: <example-status>
    - From: <example-from>
    - To: <example-to>
    - Value: <example-value>

  * Transaction 2:
    ...
  ```

{% endtab %}
{% endtabs %}

Example Code

```python
from crypto_com_agent_client import Agent

agent = Agent.init(
    llm_config={
        "provider": "OpenAI",
        "model": "gpt-4",
        "provider-api-key": "sk-proj-example-key",
        "temperature": "float-controlling-output-randomness",
    },
    blockchain_config={
        "api-key": "your-crypto.com-developer-platform-api-key",
        "private-key": "your-private-key",
        "sso-wallet-url": "your-sso-wallet-url",
        "timeout": "timeout-in-seconds-for-API-calls-default-20s")
    },
)
response = agent.interact("Get transactions of <example-address> from block <example-start-block> to <example-end-block>")
print(response)
```

### Developer Platform Client SDK

#### 3.1 Get Transactions By Address

Fetches transactions for a specific wallet address.

{% hint style="info" %}
**Note:** Click to see [how to get an explorer API key](/resources/resources-for-developers.md#explorer-api-keys).
{% endhint %}

{% tabs %}
{% tab title="Python" %}
Function Name

```python
get_transactions_by_address
```

{% tabs %}
{% tab title="Query" %}

* Arguments

  ```python
  address (str): The address to get transactions for (CronosIds with the `.cro` suffix are supported, e.g. `xyz.cro`)
  explorer_key (str): The explorer API key
  session (str): The session to get transactions for
  limit (str): The limit of transactions to get
  startBlock (Optional[int]): The starting block number to get transactions from. (The maximum number of blocks that can be fetched is 10,000)
  endBlock (Optional[int]): The ending block number to get transactions to. (The maximum number of blocks that can be fetched is 10,000)
  ```
* Example Code

  ```python
  from crypto_com_developer_platform_client import Transaction

  transations = Transaction.get_transactions_by_address('example-address', 'example-explorer-api-key')
  print(transations)
  ```

{% endtab %}

{% tab title="Response" %}

* Returns

  ```python
  The transactions for the address.
  ```
* Errors

  ```python
  ValueError: If the Transaction class is not initialized with a Client instance.
  ```
* Example Return

  ```python
  { 'status': 'Success', 'data': { 'transactions': [ example-array ], 'pagination': { 'totalRecord': example-number, 'totalPage': example-number, 'currentPage': example-number, 'limit': example-number, 'session': 'example-session' } } }
  ```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="TypeScript" %}
Function Name

```typescript
getTransactionsByAddress
```

{% tabs %}
{% tab title="Query" %}

* Arguments

  ```typescript
  {string} address: Wallet address (or CronosId `.cro`).
  {string} explorerKey: Blockchain explorer API key.
  {string} [session]: Pagination session.
  {string} [limit='20']: Result limit.
  {number} [startBlock]: Start block (optional).
  {number} [endBlock]: End block (optional).
  ```
* Example Code

  ```typescript
  import { Transaction } from '@crypto.com/developer-platform-client';

  const transactions = await Transaction.getTransactionsByAddress('example-address', 'example-explorer-api-key')

  console.log(transactions);
  ```

{% endtab %}

{% tab title="Response" %}

* Returns

  ```typescript
  {Promise<ApiResponse<TransactionsByAddress>>}: A promise that resolves to the transactions result
  ```
* Example Return

  ```typescript
  {
    status: 'Success',
    data: {
      transactions: [
  	example-array
      ],
      pagination: {
        totalRecord: example-number,
        totalPage: example-number,
        currentPage: example-number,
        limit: example-number,
        session: 'example-session'
      }
    }
  }
  ```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

#### 5.1 Get Contract ABI

Fetches the ABI (Application Binary Interface) of a smart contract.

{% hint style="info" %}
**Note:** Click to see [how to get an explorer API key](/resources/resources-for-developers.md#explorer-api-keys).
{% endhint %}

{% tabs %}
{% tab title="Python" %}
Function Name

```python
get_contract_abi
```

{% tabs %}
{% tab title="Query" %}

* Arguments

  ```python
  contract_address (str): The address of the smart contract.
  explorer_key (str): The API key for the blockchain explorer (either Cronos or Cronos zkEVM).
  ```
* Example Code

  ```python
  from crypto_com_developer_platform_client import Contract

  abi = Contract.get_contract_abi('example-contract', 'example-explorer-api-key')
  print(abi)
  ```

{% endtab %}

{% tab title="Response" %}

* Returns

  ```python
  The ABI of the smart contract.
  ```
* Errors

  ```python
  ValueError: If the Contract class is not initialized with a Client instance.
  ```
* Example Return

  ```python
  {'status': 'Success', 'data': {'abi': ['example-abi']}}
  ```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="TypeScript" %}
Function Name

```typescript
getContractABI
```

{% tabs %}
{% tab title="Query" %}

* Arguments

  ```typescript
  {string} contractAddress: The smart contract address.
  {string} explorerKey: The API key for the blockchain explorer.
  ```
* Example Code

  ```typescript
  import { Contract } from '@crypto.com/developer-platform-client';

  try {
    const abi = await Contract.getContractABI('example-address');
    console.log(abi);
  }
    catch(err) {
    console.log(err);
  }
  ```

{% endtab %}

{% tab title="Response" %}

* Returns

  ```typescript
  {Promise<ApiResponse<ContractAbi>>}: A promise that resolves to the ABI of the contract.
  ```
* Errors

  ```typescript
  {Error} If the ABI retrieval fails.
  ```
* Example Return

  ```typescript
  {
    status: 'Success',
    data: {
      abi: [
  example-abi      
      ]
    }
  }
  ```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-agent-sdk-docs.crypto.com/outdated-contents/removed-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
