Trending Momentum
Identifies tokens with rapidly increasing social signals and momentum indicators. The endpoint detects trending tokens by combining tweet velocity, engagement growth, and quality signals into a composite momentum score. It can return a single aggregate ranking or a time-series view of momentum over time.
GET
https://api.cambrian.org/deep42/social-data/trending-momentum
Parameters
lookback_hours (integer)
Hours to look back for trend detection. Default: 24. Before v3, values outside 1 to 168 are clamped to the nearest bound. In v3 and later, they return 400.
min_velocity (number)
Minimum velocity score (rate of change)
limit (integer)
Number of trending tokens to return. In time-series mode, the maximum number of rows. In v2.1 and later, time-series mode returns every bucket for up to this many tokens.
granularity (string)
Time granularity for momentum analysis. 'total' returns aggregate momentum ranking (single result set). Other values return time-series momentum data showing velocity changes over time. Time-series responses limited to 1000 rows maximum for performance. In v2.1 and later, each time-series bucket has the width of this value, the buckets cover the full lookback_hours window, and a value outside this list returns 400.
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"tokenSymbol": "CGPT",
"recentTweets": 6,
"uniqueAuthors": 2,
"sentiment": 7.33,
"qualityScore": 7.83,
"qualityDelta": 0,
"totalReach": 26459,
"tweetVelocity": 3,
"engagementVelocity": 21,
"momentumScore": 239.31
},
{
"tokenSymbol": "FLOKI",
"recentTweets": 11,
"uniqueAuthors": 8,
"sentiment": 5.55,
"qualityScore": 7,
"qualityDelta": -1,
"totalReach": 49447,
"tweetVelocity": 2.8,
"engagementVelocity": 53.73,
"momentumScore": 211.85
},
{
"tokenSymbol": "BABY",
"recentTweets": 7,
"uniqueAuthors": 2,
"sentiment": 6.86,
"qualityScore": 9,
"qualityDelta": 0,
"totalReach": 1020,
"tweetVelocity": 3.33,
"engagementVelocity": 7.86,
"momentumScore": 207.86
}
]
400
Bad Request: Invalid request parameters or malformed request.
401
Unauthorized: Missing or invalid API key. Include X-API-Key header with your request.
403
Forbidden: Invalid API key or insufficient permissions to access this resource.
404
Not Found: Endpoint or resource does not exist.
408
Request Timeout: Request took too long to process. Try again.
500
Internal Server Error: An unexpected error occurred while processing your request.
503
Service Unavailable: The server is temporarily unable to handle the request. Please try again later.
Examples
1. Aggregate momentum ranking
Retrieves the top trending tokens ranked by composite momentum score, using the default `total` granularity.
curl
curl -X GET "https://api.cambrian.org/deep42/social-data/trending-momentum?limit=3" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
JSON
1[
2 {
3 "tokenSymbol": "CGPT",
4 "recentTweets": 6,
5 "uniqueAuthors": 2,
6 "sentiment": 7.33,
7 "qualityScore": 7.83,
8 "qualityDelta": 0,
9 "totalReach": 26459,
10 "tweetVelocity": 3,
11 "engagementVelocity": 21,
12 "momentumScore": 239.31
13 },
14 {
15 "tokenSymbol": "FLOKI",
16 "recentTweets": 11,
17 "uniqueAuthors": 8,
18 "sentiment": 5.55,
19 "qualityScore": 7,
20 "qualityDelta": -1,
21 "totalReach": 49447,
22 "tweetVelocity": 2.8,
23 "engagementVelocity": 53.73,
24 "momentumScore": 211.85
25 },
26 {
27 "tokenSymbol": "BABY",
28 "recentTweets": 7,
29 "uniqueAuthors": 2,
30 "sentiment": 6.86,
31 "qualityScore": 9,
32 "qualityDelta": 0,
33 "totalReach": 1020,
34 "tweetVelocity": 3.33,
35 "engagementVelocity": 7.86,
36 "momentumScore": 207.86
37 }
38]
2 {
3 "tokenSymbol": "CGPT",
4 "recentTweets": 6,
5 "uniqueAuthors": 2,
6 "sentiment": 7.33,
7 "qualityScore": 7.83,
8 "qualityDelta": 0,
9 "totalReach": 26459,
10 "tweetVelocity": 3,
11 "engagementVelocity": 21,
12 "momentumScore": 239.31
13 },
14 {
15 "tokenSymbol": "FLOKI",
16 "recentTweets": 11,
17 "uniqueAuthors": 8,
18 "sentiment": 5.55,
19 "qualityScore": 7,
20 "qualityDelta": -1,
21 "totalReach": 49447,
22 "tweetVelocity": 2.8,
23 "engagementVelocity": 53.73,
24 "momentumScore": 211.85
25 },
26 {
27 "tokenSymbol": "BABY",
28 "recentTweets": 7,
29 "uniqueAuthors": 2,
30 "sentiment": 6.86,
31 "qualityScore": 9,
32 "qualityDelta": 0,
33 "totalReach": 1020,
34 "tweetVelocity": 3.33,
35 "engagementVelocity": 7.86,
36 "momentumScore": 207.86
37 }
38]
x402 Payment Option
This endpoint supports pay-per-use access via the x402 payment protocol (v2): pay $0.05 USDC per request using blockchain micropayments. No API key required.
Quickstart (Typescript)
bash
npm install @x402/fetch @x402/evm viem
TypeScript
1import { x402Client } from "@x402/core/client";
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/deep42/social-data/trending-momentum"
11);
12const data = await response.json();
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/deep42/social-data/trending-momentum"
11);
12const data = await response.json();
Quickstart (Python)
bash
pip install "x402[httpx]"
Python
1import asyncio, os
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/deep42/social-data/trending-momentum")
13 print(response.json())
14asyncio.run(main())
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/deep42/social-data/trending-momentum")
13 print(response.json())
14asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns 402 Payment Required with payment details
- The x402 SDK automatically signs a payment authorization with your wallet
- The SDK resubmits the request with the signed payment
- Server verifies payment and returns the API response
The x402 SDK handles steps 2 through 5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request