# Webhooks

### 🔍 What Are Webhooks?

Webhooks let you **trigger instant token buys through Bitfoot Bot** from external systems – without interacting with Telegram.

You can use them to:

* Connect your **alpha feed or trading bot**
* Automate buys from other alpha scanners, bots or Discord channels
* Trigger trades from your own scripts or alerts

> Perfect for users who want full automation and speed.

***

### ⚙️ How to Set Up and Use a Webhook

1. Open the[ **Bitfoot Bot** ](https://t.me/BitFootBot)on Telegram
2. Tap ⚡️ **Webhooks** in the main menu
3. Tap ➕ **Add Webhook** to create a new one
4. Enter a name (e.g. `myAlphaFeed`)

After creation, Bot will respond with:

* An **Access Token** (used to authorize requests):

<div align="left"><figure><img src="/files/k5RNm7KPHdtK8QAdraRF" alt=""><figcaption></figcaption></figure></div>

* A unique **Webhook URL** (used to send requests):

<div align="left"><figure><img src="/files/JGuEyzq1Tw8vAiAfkxoT" alt=""><figcaption></figcaption></figure></div>

* A default configuration (slippage, limits, wallets, etc.)

***

### 🛠 Webhook Configuration Explained

Each webhook has its own config panel directly in Telegram:

| Setting                | Description                                                               |
| ---------------------- | ------------------------------------------------------------------------- |
| **Max Amount**         | Limits how much USD can be used per trade                                 |
| **Max Webhook Calls**  | Number of total allowed calls (max: 1000)                                 |
| **Slippage**           | Default slippage % if not defined in request                              |
| **Min/Max Liquidity**  | Optional filters for token Liquidity                                      |
| **Min/Max Market Cap** | Optional filters for token MC                                             |
| **Priority Fee**       | Default priority fee (SOL or GWEI)                                        |
| **Max Priority Fee**   | Safety limit – higher values are rejected                                 |
| **Selected Wallets**   | Chain-specific wallets used to perform the swaps                          |
| **Enabled Chains**     | Chains where this webhook can trigger trades (SOL, ETH, BSC, Base, Sonic) |

> You don’t need to pass these values in every request – Bitfoot uses your webhook’s config as default.

**Make sure to:**

* ✅ Enable **Auto Buys**
* ✅ Select **Trigger Chains** (e.g. Solana)
* ✅ Connect wallets for the chains you want to use

***

### 🔗 Connecting Bitfoot Webhook to Other Tools

#### ✅ Any Alpha Bot or External Signal Tool

If you use any alpha feed, auto-caller, or trading signal tool that supports webhook output:

1. Create a webhook in Bitfoot Bot
2. Copy your **Webhook URL** and **Access Token**
3. In your external tool:
   * Go to the alert/filter/query you want to automate
   * Paste the Webhook URL in its webhook section
   * Provide your **Access Token** (usually as Bearer token or field)

> Done. Whenever the tool fires a signal, Bitfoot will handle the buy.

***

#### 🧪 Manual Testing (curl)

To test your webhook manually:

```
curl --request POST \
  --url https://api-app.bitfoot.com/webhook/YOUR_WEBHOOK_ID \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --data '{
    "network": "solana",
    "token_address": "TOKEN_ADDRESS_HERE",
    "amount_usd": 1,
    "priority_fee": 0.0001
  }'
```

**Required Fields:**

* `network`: solana / eth / bsc / base / sonic
* `token_address`: address of the token to buy
* `amount_usd`: (optional) how much to buy
* `priority_fee`: (optional) fee in SOL or GWEI

Bitfoot will respond with:

```
{
  "status": "success",
  "error": "",
  "data": ["transaction_hash_here"]
}
```

***

### 🔄 What Happens When Call Limit Is Reached?

Each webhook has a maximum of **1000 calls**.

Once reached:

* The webhook is **disabled**
* Any new requests will return an error: `maximum amount of calls reached`
* You need to create a **new webhook** to continue

> Replacing the webhook in your script or bot is required.

***

### 🧠 Pro Tips / Additional Notes

* You can have **multiple webhooks** (for different chains, strategies or tools)
* You can always tap `📎 Get Request Example` in the bot to see your exact `curl` command
* The webhook will only execute on **networks where you have wallets connected**
* Use `amount_usd` and `priority_fee` in request only if you want to override defaults
* You can use webhook with custom bots, Discord signals, scanners, Zapier, etc.

***

### ❓Still have questions?&#x20;

Contact [Support](mailto:support@bitfoot.com) or ask [Bitfoot team on X](https://x.com/BitfootBot) 👣


---

# 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://docs.bitfoot.com/bitfoot-bot/webhooks.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.
