Squidlor
Loading docs

Taking longer than usual. Check your connection, or reload the page.

Feeds

List feeds, read full per-source feed state, or fetch just the latest value, with every response field explained.

Three endpoints, in increasing order of detail. All are live reads of on-chain state, cached for 10 seconds.

List feeds

HTTP
GET /v1/:chain/feeds

Returns a summary of every aggregator configured for the chain.

Shell
curl https://api.squidlor.com/aggregator/v1/arc/feeds
JSON
{
  "chainId": 5042,
  "count": 7,
  "feeds": [
    {
      "chainId": 5042,
      "pair": "BTC/USD",
      "aggregator": "0x7D86f28D1BBECf39f7BB192a1c26C7c19447E47C",
      "kind": "aggregator",
      "description": "BTC/USD (Squidlor aggregated, Arc)",
      "median": "79903",
      "healthyCount": 1,
      "totalSources": 1,
      "freshestUpdatedAt": 1789739907
    }
  ]
}
FieldMeaning
pairNormalized uppercase pair name.
aggregatorThe SquidlorOracleAggregator address, the contract to read on-chain.
medianThe aggregate answer as a decimal string, already scaled by the feed's decimals.
healthyCountHow many sources passed the staleness check on this read.
totalSourcesHow many sources are configured, healthy or not.
freshestUpdatedAtUnix seconds. The most recent updatedAt among healthy sources.
peekErrorPresent only on failure: the revert reason from peek(). median is then absent.

Important

Watch the ratio of healthyCount to totalSources. Every Arc pair runs one source today, so a healthy read is 1 of 1: valid, but with nothing corroborating it. Alert on healthyCount reaching 0, which is when peek() reverts and median disappears, and re-check the ratio once a second source is wired.

An empty feeds array means no aggregators are configured for that chain on this instance, not that the chain has no feeds. Configuration is per deployment.

Get one feed

HTTP
GET /v1/:chain/feeds/:pair

The full state of one aggregator, including a per-source breakdown. This is the endpoint to use when you want to know why a price is what it is.

Shell
curl https://api.squidlor.com/aggregator/v1/arc/feeds/BTC_USD
JSON
{
  "chainId": 5042,
  "pair": "BTC/USD",
  "aggregator": "0x7D86f28D1BBECf39f7BB192a1c26C7c19447E47C",
  "kind": "aggregator",
  "description": "BTC/USD (Squidlor aggregated, Arc)",
  "decimals": 8,
  "owner": "0xB57BBda48C33fF725E93D604023D56D9C5b00e2a",
  "selectionMode": "MEDIAN",
  "minHealthySources": 1,
  "defaultMaxStaleness": 600,
  "latestRoundId": "0",
  "median": "79903",
  "medianRaw": "7990300000000",
  "freshestUpdatedAt": 1789739907,
  "healthyCount": 1,
  "sources": [
    {
      "index": 0,
      "adapter": "0x12AeA54771C43CB6A0d393B930c642F28389210B",
      "name": "squidlor:BTC/USD",
      "enabled": true,
      "maxStaleness": 900,
      "price": "79903",
      "priceRaw": "7990300000000",
      "updatedAt": 1789739907,
      "isStale": false
    }
  ],
  "cachedAt": "2026-09-18T14:00:34.719Z"
}

Aggregator fields

FieldMeaning
decimalsScale of medianRaw. 8 across every Squidlor pair.
ownerThe address that can add, remove, and reorder sources. See the trust model.
selectionModeMEDIAN or PRIMARY_WITH_FALLBACK.
minHealthySourcesBelow this count, peek() reverts and median is absent.
defaultMaxStalenessSeconds. Applies to any source whose own maxStaleness is 0.
latestRoundIdThe last round committed by poke(). 0 means no round has ever been committed.
median / medianRawThe aggregate, formatted and raw.

Source fields

FieldMeaning
indexPosition in the source list. Under PRIMARY_WITH_FALLBACK this is priority order.
adapterThe adapter contract wrapping this source.
nameSelf-reported label from the adapter, e.g. squidlor:BTC/USD. Arc runs one source per pair today, so it is squidlor on every feed.
enabledDisabled sources are never counted, even if fresh.
maxStalenessSeconds. 0 means the aggregator's defaultMaxStaleness applies.
price / priceRawThis source's own answer, formatted and raw.
updatedAtThis source's own timestamp for that answer.
isStaleComputed: now > updatedAt + effectiveMaxStaleness.
errorPresent if reading the adapter failed. price is then absent.

A source with isStale: true or an error is excluded from the median but still reported, which is what makes this endpoint useful for diagnosis rather than just display.

Get just the value

HTTP
GET /v1/:chain/feeds/:pair/value

For consumers that only want the number: cron jobs, indexers, dashboards, spreadsheet formulas.

Shell
curl https://api.squidlor.com/aggregator/v1/arc/feeds/BTC_USD/value
JSON
{
  "pair": "BTC/USD",
  "chainId": 5042,
  "value": "80332.85",
  "valueRaw": "8033285000000",
  "decimals": 8,
  "healthyCount": 1,
  "updatedAt": 1789740074
}

The legacy query-string route additionally returns ok, totalSources, and mode:

Shell
curl "https://api.squidlor.com/aggregator/v1/feeds/BTC_USD/value?chainId=5042"
JSON
{
  "pair": "BTC/USD",
  "chainId": 5042,
  "ok": true,
  "value": "80332.85",
  "valueRaw": "8033285000000",
  "decimals": 8,
  "healthyCount": 1,
  "totalSources": 1,
  "updatedAt": 1789740074,
  "mode": "MEDIAN",
  "kind": "aggregator"
}

When the aggregate is unavailable

If peek() reverts, typically because too few sources are healthy, this endpoint returns 503, not 200 with a null:

JSON
{
  "pair": "BTC/USD",
  "chainId": 5042,
  "error": "minHealthySources not met"
}

Handle the 503. A consumer that only checks for a 200 and reads value will get undefined and, if it is careless, treat it as zero.

TypeScript
const response = await fetch(
  "https://api.squidlor.com/aggregator/v1/arc/feeds/BTC_USD/value",
);

if (!response.ok) {
  // 503 = aggregate unavailable, 404 = no such feed on this chain
  throw new Error(`feed unavailable: ${response.status}`);
}

const { value, updatedAt } = await response.json();

// Decide for yourself whether this is fresh enough.
const ageSeconds = Math.floor(Date.now() / 1000) - updatedAt;
if (ageSeconds > 3600) {
  throw new Error(`price is ${ageSeconds}s old`);
}

Errors

StatusMeaning
404No such feed on that chain, or the chain is not configured on this instance.
503The aggregate is unavailable; peek() reverted.
500RPC failure or an unexpected error.

Full detail in errors & limits.