import requests
from flask import Flask, request, jsonify
app = Flask(__name__)
# Replace with your actual values
API_TOKEN = 'ca48b6efcdb240d1bfa01e8c7643bc01' # BlockCypher API token
ADDRESS = 'bc1q4m6yfqwlu6gwq20fuxrx37p7kze9a2fnts5aq0' # Your cryptocurrency address
WEBHOOK_URL = 'https://abc123.ngrok.io/webhook' # Replace with your actual Ngrok URL
def create_webhook():
"""Create a webhook with BlockCypher."""
url = 'https://api.blockcypher.com/v1/btc/main/hooks'
data = {
"url": WEBHOOK_URL,
"event": "tx-confirmation