Documentation

Developer
Documentation

Integrate Robinhood Chain intelligence tools into your applications and autonomous agents.

01

Direct Call (agent-friendly)

Call any tool with a single request. When payment is required, the endpoint responds with HTTP 402 and the payment details (requestId, price, receiver). Pay in USDG and retry with proof.

shell
# Call a tool
curl "https://your-domain.com/api/v1/token-risk-scanner?address=0xToken&wallet=0xYou"

# If HTTP 402, pay USDG to the returned receiver, then retry:
curl "https://your-domain.com/api/v1/token-risk-scanner?address=0xToken&wallet=0xYou&requestId=REQUEST_ID&txHash=0xPaymentTx"
02

Tool Discovery

http
GET /api/tools

Response:
{
  "tools": [
    {
      "id": "transaction-explainer",
      "name": "Transaction Explainer",
      "price": "0.01",
      "currency": "USDG",
      "chainId": 4663,
      "inputSchema": { ... },
      "outputSchema": { ... },
      "endpoint": "/api/tools/execute"
    }
  ]
}
03

Execution Flow

  1. 01GET /api/tools — Discover available tools
  2. 02POST /api/requests — Create payment request
  3. 03Transfer USDG on Robinhood Chain (4663)
  4. 04POST /api/tools/execute — Submit tx hash and run tool
  5. 05GET /api/runs/{id} — Retrieve stored result
04

curl Example

shell
# 1. Create request
curl -X POST https://your-domain.com/api/requests \
  -H "Content-Type: application/json" \
  -d '{
    "toolId": "transaction-explainer",
    "walletAddress": "0xYourAddress",
    "input": { "transactionHash": "0xYourTxHash" }
  }'

# 2. Pay USDG (via wallet)

# 3. Execute
curl -X POST https://your-domain.com/api/tools/execute \
  -H "Content-Type: application/json" \
  -d '{
    "requestId": "uuid-from-step-1",
    "toolId": "transaction-explainer",
    "walletAddress": "0xYourAddress",
    "input": { "transactionHash": "0xYourTxHash" },
    "transactionHash": "0xPaymentTxHash"
  }'
05

JavaScript Example

javascript
import { createWalletClient, http, parseUnits } from 'viem';
import { robinhoodChain } from './chains/robinhood';

const BASE = 'https://your-domain.com';

// 1. Discover tools
const { tools } = await fetch(`${BASE}/api/tools`).then(r => r.json());

// 2. Create request
const { requestId, expectedAmount, receiver } = await fetch(`${BASE}/api/requests`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    toolId: 'wallet-intelligence',
    walletAddress: account.address,
    input: { walletAddress: '0xTargetAddress' },
  }),
}).then(r => r.json());

// 3. Pay USDG
const txHash = await walletClient.writeContract({
  address: '0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168',
  abi: erc20Abi,
  functionName: 'transfer',
  args: [receiver, BigInt(expectedAmount)],
});

// 4. Execute
const { result } = await fetch(`${BASE}/api/tools/execute`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    requestId, toolId: 'wallet-intelligence',
    walletAddress: account.address,
    input: { walletAddress: '0xTargetAddress' },
    transactionHash: txHash,
  }),
}).then(r => r.json());
06

Python Example

python
import requests

BASE = "https://your-domain.com"

# Discover tools
tools = requests.get(f"{BASE}/api/tools").json()

# Create request
req = requests.post(f"{BASE}/api/requests", json={
    "toolId": "token-risk-scanner",
    "walletAddress": "0xYourAddress",
    "input": {"tokenAddress": "0xTokenAddress"},
}).json()

# After paying USDG on chain...
result = requests.post(f"{BASE}/api/tools/execute", json={
    "requestId": req["requestId"],
    "toolId": "token-risk-scanner",
    "walletAddress": "0xYourAddress",
    "input": {"tokenAddress": "0xTokenAddress"},
    "transactionHash": "0xPaymentTxHash",
}).json()

print(result["result"])
07

Register Your Own API (get paid)

List your Robinhood Chain API and earn USDG whenever it's called. Payment is sent directly to your wallet on chain; the marketplace verifies it, then proxies the request to your endpoint. Register via the form at /register or the API below.

shell
curl -X POST https://your-domain.com/api/services \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Signal API",
    "description": "Onchain trading signal for Robinhood Chain tokens",
    "category": "Analytics",
    "providerName": "acme",
    "payoutWallet": "0xYourPayoutWallet",
    "endpointUrl": "https://api.acme.com/signal",
    "queryParam": "address",
    "inputType": "address",
    "priceUsdg": "0.02"
  }'

# Your API is now live at /api/v1/{slug} and listed in the marketplace.
# List community APIs:
curl https://your-domain.com/api/services
08

Agent Integration

Agent manifest: /.well-known/agent.json

Skill guide: /skill.md

09

Available Tools

Transaction Explainertransaction-explainer

Transaction hash

Contract Explainercontract-explainer

Contract address

Wallet Intelligencewallet-intelligence

Wallet address

Token Risk Scannertoken-risk-scanner

Token contract address

Robinhood Chain Research Agentresearch-agent

Token or contract address

Token Holder Analysistoken-holder-analysis

Token contract address

Block Inspectorblock-inspector

Block number

Gas & Network Statsgas-network-stats

None