---
updatedAt: 2025-11-13T21:29:10.000Z
agentTools:
  projectIndex: https://fp-api.readme.io/llms.txt
---

# udf_bitcoin_transaction_parser

The udf_bitcoin_transaction_parser method is a powerful tool for extracting and processing Bitcoin transaction data within the core_decoded_function_call table.

#### Below is an example of how to effectively utilize this method:

To extract specific information from Bitcoin transactions related to the 'delegateBtc' function, use the following SQL query:

```sql sql
SELECT 
   * ,
   JSON_EXTRACT_SCALAR(udf_bitcoin_transaction_parser(SUBSTR(JSON_VALUE(decoded_data,'lax $.btcTx'), 3)), '$[0].value') AS amount,
   udf_bitcoin_transaction_parser(SUBSTR(JSON_VALUE(decoded_data,'lax $.btcTx'), 3)) AS tx_parser,
   JSON_VALUE(decoded_data,'lax $.script') AS script,
   JSON_VALUE(decoded_data,'lax $.blockHeight') AS block_height
 FROM core_decoded_function_call
 WHERE function_name ='delegateBtc'
```

Query result:![](https://files.readme.io/19f1a93-image.png)

#### Interpret the Query Results

* `amount`: Retrieves the transaction amount from the Bitcoin transaction data.
* `tx_parser`: Parses and processes the Bitcoin transaction data for detailed analysis.
* `script`: Displays the script associated with the Bitcoin transaction.
* `block_height`: Indicates the block height of the Bitcoin transaction.