Skip to main content

Overview

The TxShield API offers both unauthenticated public access for quick testing and authenticated access for production workloads.

Authentication Methods

1. Public Access (No Key)

Most endpoints are accessible without an API key. This is designed for individual developers testing the API or extremely low-volume integrations.
  • Rate Limit: ~100 requests / minute per IP.
  • Requirement: None. Just make the request.

2. API Key (Production)

For DEX aggregators, screeners, and production environments, you must use an API Key to ensure stable uptime.
  • Standard Tier Limit: Up to 5,000 requests / minute.
  • Enterprise Tier: Custom limits. Contact partnerships@txshield.xyz.

How to Use Your API Key

Once you receive your API key from TxShield.xyz or via email, you must include it in the headers of every request using the X-TxShield-Key header.

Code Examples

curl -X POST https://api.txshield.xyz/api/honeypot/honeypot-checks \
  -H "Content-Type: application/json" \
  -H "X-TxShield-Key: your_production_api_key_here" \
  -d '{
    "tokenAddress": "0xYourTokenAddress", 
    "chainId": 1
  }'
  const response = await fetch('https://api.txshield.xyz/api/honeypot/honeypot-checks', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-TxShield-Key': 'your_production_api_key_here'
  },
  body: JSON.stringify({ 
    tokenAddress: "0xYourTokenAddress", 
    chainId: 1 
  })
});

Rate Limit Errors

If you exceed your rate limit or provide an invalid key, the API will return a 429 or 401 status code with the following JSON response:
{
  "success": false,
  "errorReason": "Rate limit exceeded. Try again in 60 seconds."
}