# Identify Sniping & Bot Activity

```
// def detect_sniping_bots(token_address):
    url = f"{BASE_URL}/api/bots/detection/{token_address}"
    headers = {
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }

    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()
        bot_data = response.json()
        return bot_data
    except requests.exceptions.RequestException as e:
        print(f"Error detecting bot activity: {e}")
        return None

# Fetch and display sniping bot data
bot_info = detect_sniping_bots(TOKEN_ADDRESS)
if bot_info:
    print("Sniping & Bot Detection:")
    print(bot_info)

```

Example API Response:

```
//{
  "token": "EXAMPLE_TOKEN",
  "sniping_detected": true,
  "bots": [
    {
      "wallet": "BOT_WALLET_1",
      "sniping_attempts": 5,
      "profit_margin": "1200 USDC",
      "timestamp": "2024-02-14T14:00:00Z"
    },
    {
      "wallet": "BOT_WALLET_2",
      "sniping_attempts": 3,
      "profit_margin": "800 USDC",
      "timestamp": "2024-02-14T14:05:30Z"
    }
  ]
}

```
