Endpoints · Consultas salvas

Create a saved query

Esta referência está em inglês. A navegação e os rótulos estão traduzidos.

Saves a query and its column set. It shows up in the Explorer.

POST/api/v1/saved-queries

Escopo: watchlists:write

Parâmetros

Requisição
curl https://yieldsniper.finance/api/v1/saved-queries \
  -H "Authorization: Bearer $YS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Low-risk stables above 6.5%",
    "query": {
      "q": "yield.total_apy >= 6.5 and safety.band = low and asset_class = stablecoin and screen.verdict = pass sort yield.total_apy desc",
      "fields": [
        "name",
        "venue.protocol",
        "venue.chain",
        "yield.total_apy",
        "liquidity.tvl",
        "safety.score",
        "safety.band"
      ]
    },
    "pinned": true
  }'
Resposta201
{
  "object": "saved_query",
  "id": "sq_6adccafb1c9b331c1d1bbfcb",
  "name": "Low-risk stables above 6.5%",
  "query": {
    "where": [
      {
        "field": "yield.total_apy",
        "op": "gte",
        "value": 6.5
      },
      {
        "field": "safety.band",
        "op": "eq",
        "value": "low"
      },
      {
        "field": "asset_class",
        "op": "eq",
        "value": "stablecoin"
      },
      {
        "field": "screen.verdict",
        "op": "eq",
        "value": "pass"
      }
    ],
    "match": "all",
    "sort": [
      {
        "field": "yield.total_apy",
        "direction": "desc"
      }
    ],
    "fields": [
      "name",
      "venue.protocol",
      "venue.chain",
      "yield.total_apy",
      "liquidity.tvl",
      "safety.score",
      "safety.band"
    ]
  },
  "pinned": true,
  "created_at": "2026-10-24T15:12:59.538Z",
  "updated_at": "2026-10-24T15:12:59.538Z"
}

Retorna