πŸ“”Consult Oracle API Docs

Integrate Consult Oracle into your project using the x402 protocol or $BASEDBOT token-gating.

Base URL

https://raid.based-bot.fun/api/oracle/v1/analyze

Authentication Methods

The Oracle API supports two authentication methods. x402 Payment takes priority - if a payment is provided, wallet signature is not required.

Method
Headers Required
Description

x402 Payment

X-PAYMENT

Pay-per-use with USDC (recommended for integrations)

Token Gate

X-WALLET + X-WALLET-SIG + X-CHALLENGE-TOKEN

Free for $BASEDBOT holders


For pay-per-use access, no wallet signature is needed. Just pay with USDC.

Pricing

  • Basic Analysis: 0.05 USDC

  • PRO Report: 0.10 USDC

The x402 Flow

1

Request payment requirement

Make a request without payment β†’ you will receive 402 Payment Required with payment details.

2

Sign USDC transfer transaction

Sign a USDC transfer transaction to the treasury (do NOT broadcast the transaction).

3

Encode signed TX and retry

Encode the signed transaction in base64 and include it in the X-PAYMENT header. Retry the analyze request to receive the analysis result.

Example:


Method 2: Token Gate (Free for Holders)

$BASEDBOT holders get free access based on their tier. Wallet ownership must be proven via challenge-response signature.

Tier Requirements

Tier
Requirement
Access

πŸ‹ Whale

10M+ $BASEDBOT

Free PRO + 100 req/min

🦍 Based Ape

1M+ $BASEDBOT

Free PRO + 10 req/min

πŸ’Ž Diamond Hands

500K+ $BASEDBOT

Basic + 5 req/min

🌱 Seedling

100K+ $BASEDBOT

Basic + 5 req/min

🎰 Degen

Any amount

Basic + 5 req/min

Challenge-Response Flow

To prevent wallet spoofing, you must prove ownership via signature:

1

Request Challenge

Request a challenge for the wallet:

Response:

2

Sign the Message

Sign the message field with your Solana wallet (ed25519 signature), then base64 encode the signature.

3

Send Signed Request

Send the analyze request including the required headers:


Endpoints

GET /api/oracle/v1/challenge

Generate a challenge for wallet signature verification. Returns a stateless token valid for 5 minutes.

Parameter
Type
Required
Description

wallet

string

Yes

Wallet address to verify

GET /api/oracle/v1/analyze

Analyze a Solana token contract address.

Query Parameters

Parameter
Type
Required
Description

ca

string

Yes

Token contract address

pro

boolean

No

Request PRO analysis

Headers

Header
Required
Description

X-WALLET

For token-gate

User wallet address

X-WALLET-SIG

If X-WALLET

Base64 signature of challenge message

X-CHALLENGE-TOKEN

If X-WALLET

Token received from challenge endpoint

X-PAYMENT

For x402

Signed USDC payment (bypasses signature requirement)

Example Requests

Basic Analysis (x402 Payment):

PRO Report (x402 Payment):

Token-Gate Request (requires signature):


Response Schemas

Basic Analysis Response

PRO Report Response (0.10 USDC or 1M+ $BASEDBOT)

PRO includes everything in Basic, plus deep analytics:


Error Codes

Code
Error
Description

400

Invalid address

Contract address format is invalid

401

Signature required

Missing wallet signature for token-gate

401

Invalid token

Challenge token expired or invalid

402

Payment required

Need x402 payment or token holdings

429

Rate limit exceeded

Wait for rate limit reset

500

Internal error

Server-side issue

CORS

The API supports CORS for browser-based integrations. Preflight (OPTIONS) requests are handled automatically.


Integration Guide

Choose your integration method based on your use case:

Use Case
Recommended Method
UI Needed?

Telegram/Discord Bot

x402 Payment

❌ No

Backend API Service

x402 Payment

❌ No

Frontend dApp

Token-Gate

βœ… Yes (wallet popup)

CLI Tool

x402 Payment

❌ No

For Bots & Backend Services (x402)

No UI required. Sign USDC transactions programmatically:

1

Prepare keypair

2

Flow

  1. Call /analyze without payment β†’ receive 402 with payment details

  2. Sign USDC transfer to treasury (do NOT broadcast)

  3. Retry with X-PAYMENT header containing base64 encoded signed tx

For Frontend dApps (Token-Gate)

Requires wallet-adapter UI for user to sign challenge:

1

Fetch challenge

  1. Fetch challenge: GET /challenge?wallet=...

2

User signs message

  1. User signs message via wallet popup (ed25519) and you base64 encode the signature.

3

Send analyze request

  1. Send all 3 headers: X-WALLET, X-WALLET-SIG, X-CHALLENGE-TOKEN


circle-info

Integration Support Need help integrating? Find us on Twitter/Xarrow-up-right.

Last updated