一键导入
santiment-api
Query the Santiment GraphQL API for on-chain, financial, social, and development crypto metrics across 2,000+ assets
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Query the Santiment GraphQL API for on-chain, financial, social, and development crypto metrics across 2,000+ assets
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Context-aware caption translation skill for SRT/VTT/ASS with bilingual output and optional Gemini CLI fallback.
CRITICAL: Skill composition engine for automatic workflow generation from skill metadata. Triggers: compose skills, orchestrate, workflow, combine skills, skill pipeline, multi-skill, 技能组合, 工作流编排, 技能发现, 自动编排, skill discovery, semantic matching, StateGraph generation
Intelligent content optimization framework for preparing data and content for AI/ML training pipelines with quality analysis, dataset optimization, and hyperparameter suggestions.
CRITICAL: Multi-agent consensus engine for parallel LLM analysis, cross-validation, and collective decision-making. Triggers: consensus, multi-agent, voting, cross-validate, hallucination reduction, 多模型共识, 交叉验证, 集体决策
CRITICAL: You are an expert in multi-agent negotiation, game theory, and automated settlement protocols. Use this skill for designing and implementing agent-to-agent negotiation workflows with x402 payment settlement. Triggers on: negotiation, bargaining, agent trade, service agreement, SLA, price negotiation, x402 settlement, agent economy, "agents negotiate", "how do agents negotiate prices", "implement agent bargaining", "multi-round negotiation", "automated deal-making", "自动谈判", "智能体协商", "服务协议", "价格谈判", "多轮协商", "agent 经济"
Query Solodit audit knowledge to review smart contracts with evidence-backed findings, severity summaries, and remediation guidance. Use for contract audit prep, vulnerability triage, and secure coding reviews.
| name | santiment-api |
| description | Query the Santiment GraphQL API for on-chain, financial, social, and development crypto metrics across 2,000+ assets |
| version | 1.1.5 |
| author | Santiment <support@santiment.net> |
| tags | ["santiment","crypto","graphql","on-chain","metrics","blockchain","defi","exchange-flows","social-sentiment","mvrv","whale-tracking"] |
| triggers | [{"type":"keyword","keywords":["santiment","crypto metrics","on-chain data","exchange flows","mvrv","nvt","social volume","whale tracking","active addresses","crypto analytics","token age","exchange inflow","exchange outflow","dev activity"],"priority":90},{"type":"pattern","patterns":["(?i)(query|fetch|get)\\s+(santiment|crypto|on-chain)","(?i)santiment\\s+api","(?i)(mvrv|nvt|exchange.*(inflow|outflow|balance))","(?i)(daily.active.addresses|social.volume|dev.activity)"],"priority":85},{"type":"intent","intent_category":"crypto_data_analysis","priority":95}] |
| parameters | [{"name":"metric","type":"string","required":false,"description":"Santiment metric name (e.g., price_usd, daily_active_addresses, mvrv_usd)"},{"name":"slug","type":"string","required":false,"description":"Asset identifier (e.g., bitcoin, ethereum, cardano)"},{"name":"from","type":"string","required":false,"description":"Start of time range (ISO 8601 or relative expression like utc_now-7d)"},{"name":"to","type":"string","required":false,"description":"End of time range (ISO 8601 or relative expression like utc_now)"},{"name":"interval","type":"string","required":false,"default":"1d","description":"Data granularity (5m, 1h, 1d, 7d)"}] |
| prerequisites | {"env_vars":["SANTIMENT_API_KEY"],"skills":[]} |
| composable | true |
| persist_state | false |
| scripts | {"enabled":true,"working_directory":"./scripts","definitions":[{"name":"santiment_query","description":"Execute a Santiment GraphQL query for any metric, asset, and time range","type":"python","file":"santiment_query.py","timeout":30},{"name":"santiment_discovery","description":"Discover available metrics and asset slugs from the Santiment API","type":"python","file":"santiment_discovery.py","timeout":30}]} |
| metadata | {"openclaw":{"emoji":"📊","requires":{"env":["SANTIMENT_API_KEY"]},"primaryEnv":"SANTIMENT_API_KEY"}} |
Query the Santiment API — a GraphQL platform providing 750+ metrics for 2,000+ crypto assets across 12 blockchains. Fetch on-chain, financial, social, and development data for the cryptocurrency market.
https://api.santiment.net/graphqlhttps://api.santiment.net/graphiqlEvery request requires an API key in the Authorization header (Authorization: Apikey <KEY>). The user must provide their own key — never hardcode or assume one. If $SANTIMENT_API_KEY is set in the environment, use it directly. Otherwise, ask the user for their key (free tier available at https://app.santiment.net/account#api-keys).
All requests are HTTP POST with Content-Type: application/json. Use GraphQL variables to separate the query template from runtime values — this avoids quote-escaping errors. In curl, use a heredoc with a quoted delimiter (<< 'QUERY') so the shell doesn't interpret $variable as environment variables.
curl -s -X POST https://api.santiment.net/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Apikey $SANTIMENT_API_KEY" \
-d @- << 'QUERY'
{
"query": "query($metric: String!, $slug: String, $from: DateTime!, $to: DateTime!, $interval: interval) { getMetric(metric: $metric) { timeseriesData(slug: $slug, from: $from, to: $to, interval: $interval) { datetime value } } }",
"variables": {
"metric": "price_usd",
"slug": "bitcoin",
"from": "utc_now-7d",
"to": "utc_now",
"interval": "1d"
}
}
QUERY
Use these GraphQL types in query(...) variable declarations:
| Parameter | Type |
|---|---|
metric | String! |
slug | String |
selector | MetricTargetSelectorInputObject |
from / to | DateTime! |
interval | interval |
aggregation | Aggregation |
transform | TimeseriesMetricTransformInputObject |
getMetricNearly all data flows through getMetric. Pass a metric name string and then select one sub-field that determines the shape of the response data.
Choose exactly one sub-field per getMetric call:
| Sub-field | Returns | When to use |
|---|---|---|
timeseriesData | [{datetime, value}] | Default choice — returns a time series with explicit field selection. Use for charting, trend analysis, or any case where individual data points matter. |
timeseriesDataJson | Pre-formatted JSON string | Quick dump without specifying return fields. Useful for rapid prototyping but less control over output shape. |
timeseriesDataPerSlugJson | JSON object keyed by slug | Fetch the same metric for multiple assets in a single API call. Pass selector: { slugs: ["bitcoin", "ethereum"] }. This counts as one API call, making it much more efficient than separate queries per asset. |
aggregatedTimeseriesData | Single numeric value | Need one summary number (average, sum, last value) over a time range. Lowest complexity, most quota-friendly. |
histogramData | Array of bucketed ranges | Distribution data — e.g., how much ETH was bought at each price range. Less commonly needed. |
metadata | Metric metadata object | Discover available slugs, aggregations, selectors, intervals, and data type for a metric. Call this before querying an unfamiliar metric. |
availableSince | ISO 8601 date string | Check how far back data exists for a given metric and slug. Prevents wasted calls on empty time ranges. A return value of 1970-01-01T00:00:00Z means the metric has never been computed for this slug. |
lastDatetimeComputedAt | ISO 8601 timestamp | Check data freshness — when the metric was last computed for a slug. |
These parameters are passed to the sub-field, not to getMetric itself:
| Parameter | Type | Description | Example |
|---|---|---|---|
slug | String | Asset identifier. Use for single-asset queries. | "bitcoin", "ethereum" |
selector | Object | Advanced selection. Use instead of slug when you need multi-asset queries, or filtering by owner, label, holdersCount, or source. | { slug: "bitcoin", source: "cryptocompare" } |
from | String | Start of time range. Accepts ISO 8601 timestamps or relative expressions. | "2024-01-01T00:00:00Z", "utc_now-30d" |
to | String | End of time range. Same format as from. | "utc_now" |
interval | String | Time granularity between data points. | "5m", "1h", "1d", "7d" |
aggregation | Enum | Override the default aggregation method. Options: AVG, SUM, LAST, FIRST, MEDIAN, MAX, MIN, ANY. | AVG |
transform | Object | Post-processing transform applied to the result. | See Transforms section. |
Important: slug and selector are mutually exclusive. Use slug for simple single-asset queries. Use selector when querying multiple slugs at once ({ slugs: [...] }) or when a metric requires additional selector fields like holdersCount or owner.
The from and to fields accept relative expressions: utc_now-<N><unit> where unit is d (day), w (week), m (month), or y (year). Preferred over hardcoded dates.
"utc_now" — current time"utc_now-7d" — 7 days ago"utc_now-1m" — 1 month ago"utc_now-1y" — 1 year agoApply transforms directly in the query to post-process data server-side. Pass the transform parameter to timeseriesData:
| Transform | Effect | Use case |
|---|---|---|
{type: "moving_average", movingAverageBase: N} | Replace each value with the average of the preceding N values | Smooth noisy metrics like MVRV, social volume |
{type: "consecutive_differences"} | Replace each value with the difference from the prior value | Compute daily change from a cumulative metric |
{type: "percent_change"} | Replace each value with the percent change from the prior value | Normalize changes across metrics with different scales |
Transforms reduce the number of returned data points by N-1 for moving averages. Request a slightly wider time range to compensate.
When you don't know the exact metric name for a user's request, follow this 3-step workflow. Always prefer dynamic discovery over hardcoded values.
{
getAvailableMetrics
}
Returns 1,000+ snake_case strings. The response is large — save to a file with -o and read it directly (e.g., open() in Python). Do not pipe the contents through stdin at any stage — neither from curl nor when processing the file afterward:
curl -s -X POST https://api.santiment.net/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Apikey <YOUR_API_KEY>" \
-d '{"query": "{ getAvailableMetrics }"}' \
-o /tmp/santiment-metrics.json
Filter by plan with getAvailableMetrics(product: SANAPI, plan: BUSINESS_PRO).
Search the saved file for keywords matching user intent. Example: whale activity → search for holder, top, whale, supply, amount_in. See references/metrics-catalog.md for intent-to-keyword mappings.
Once you have candidate metrics, fetch metadata to confirm compatibility:
{
getMetric(metric: "amount_in_top_holders") {
metadata {
availableSlugs
availableAggregations
availableSelectors
dataType
defaultAggregation
minInterval
}
}
}
This reveals required selectors (e.g., holdersCount), supported slugs, and minimum interval. Requesting a smaller interval than minInterval returns an error. See examples/query-patterns.md example 5 for a worked example.
Look up a specific project by slug to verify it exists and see its details:
{
projectBySlug(slug: "bitcoin") {
slug
name
ticker
infrastructure
}
}
Browse all projects paginated (useful when the user provides a token name or ticker instead of a slug):
{
allProjects(page: 1, pageSize: 50) {
slug
name
ticker
}
}
Before making a large timeseries query, verify that data exists for the desired metric-slug combination and check freshness:
{
getMetric(metric: "daily_active_addresses") {
availableSince(slug: "ethereum")
lastDatetimeComputedAt(slug: "ethereum")
}
}
Understand what historical range your API key can access for each metric. Call this to avoid wasted queries that would return restriction errors:
{
getAccessRestrictions(product: SANAPI, plan: BUSINESS_PRO, filter: METRIC) {
name
isAccessible
isRestricted
restrictedFrom
restrictedTo
minInterval
}
}
The API always returns HTTP 200, even for errors. Always parse the JSON and check for the errors array.
A typical error response:
{
"data": { "getMetric": null },
"errors": [
{
"message": "The metric 'nonexistent_metric' is not a valid metric.",
"locations": [{ "line": 2, "column": 3 }]
}
]
}
When data contains null and errors is present, the query failed. Common errors:
| Error | Cause | Fix |
|---|---|---|
| Invalid metric name | Metric string doesn't exist | Verify with getAvailableMetrics |
| Invalid slug | Asset slug not recognized | Verify with allProjects or projectBySlug |
| Interval too small | Requested interval below minimum for this metric or plan | Check metadata { minInterval } |
| Time range restricted | Historical range exceeds plan allowance | Check getAccessRestrictions |
| Complexity too high | Query requests too many data points | Reduce time range, increase interval, or fetch fewer fields |
| HTTP 429 | Rate limit exceeded | Back off exponentially and retry after a delay |
| Empty timeseries (no error) | On-chain metric not computed for this asset's chain | Check availableSince for epoch, then projectBySlug { infrastructure }. See references/metrics-catalog.md Ghost Data section. |
Empty data is not the same as zero data. When timeseriesData returns [] without errors, do NOT tell the user there is no activity. On-chain metrics are only computed for indexed chains. Check references/metrics-catalog.md Ghost Data section for the diagnostic flow.
The one exception to the HTTP 200 rule is rate limiting: HTTP 429 means the account's quota is exhausted. See references/rate-limits.md for details.
Follow these steps to construct any Santiment API query:
projectBySlug or allProjects.availableSince first."1d", "1h", "7d". Larger intervals reduce complexity.timeseriesData for series, aggregatedTimeseriesData for single value, timeseriesDataPerSlugJson for multi-asset.transform, selector (instead of slug), or aggregation override.availableSince for epoch. If epoch, the metric isn't computed for this slug's chain. Report unavailability and suggest alternative metrics.Execute via curl with the user's API key and parse the JSON response. Always check for the errors array before processing data.
Consult these reference files for detailed information:
references/metrics-catalog.md — keyword-to-metric mapping for translating user intent into search terms, plus 20 curated quick-reference metrics and naming conventionsreferences/rate-limits.md — tier limits, complexity scoring, and optimization strategies to avoid quota exhaustionexamples/query-patterns.md — 6 worked examples with both GraphQL and curl, including discovery workflow and ghost data diagnostics