Referencia

Lenguaje de consulta

Esta referencia está en inglés. La navegación y las etiquetas están traducidas.

One small language describes a query everywhere: the Explorer's Query mode, GET /instruments?q= and the MCP tool screen_instruments. Write it once, paste it anywhere.

Examples

Ejemplo
apy >= 6.5 and band = low and class = stablecoin sort apy desc limit 20

chain in (ethereum, base) and tvl > 100m and verdict = pass sort score desc, tvl desc

verdict = fail and rule = recent_incident sort tvl desc

class = ether and signals contains incentive_dependent

search "usdc" and protocol = prt_aave-v3

apy between 4 and 8 and not il and exit = instant

id in (ins_4c29f40abec73e1b, ins_0abd5ec576be07e6)

Conditions

Joining conditions

Sort, limit and paging

Values

Fields and aliases

How a query is parsed

query (from the response)
{
  "where": [
    {
      "field": "yield.total_apy",
      "op": "gte",
      "value": 6.5
    },
    {
      "field": "safety.band",
      "op": "eq",
      "value": "low"
    },
    {
      "field": "asset_class",
      "op": "eq",
      "value": "stablecoin"
    }
  ],
  "match": "all",
  "sort": [
    {
      "field": "yield.total_apy",
      "direction": "desc"
    }
  ],
  "limit": 20
}
400 invalid_query400
{
  "type": "https://yieldsniper.finance/developers/errors#invalid_query",
  "title": "Invalid query",
  "status": 400,
  "code": "invalid_query",
  "detail": "Unknown field \"yield.apy\".",
  "position": 0,
  "request_id": "req_5670f65858310f3c37f932e4"
}