๐ API Integrations
Leverage our powerful API across popular platforms to supercharge your workflows. Below are official integrations you can use right away โ with more coming soon.
๐ Available Integrations:
Official MCP Server
๐ GitHub Repository
Model Context Protocol server for AI assistants and agents. It also works with Claude, OpenAI, Windsurf, Cline, Cursor, VS Code and many more clients.
RapidAPI
โก Explore on RapidAPI
Use Token Metrics API instantly on RapidAPI with built-in authentication and testing.
Postman
๐ฌ View Postman Collection
Quickly test, explore, and integrate using our official Postman workspace.
Zapier
๐ Connect with Zapier
Automate workflows by connecting Token Metrics to 6,000+ apps with no code.
Smithery
๐ง Connect with Smithery
Power AI workflows by connecting Token Metrics data directly into Smithery's smart document and assistant platform. Enable AI agents and collaborative tools to access real-time crypto signals, market predictions, and portfolio insightsโperfect for building custom dashboards, automations, or research copilots using Token Metrics.
Payโperโcall with x402
Use your crypto wallet to pay per API call using x402. No API key is required when using x402.
How it works
- Set up an x402 client by following the official Quickstart for Buyers guide: x402 Quickstart for Buyers
- Call any endpoint and add these headers:
x-coinbase-402: true
(required) โ tells our API to handle this as an x402 payment flowx-payment-token: usdc | tmai
(optional) โ choose the token to pay with. Defaults tousdc
. Usingtmai
applies a 10% discount to the charge amount
- Do not send
x-api-key
when using x402 โ your wallet and x402 handle payment and access
Minimal examples
Node.js (Axios + x402)
import axios from "axios";
import { withPaymentInterceptor } from "x402-axios";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { baseSepolia } from "viem/chains";
// Create a wallet account per the x402 Quickstart
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
// Wrap axios instance with x402 payment handling (pass your wallet account)
const api = withPaymentInterceptor(
axios.create({ baseURL: "https://api.tokenmetrics.com" }),
account,
);
const res = await api.get("/v2/trading-signals", {
headers: {
"x-coinbase-402": "true",
"x-payment-token": "usdc", // or "tmai" for 10% discount
},
});
console.log(res.data);
Python (HTTPX + x402)
from x402.clients.httpx import x402HttpxClient
from eth_account import Account
import asyncio
import os
async def main():
# Create a wallet account per the x402 Quickstart
account = Account.from_key(os.environ["PRIVATE_KEY"])
# Use x402 HTTPX client with your wallet account
async with x402HttpxClient(account=account, base_url="https://api.tokenmetrics.com") as client:
r = await client.get(
"/v2/trading-signals",
headers={
"x-coinbase-402": "true",
"x-payment-token": "tmai", # 10% discount
},
)
print(await r.aread())
asyncio.run(main())
For full x402 client setup and additional samples, see the official docs: x402 Quickstart for Buyers.
Spending limit for TMAI payments (important)
When paying with tmai
, please set a maximum amount your wallet is allowed to spend for the request in your x402 client. tmai
uses 18 decimals, so values are represented in very small units. To make this simple: set the max to the equivalent of up to 200 TMAI.
- Node.js (BigInt in wei, the smallest unit):
// 200 TMAI in base units (wei): 200 * 10^18
const maxTmaiWei = 200n * 1000000000000000000n;
// Pass this as the max/spend limit to your x402 client options
// Example (option name may vary by client):
// const api = withPaymentInterceptor(axios.create({ baseURL }), account, { maxPayment: maxTmaiWei });
- Python:
# 200 TMAI in base units (wei): 200 * 10^18
max_tmai_wei = 200 * (10 ** 18)
# Pass this as the max/spend limit to your x402 client options
# Example (option name may vary by client):
# async with x402HttpxClient(account=account, base_url=base_url, max_payment=max_tmai_wei) as client:
This simply means โallow up to 200 TMAI to be chargeable for this call.โ You can pick a different limit if you prefer. If you donโt set this for TMAI, the payment may fail if your clientโs default max is too low. For usdc
(6 decimals) this is typically not required, but you may still set a limit if you want.
API Endpoints Pricing for Pay-per-call
๐ Free Endpoints (No Payment Required)
Endpoint | Description |
---|---|
/v2/tokens | Token metadata and IDs |
/v2/price | Live price streams |
/v2/top-market-cap-tokens | Tokens ranked by market cap |
๐ก $0.017 USDC / $0.0153 TMAI
Endpoint | Description |
---|---|
/v2/trading-signals | Entry/exit signals |
/v2/hourly-ohlcv | Hourly historical prices |
/v2/daily-ohlcv | Daily historical prices |
๐ผ $0.034 USDC / $0.0306 TMAI
Endpoint | Description |
---|---|
/v2/resistance-support | Price levels & volatility |
/v2/market-metrics | Bullish/Bearish indicators |
/v2/indices | AI-powered crypto indices |
/v2/indices-holdings | Index components |
/v2/indices-performance | Index returns |
/v2/hourly-trading-signals | Frequent short-term signals |
/v2/tm-grade | Gets the latest TM Grade for a tokenโincluding quant grade, buy/sell signals, momentum, and 24-hour percentage changes. |
/v2/tm-grade-history | Historical TM Grade with buy/sell signal trends and momentum changes over time. |
/v2/technology-grade | Latest technology grade covering development activity, security, and innovation. |
/v2/technology-grade-history | Latest technology grade covering development activity, security, and innovation. |
/v2/fundamental-grade | Latest fundamental grade based on project quality, adoption, and market potential. |
/v2/fundamental-grade-history | Historical fundamental grade trends over time. |
๐ $0.068 USDC / $0.0612 TMAI
Endpoint | Description |
---|---|
/v2/correlation | Token correlation analytics |
/v2/scenario-analysis | Hypothetical investment simulations |
/v2/ai-reports | Token/market research |
/v2/quantmetrics | Investor activity & ranking |
/v2/crypto-investors | On-chain investor tracking |
/v2/moonshot-tokens | AI-curated high potential tokens |
/v2/tmai | Token Metrics AI Chatbot |
Coinbase Agent Kit
๐ง Connect with coinbase agent kit
This is a powerful AI-driven crypto agent built with Next.js that combines Coinbase AgentKit for onchain wallet operations with Token Metrics API for comprehensive cryptocurrency analytics and trading insights.
Note: Coinbase AgentKit uses the same x402 payโperโcall flow described above. When using AgentKit with our API, payments are processed via x402 and the same pricing applies.
๐ฅ API Integration Demo Videos
- โถ๏ธ OpenAI SDK Integration
- ๐ฅ๏ธ Cursor IDE Integration
- ๐ฌ Cline Chat Agent Integration
- ๐ค Claude AI Integration
- ๐ Langchain Integration
- โก QuickNode Integration
๐งฉ More Integrations Coming Soon...
Weโre actively building new integrations with popular cloud platforms, data tools, and automation services. Hereโs a sneak peek at whatโs coming:
- LangChain
- Chainlink
- Alchemy
- Dune
- Fetch.AI
- Mode Network
- Hugging Face
- Replit Extension
- HoloWorld
- Swarms
- SkyFire
- Composio
- Olas
- AI Rig Complex
- Allora
Stay tuned โ we're just getting started ๐
Updated 3 days ago