Documentation

Complete API reference and integration guides for Digger Protocol

Introduction

Digger Protocol provides a REST API and WebSocket interface for accessing real-time data about MEV extraction from precious metals markets and token burn operations.

The API allows you to:

  • Query current protocol statistics and metrics
  • Retrieve burn transaction history
  • Subscribe to real-time MEV events
  • Access token supply and market data

Base URL

Production
https://api.digger.gold/v1

Response Format

All responses are returned in JSON format:

JSON
{
  "success": true,
  "data": { ... },
  "timestamp": 1706472000000
}

Quick Start

Fetch Current Stats

cURL
curl -X GET https://api.digger.gold/v1/stats

JavaScript

JavaScript
const response = await fetch('https://api.digger.gold/v1/stats');
const data = await response.json();

console.log('Total Burned:', data.data.total_burned);
console.log('Total Extracted:', data.data.total_extracted_usd);

Python

Python
import requests

response = requests.get('https://api.digger.gold/v1/stats')
data = response.json()

print(f"Total Burned: {data['data']['total_burned']}")
print(f"Total Extracted: {data['data']['total_extracted_usd']}")

Authentication

Public endpoints do not require authentication. Rate limited to 100 requests/min per IP.

For higher rate limits, include your API key:

Header
Authorization: Bearer YOUR_API_KEY

Rate Limits

Tier Requests/min WebSocket
Public 100 1 connection
Basic 1,000 5 connections
Pro 10,000 25 connections

API Overview

Method Endpoint Description
GET /stats Protocol statistics
GET /burns Burn transaction history
GET /burns/:txHash Single burn details
GET /events MEV event history
GET /token Token information
GET /token/supply Current circulating supply

Statistics

GET /stats

Returns current protocol statistics.

Response

{
  "success": true,
  "data": {
    "total_burned": null,
    "total_extracted_usd": null,
    "supply_burned_percent": null,
    "current_supply": null,
    "initial_supply": 1000000000,
    "burn_24h": null,
    "events_24h": null,
    "active_strategies": 0,
    "supported_markets": ["PAXG", "XAUT", "sXAU", "sXAG"]
  },
  "timestamp": null
}

Burns

GET /burns

Returns paginated list of burn transactions.

Parameters

Parameter Type Default
limit integer 20
offset integer 0
order string desc

Response

{
  "success": true,
  "data": {
    "burns": [],
    "total": 0,
    "limit": 20,
    "offset": 0
  },
  "timestamp": null
}

Events

GET /events

Returns MEV extraction events.

Parameters

Parameter Type Description
type string arbitrage, sandwich, liquidation
market string PAXG, XAUT, etc.
limit integer Number of results (max 100)

Event Schema

{
  "id": "string",
  "type": "arbitrage | sandwich | liquidation",
  "market": "PAXG | XAUT | sXAU | sXAG",
  "profit_usd": "number",
  "profit_eth": "number",
  "tx_hash": "string",
  "block_number": "number",
  "timestamp": "number"
}

Token

GET /token

Returns token information.

{
  "success": true,
  "data": {
    "name": "Digger",
    "symbol": "DIGGER",
    "network": "solana",
    "contract": null,
    "decimals": 9,
    "initial_supply": 1000000000,
    "current_supply": null,
    "total_burned": null,
    "burn_address": null
  },
  "timestamp": null
}

WebSocket Connection

URL

WebSocket
wss://ws.digger.gold/v1/stream

Connection Example

JavaScript
const ws = new WebSocket('wss://ws.digger.gold/v1/stream');

ws.onopen = () => {
  ws.send(JSON.stringify({
    action: 'subscribe',
    channels: ['burns', 'events']
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Received:', data);
};

Event Stream

Available channels:

Channel Description
burns Burn transaction notifications
events All MEV extraction events
events:arbitrage Arbitrage events only
events:sandwich Sandwich events only
events:liquidation Liquidation events only
stats Stats updates (60s interval)

SDK

JavaScript / TypeScript

npm
npm install @digger/sdk
TypeScript
import { DiggerClient } from '@digger/sdk';

const client = new DiggerClient();

const stats = await client.getStats();
const burns = await client.getBurns({ limit: 10 });

client.subscribe('burns', (event) => {
  console.log('New burn:', event);
});

Python

pip
pip install digger-sdk
Python
from digger import DiggerClient

client = DiggerClient()

stats = client.get_stats()
burns = client.get_burns(limit=10)

async def handle_burn(event):
    print(f"New burn: {event}")

await client.subscribe("burns", handle_burn)

Examples

Track Total Supply

JavaScript
async function trackSupply() {
  const response = await fetch('https://api.digger.gold/v1/token/supply');
  const { data } = await response.json();
  
  console.log(`Circulating: ${data.circulating}`);
  console.log(`Burned: ${data.burned}`);
}

setInterval(trackSupply, 60000);
trackSupply();

Build a Burn Tracker

JavaScript
const ws = new WebSocket('wss://ws.digger.gold/v1/stream');

ws.on('open', () => {
  ws.send(JSON.stringify({
    action: 'subscribe',
    channels: ['burns']
  }));
});

ws.on('message', (data) => {
  const event = JSON.parse(data);
  
  if (event.channel === 'burns') {
    const { amount, tx_hash } = event.data;
    
    sendNotification({
      title: 'New DIGGER Burn',
      message: `${amount} DIGGER burned`,
      link: `https://solscan.io/tx/${tx_hash}`
    });
  }
});

Public Wallets

All Digger Protocol operations are conducted through publicly verifiable wallets. You can track all transactions on-chain in real-time.

Burn Wallet (Solana)

Used for buyback and burn operations. All $DIGGER tokens purchased with MEV profits are sent to this address.

Solana Address
Ea83WDWr6z743rzGmeuamzJs8oRH1B5KYzu8R7qxiaDU

View on Solscan →

MEV Wallet (Ethereum)

All MEV extraction profits from PAXG/XAUT arbitrage, sandwich attacks, and liquidations are collected here before being bridged to Solana.

Ethereum Address
0xd9f638448e683b999706892809a80b67659248ef

View on Etherscan →

Verify via API

cURL
curl -X GET https://api.digger.gold/v1/wallets
Response
{
  "success": true,
  "data": {
    "burn_wallet": {
      "address": "Ea83WDWr6z743rzGmeuamzJs8oRH1B5KYzu8R7qxiaDU",
      "network": "solana",
      "type": "burn"
    },
    "mev_wallet": {
      "address": "0xd9f638448e683b999706892809a80b67659248ef",
      "network": "ethereum",
      "type": "mev_collection"
    }
  }
}