{
 "components": {
  "schemas": {
   "Asset": {
    "properties": {
     "decimals": {
      "type": "integer"
     },
     "id": {
      "description": "ASA id, 0 = ALGO",
      "format": "int64",
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "unit": {
      "type": "string"
     }
    },
    "type": "object"
   },
   "AssetUSD": {
    "properties": {
     "hops": {
      "type": "integer"
     },
     "liquidity_usd": {
      "type": "number"
     },
     "routes": {
      "description": "With details=1",
      "items": {
       "$ref": "#/components/schemas/Route"
      },
      "type": "array"
     },
     "usd": {
      "description": "USD per whole unit; null if not routable",
      "nullable": true,
      "type": "number"
     }
    },
    "type": "object"
   },
   "Error": {
    "properties": {
     "error": {
      "example": "unknown asset 1",
      "type": "string"
     }
    },
    "type": "object"
   },
   "History": {
    "properties": {
     "asset": {
      "$ref": "#/components/schemas/Asset"
     },
     "bin_seconds": {
      "type": "integer"
     },
     "from": {
      "format": "date-time",
      "type": "string"
     },
     "points": {
      "items": {
       "$ref": "#/components/schemas/Point"
      },
      "type": "array"
     },
     "pools": {
      "type": "integer"
     },
     "quote": {
      "$ref": "#/components/schemas/Asset"
     },
     "source": {
      "enum": [
       "events",
       "bars_1h",
       "daily"
      ],
      "type": "string"
     },
     "to": {
      "format": "date-time",
      "type": "string"
     }
    },
    "type": "object"
   },
   "Pair": {
    "properties": {
     "active_pools": {
      "type": "integer"
     },
     "asset_a": {
      "$ref": "#/components/schemas/Asset"
     },
     "asset_b": {
      "$ref": "#/components/schemas/Asset"
     },
     "kind": {
      "description": "amm: tradable pools; rate: mint/redeem or lending rate venues, TVL = redeemable backing",
      "enum": [
       "amm",
       "rate"
      ],
      "type": "string"
     },
     "pools": {
      "type": "integer"
     },
     "price": {
      "description": "Close: asset B per asset A (whole units), deepest pool",
      "type": "number"
     },
     "reserve_a": {
      "type": "number"
     },
     "reserve_b": {
      "type": "number"
     },
     "swaps": {
      "type": "integer"
     },
     "tvl_usd": {
      "type": "number"
     },
     "venues": {
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "volume_a": {
      "type": "number"
     },
     "volume_b": {
      "type": "number"
     },
     "volume_usd": {
      "type": "number"
     }
    },
    "type": "object"
   },
   "Pairs": {
    "properties": {
     "count": {
      "type": "integer"
     },
     "date": {
      "format": "date",
      "type": "string"
     },
     "final": {
      "type": "boolean"
     },
     "pairs": {
      "items": {
       "$ref": "#/components/schemas/Pair"
      },
      "type": "array"
     }
    },
    "type": "object"
   },
   "Point": {
    "properties": {
     "algo": {
      "nullable": true,
      "type": "number"
     },
     "liquidity_usd": {
      "type": "number"
     },
     "price": {
      "nullable": true,
      "type": "number"
     },
     "ts": {
      "format": "date-time",
      "type": "string"
     },
     "usdc": {
      "nullable": true,
      "type": "number"
     }
    },
    "type": "object"
   },
   "Pool": {
    "properties": {
     "address": {
      "type": "string"
     },
     "app_id": {
      "format": "int64",
      "type": "integer"
     },
     "asa_a": {
      "format": "int64",
      "type": "integer"
     },
     "asa_b": {
      "format": "int64",
      "type": "integer"
     },
     "fee_bps": {
      "type": "number"
     },
     "first_round": {
      "format": "int64",
      "type": "integer"
     },
     "lp_asa": {
      "format": "int64",
      "type": "integer"
     },
     "pool_id": {
      "description": "App id, or the LP-token ASA id for Tinyman V2",
      "format": "int64",
      "type": "integer"
     },
     "venue": {
      "enum": [
       "tinyman2",
       "pact",
       "pactstable",
       "pactw",
       "biatec",
       "humble",
       "algofi",
       "liquihog",
       "nanoswap",
       "talgo",
       "xalgo",
       "folks"
      ],
      "type": "string"
     }
    },
    "type": "object"
   },
   "Pools": {
    "properties": {
     "asset": {
      "format": "int64",
      "type": "integer"
     },
     "count": {
      "type": "integer"
     },
     "pools": {
      "items": {
       "$ref": "#/components/schemas/Pool"
      },
      "type": "array"
     }
    },
    "type": "object"
   },
   "Price": {
    "example": {
     "algo": 806462.88,
     "asset": {
      "decimals": 8,
      "id": 386192725,
      "name": "goBTC",
      "unit": "goBTC"
     },
     "asset_usd": {
      "hops": 1,
      "liquidity_usd": 122543.4,
      "usd": 74302.41
     },
     "price": 74302.41,
     "quote": {
      "decimals": 6,
      "id": 31566704,
      "name": "USDC",
      "unit": "USDC"
     },
     "quote_usd": {
      "usd": 1
     },
     "round": 65000000,
     "ts": "2026-09-13T09:16:17Z",
     "usdc": 74302.41
    },
    "properties": {
     "algo": {
      "nullable": true,
      "type": "number"
     },
     "asset": {
      "$ref": "#/components/schemas/Asset"
     },
     "asset_usd": {
      "$ref": "#/components/schemas/AssetUSD"
     },
     "price": {
      "description": "Whole quote units per whole asset unit",
      "nullable": true,
      "type": "number"
     },
     "quote": {
      "$ref": "#/components/schemas/Asset"
     },
     "quote_usd": {
      "$ref": "#/components/schemas/AssetUSD"
     },
     "requested_ts": {
      "description": "Present when ts was at or after the indexed tip",
      "format": "date-time",
      "type": "string"
     },
     "round": {
      "format": "int64",
      "type": "integer"
     },
     "ts": {
      "format": "date-time",
      "type": "string"
     },
     "usdc": {
      "nullable": true,
      "type": "number"
     }
    },
    "type": "object"
   },
   "Route": {
    "properties": {
     "kept": {
      "type": "boolean"
     },
     "pool_id": {
      "format": "int64",
      "type": "integer"
     },
     "price_usd": {
      "type": "number"
     },
     "venue": {
      "type": "string"
     },
     "via": {
      "description": "Asset on the other side of the pool",
      "format": "int64",
      "type": "integer"
     },
     "weight_usd": {
      "type": "number"
     }
    },
    "type": "object"
   },
   "Status": {
    "properties": {
     "final_day": {
      "format": "date",
      "type": "string"
     },
     "round": {
      "format": "int64",
      "type": "integer"
     },
     "ts": {
      "format": "date-time",
      "type": "string"
     }
    },
    "type": "object"
   }
  }
 },
 "info": {
  "contact": {
   "email": "support@nodely.io",
   "name": "API Support"
  },
  "description": "Algorand DEX prices, paid per call with x402 (exact scheme, USDC ASA 31566704 on Algorand, 0.001 USDC per call, payTo X4O2COYWOFR7XS3EOYEF6MG42Y4Q743SKZMULC776NODRTMMRIVTCOBANQ). An unpaid call answers 402 with the PAYMENT-REQUIRED offer; a bad request answers 400 and is never charged, nor is a call that returns no data. The same data is free and rate-limited at https://algoprices.api.nodely.io. The network fee is sponsored (extra.feePayer X4O2STHZWIA425GOSCKVW3KY6IAW3F6SSV5AZ23HOYFLKCDRTHKWUYNDLY): the payer signs only the USDC transfer, with fee 0, and needs no ALGO beyond its minimum balance. Historical and live prices of Algorand ASAs, computed from on-chain DEX pool state (Tinyman V2, Pact, Pact StableSwap, Pact weighted, Humble, Algofi, LiquiHog, Biatec) since round 19,247,000. Prices are exact to the round: the state of every pool is replayed from its eval deltas. A USD price is a liquidity-weighted route search to USDC over the pools; a price in another quote is the ratio of both USD prices.\n\nEvery price carries three units: `price` (in the requested quote), `usdc` and `algo` (null if the asset cannot be routed).\n\nRate limit: 10 requests/s per client IP (burst 20); excess requests get HTTP 429. Checkout \u003ca href=\"/v1/api-docs/swagger.json\"\u003eswagger.json\u003c/a\u003e.",
  "title": "Nodely DEX Prices (x402)",
  "version": "1.0.0"
 },
 "openapi": "3.0.3",
 "paths": {
  "/v1/prices/account": {
   "get": {
    "description": "Values an account at the indexed tip in USD and ALGO. Counted: the ALGO balance (including the minimum balance), every ASA except single-unit NFTs, LP tokens of indexed AMM pools (Tinyman V2, Pact, Pact stable, NanoSwap) as the account's share of the pool reserves, Folks Lending v2 escrows the account owns (deposit staking fAssets, loan collateral in fAssets, and loans as debt with accrued interest), stakes in opted-in staking apps (Pact farms v1/v2, Alpha-style local stakes), the HAY staking box, Reti pool stakes, TINY locked in the Tinyman governance vault (veTINY), Tinyman v2 order escrows, Vestige token locks the account created, Algofi v1 lending (storage accounts: collateral and debt), DorkFi lending (deposits and debt), the ARC-59 inbox, Alpha Arcade outcome shares (resolved at payout, open at the order-book mid), unclaimed rewards (Alpha-style, Pact farm v1, HAY, Staked tALGO TINY; `reward` legs, `rewards_usd`) and Tinyman v1 redeemable excess, Tinyman v1 and Humble LP tokens (share of the pool reserves), PEX (LP and CVA shares at NAV, perp positions as a full close, orders, storage credit), tALGO and xALGO (also inside LP tokens and Folks fAssets) at the ALGO their contract pays on a burn now, Tinyman Staked tALGO (the stake box's tALGO, returned 1:1, plus unclaimed TINY). Each amount is priced by the same routed DEX prices as /v1/prices/price (fAssets through the Folks deposit rate). Assets without a route are listed in `unpriced` and left out of the totals; positions found but not decodable are in `unvalued`; sources that could not be read are in `not_checked`. An address never seen on chain answers 404 and is not charged.",
    "operationId": "pricesAccount",
    "parameters": [
     {
      "description": "Algorand address (58 characters).",
      "example": "H3A7GQA62RWHF2B7M7VOB3WFEZXCTL63J56SFITK7PAJ6OWLCCQYVR6UTI",
      "in": "query",
      "name": "address",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Minimum pool depth in USD for a pool to price an asset.",
      "in": "query",
      "name": "min_liq",
      "schema": {
       "default": 50,
       "type": "number"
      }
     },
     {
      "description": "Longest route to USDC.",
      "in": "query",
      "name": "max_hops",
      "schema": {
       "default": 4,
       "type": "number"
      }
     },
     {
      "description": "Ignore pools without events for this many days.",
      "in": "query",
      "name": "stale_days",
      "schema": {
       "default": 30,
       "type": "number"
      }
     },
     {
      "description": "Drop pool quotes further than this fraction from the weighted median.",
      "in": "query",
      "name": "max_dev",
      "schema": {
       "default": 0.2,
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "properties": {
          "address": {
           "type": "string"
          },
          "algo": {
           "properties": {
            "balance": {
             "type": "number"
            },
            "min_balance": {
             "type": "number"
            }
           },
           "type": "object"
          },
          "algo_usd": {
           "nullable": true,
           "type": "number"
          },
          "assets_usd": {
           "type": "number"
          },
          "by_kind_usd": {
           "additionalProperties": {
            "type": "number"
           },
           "description": "net USD per position kind (balance, liquidity, deposit, loan, stake, ...); sums to total_usd",
           "type": "object"
          },
          "by_protocol_usd": {
           "additionalProperties": {
            "type": "number"
           },
           "type": "object"
          },
          "closed": {
           "description": "the account has no ALGO (closed)",
           "type": "boolean"
          },
          "comment": {
           "type": "string"
          },
          "debt_usd": {
           "type": "number"
          },
          "nfts": {
           "type": "integer"
          },
          "not_checked": {
           "items": {
            "type": "string"
           },
           "type": "array"
          },
          "over_liquidity": {
           "description": "assets whose net value exceeds their routed liquidity (capped in total_liquid_usd), largest shortfall first, at most 5",
           "items": {
            "properties": {
             "asset": {
              "$ref": "#/components/schemas/Asset"
             },
             "liquidity_usd": {
              "type": "number"
             },
             "usd": {
              "type": "number"
             }
            },
            "type": "object"
           },
           "type": "array"
          },
          "positions": {
           "items": {
            "properties": {
             "account": {
              "description": "escrow account holding the position",
              "type": "string"
             },
             "app": {
              "type": "integer"
             },
             "assets": {
              "items": {
               "properties": {
                "amount": {
                 "description": "whole units",
                 "type": "number"
                },
                "asset": {
                 "$ref": "#/components/schemas/Asset"
                },
                "debt": {
                 "type": "boolean"
                },
                "exceeds_liquidity": {
                 "type": "boolean"
                },
                "liquidity_usd": {
                 "type": "number"
                },
                "price_source": {
                 "description": "set when the price is not the routed DEX price: alpha_market_book (open Alpha Arcade market: Yes at the order-book mid of live resting orders, or the only quote of a one-sided book; No = 1 - Yes), alpha_market_even (open market without live orders: min(0.5, collateral / (Yes + No supply))), alpha_parlay_even (parlay market, same even rule), alpha_market_resolved_win/_lose, alpha_market_void",
                 "type": "string"
                },
                "price_usd": {
                 "nullable": true,
                 "type": "number"
                },
                "reward": {
                 "description": "unclaimed reward, claimable",
                 "type": "boolean"
                },
                "usd": {
                 "description": "negative for debt; null = unpriced",
                 "nullable": true,
                 "type": "number"
                },
                "via": {
                 "description": "LP token this leg was looked through from",
                 "properties": {
                  "lp_amount": {
                   "type": "number"
                  },
                  "lp_asset": {
                   "type": "integer"
                  },
                  "pool_id": {
                   "type": "integer"
                  },
                  "share": {
                   "type": "number"
                  },
                  "venue": {
                   "type": "string"
                  }
                 },
                 "type": "object"
                }
               },
               "type": "object"
              },
              "type": "array"
             },
             "kind": {
              "enum": [
               "balance",
               "liquidity",
               "deposit",
               "loan",
               "stake",
               "excess",
               "lock",
               "receipt",
               "order",
               "claimable",
               "prediction"
              ],
              "type": "string"
             },
             "protocol": {
              "example": "folks_v2",
              "type": "string"
             },
             "unpriced_legs": {
              "type": "integer"
             },
             "usd": {
              "type": "number"
             }
            },
            "type": "object"
           },
           "type": "array"
          },
          "rewards_usd": {
           "description": "unclaimed rewards, included in assets_usd",
           "type": "number"
          },
          "round": {
           "type": "integer"
          },
          "total_algo": {
           "nullable": true,
           "type": "number"
          },
          "total_liquid_usd": {
           "description": "total_usd with each asset netted across positions (holdings - debt) and a positive net capped at the asset's routed liquidity; a net debt counts in full",
           "type": "number"
          },
          "total_usd": {
           "description": "assets_usd - debt_usd",
           "type": "number"
          },
          "ts": {
           "format": "date-time",
           "type": "string"
          },
          "unpriced": {
           "items": {
            "properties": {
             "amount": {
              "type": "number"
             },
             "asset": {
              "$ref": "#/components/schemas/Asset"
             },
             "debt": {
              "type": "boolean"
             },
             "protocol": {
              "type": "string"
             }
            },
            "type": "object"
           },
           "type": "array"
          },
          "unvalued": {
           "items": {
            "properties": {
             "app": {
              "type": "integer"
             },
             "protocol": {
              "type": "string"
             },
             "raw_amount": {
              "type": "integer"
             },
             "reason": {
              "type": "string"
             }
            },
            "type": "object"
           },
           "type": "array"
          }
         },
         "type": "object"
        }
       }
      },
      "description": "OK"
     },
     "400": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Bad address or parameter (not charged)"
     },
     "402": {
      "description": "Payment required: x402 offer in the PAYMENT-REQUIRED header (base64 JSON; the same JSON is the body). Retry with PAYMENT-SIGNATURE."
     },
     "404": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Address never seen on chain (not charged)"
     }
    },
    "summary": "Total value of an Algorand account (wallet + DeFi)",
    "tags": [
     "prices"
    ]
   }
  },
  "/v1/prices/candles": {
   "get": {
    "description": "Candles for charts, 1 h to 1 week bins aligned to UTC (weeks start Monday), at most 2000 per call. Per bin the OHLC is the main pool's: of the asset's AMM pools with events in the bin (mint/redeem and lending venues excluded), the one holding the most of the asset at the bin's open, with at least `min_liq` USD and a USD close within `max_dev` of the asset's routed hourly price (not checked for an asset without one). Depth at the open is the pool's reserve at its previous bar (within 30 days; else the bin's own close). Each hourly bar is converted to USD with the pool's other asset's USD close of that hour; the hour still open at the tip uses the last closed hour's prices. `volume_usd` sums the asset's traded amount over all its AMM pools (through the counter side in hours the asset has no price). Bins without a candle are left out; the bin still open at the tip is included with `partial: true` and changes until it closes. Close can differ slightly from /v1/prices/history, which is a routed price over all pools. A call with no candle answers 404 and is not charged.",
    "operationId": "pricesCandles",
    "parameters": [
     {
      "description": "ASA id, `algo` (= 0) or `usdc` (= 31566704).",
      "example": "386192725",
      "in": "query",
      "name": "asset",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Unix seconds, RFC 3339, or YYYY-MM-DD (UTC); floored to its bin.",
      "example": "2026-10-01",
      "in": "query",
      "name": "from",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Unix seconds, RFC 3339, or YYYY-MM-DD (UTC); rounded up to the end of the bin holding it (exclusive) and clamped to the indexed tip.",
      "example": "2026-10-23",
      "in": "query",
      "name": "to",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Bin width.",
      "in": "query",
      "name": "interval",
      "schema": {
       "default": "1h",
       "enum": [
        "1h",
        "2h",
        "4h",
        "6h",
        "8h",
        "12h",
        "1d",
        "1w"
       ],
       "type": "string"
      }
     },
     {
      "description": "Minimum main-pool depth in USD at the bin's open: 2 × its reserve of the asset (of the other asset when the asset has no hourly price).",
      "in": "query",
      "name": "min_liq",
      "schema": {
       "default": 50,
       "type": "number"
      }
     },
     {
      "description": "Maximum deviation of the main pool's USD close from the asset's routed price.",
      "in": "query",
      "name": "max_dev",
      "schema": {
       "default": 0.2,
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "properties": {
          "asset": {
           "$ref": "#/components/schemas/Asset"
          },
          "candles": {
           "items": {
            "properties": {
             "close": {
              "type": "number"
             },
             "events": {
              "type": "integer"
             },
             "high": {
              "type": "number"
             },
             "liquidity_usd": {
              "type": "number"
             },
             "low": {
              "type": "number"
             },
             "open": {
              "type": "number"
             },
             "partial": {
              "description": "the bin is still open at the indexed tip",
              "type": "boolean"
             },
             "pool": {
              "properties": {
               "pair_asset": {
                "type": "integer"
               },
               "pool_id": {
                "type": "integer"
               },
               "venue": {
                "type": "string"
               }
              },
              "type": "object"
             },
             "pool_switch": {
              "description": "main pool differs from the previous candle's",
              "type": "boolean"
             },
             "pools": {
              "description": "pools with events in the bin",
              "type": "integer"
             },
             "swaps": {
              "type": "integer"
             },
             "ts": {
              "description": "bin start",
              "format": "date-time",
              "type": "string"
             },
             "volume_usd": {
              "type": "number"
             }
            },
            "type": "object"
           },
           "type": "array"
          },
          "comment": {
           "type": "string"
          },
          "from": {
           "format": "date-time",
           "type": "string"
          },
          "interval": {
           "type": "string"
          },
          "interval_seconds": {
           "type": "integer"
          },
          "quote": {
           "example": "usd",
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "to": {
           "format": "date-time",
           "type": "string"
          }
         },
         "type": "object"
        }
       }
      },
      "description": "OK"
     },
     "400": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Bad parameter or unknown asset"
     },
     "402": {
      "description": "Payment required: x402 offer in the PAYMENT-REQUIRED header (base64 JSON; the same JSON is the body). Retry with PAYMENT-SIGNATURE."
     },
     "404": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "No candle in the range (not charged)"
     }
    },
    "summary": "OHLC candles in USD (main pool)",
    "tags": [
     "prices"
    ]
   }
  },
  "/v1/prices/health": {
   "get": {
    "operationId": "pricesHealth",
    "responses": {
     "200": {
      "description": "OK"
     }
    },
    "summary": "Service and algod health (free)",
    "tags": [
     "status"
    ]
   }
  },
  "/v1/prices/history": {
   "get": {
    "description": "`bins` bins of equal width ending at `to` (clamped to the indexed tip). Each point is the price at the end of its bin. Bins under 1 h are computed from raw pool events, 1 h to 1 d from hourly bars, 1 d or more from daily bars.",
    "operationId": "pricesHistory",
    "parameters": [
     {
      "description": "ASA id, `algo` (= 0) or `usdc` (= 31566704).",
      "example": "386192725",
      "in": "query",
      "name": "asset",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Quote asset (ASA id, `algo` or `usdc`). Default USDC.",
      "in": "query",
      "name": "quote",
      "schema": {
       "default": "usdc",
       "type": "string"
      }
     },
     {
      "description": "Unix seconds, RFC 3339, or YYYY-MM-DD (UTC).",
      "example": "2026-10-01",
      "in": "query",
      "name": "from",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Unix seconds, RFC 3339, or YYYY-MM-DD (UTC).",
      "example": "2026-10-23",
      "in": "query",
      "name": "to",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Number of bins (max 2000).",
      "in": "query",
      "name": "bins",
      "schema": {
       "default": 100,
       "maximum": 2000,
       "type": "integer"
      }
     },
     {
      "description": "Minimum pool liquidity in USD for a pool to be used in routing.",
      "in": "query",
      "name": "min_liq",
      "schema": {
       "default": 50,
       "type": "number"
      }
     },
     {
      "description": "Maximum route length from the asset to USDC.",
      "in": "query",
      "name": "max_hops",
      "schema": {
       "default": 4,
       "type": "integer"
      }
     },
     {
      "description": "Ignore pools with no event for this many days.",
      "in": "query",
      "name": "stale_days",
      "schema": {
       "default": 30,
       "type": "integer"
      }
     },
     {
      "description": "Drop pool quotes deviating more than this fraction from the liquidity-weighted median.",
      "in": "query",
      "name": "max_dev",
      "schema": {
       "default": 0.2,
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/History"
        }
       }
      },
      "description": "OK"
     },
     "400": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Bad parameter or unknown asset"
     },
     "402": {
      "description": "Payment required: x402 offer in the PAYMENT-REQUIRED header (base64 JSON; the same JSON is the body). Retry with PAYMENT-SIGNATURE."
     },
     "429": {
      "description": "Rate limit exceeded (10 requests/s per client IP, burst 20)"
     },
     "500": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Internal error"
     }
    },
    "summary": "Price history in equal-width bins",
    "tags": [
     "prices"
    ]
   }
  },
  "/v1/prices/pairs": {
   "get": {
    "description": "Every pair with a live pool that day, sorted by TVL: venues, pool counts, swaps, close price (asset B per asset A, deepest pool), reserves, volumes, TVL and volume in USD. The default day is the last finalized one; `final` is false for the still-open day. Pools of rate venues (talgo, xalgo, folks, otcfixed) form their own rows with `kind: rate`, so a pair can appear twice (amm and rate).",
    "operationId": "pricesPairs",
    "parameters": [
     {
      "description": "YYYY-MM-DD (UTC). Default: last finalized day.",
      "in": "query",
      "name": "date",
      "schema": {
       "format": "date",
       "type": "string"
      }
     },
     {
      "description": "`1`: only pairs with at least one swap that day.",
      "in": "query",
      "name": "active",
      "schema": {
       "enum": [
        "0",
        "1"
       ],
       "type": "string"
      }
     },
     {
      "description": "Minimum TVL in USD.",
      "in": "query",
      "name": "min_tvl",
      "schema": {
       "type": "number"
      }
     },
     {
      "description": "`amm`: tradable pools only; `rate`: mint/redeem and lending rate venues only (tALGO, xALGO, Folks fAssets: their TVL is redeemable backing, not market liquidity). Default: both, as separate rows.",
      "in": "query",
      "name": "kind",
      "schema": {
       "enum": [
        "amm",
        "rate"
       ],
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pairs"
        }
       }
      },
      "description": "OK"
     },
     "400": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Bad parameter or unknown asset"
     },
     "402": {
      "description": "Payment required: x402 offer in the PAYMENT-REQUIRED header (base64 JSON; the same JSON is the body). Retry with PAYMENT-SIGNATURE."
     },
     "429": {
      "description": "Rate limit exceeded (10 requests/s per client IP, burst 20)"
     },
     "500": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Internal error"
     }
    },
    "summary": "All pairs with a live pool on a day",
    "tags": [
     "markets"
    ]
   }
  },
  "/v1/prices/pools": {
   "get": {
    "operationId": "pricesPools",
    "parameters": [
     {
      "description": "ASA id, `algo` (= 0) or `usdc` (= 31566704).",
      "example": "386192725",
      "in": "query",
      "name": "asset",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pools"
        }
       }
      },
      "description": "OK"
     },
     "400": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Bad parameter or unknown asset"
     },
     "402": {
      "description": "Payment required: x402 offer in the PAYMENT-REQUIRED header (base64 JSON; the same JSON is the body). Retry with PAYMENT-SIGNATURE."
     },
     "429": {
      "description": "Rate limit exceeded (10 requests/s per client IP, burst 20)"
     },
     "500": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Internal error"
     }
    },
    "summary": "Pools holding an asset",
    "tags": [
     "markets"
    ]
   }
  },
  "/v1/prices/price": {
   "get": {
    "description": "The price after round `round`, or after the last block at or before `ts`. With neither, the price at the indexed tip (seconds behind the chain). A `ts` at or after the tip is answered at the tip and echoed as `requested_ts`.",
    "operationId": "pricesPrice",
    "parameters": [
     {
      "description": "ASA id, `algo` (= 0) or `usdc` (= 31566704).",
      "example": "386192725",
      "in": "query",
      "name": "asset",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "Quote asset (ASA id, `algo` or `usdc`). Default USDC.",
      "in": "query",
      "name": "quote",
      "schema": {
       "default": "usdc",
       "type": "string"
      }
     },
     {
      "description": "Round (exclusive of `ts`).",
      "example": 65000000,
      "in": "query",
      "name": "round",
      "schema": {
       "format": "int64",
       "type": "integer"
      }
     },
     {
      "description": "Time (exclusive of `round`). Unix seconds, RFC 3339, or YYYY-MM-DD (UTC).",
      "example": "2026-09-13T09:16:17Z",
      "in": "query",
      "name": "ts",
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "`1` lists every pool quote used: venue, pool, via-asset, implied USD price, weight, kept.",
      "in": "query",
      "name": "details",
      "schema": {
       "enum": [
        "0",
        "1"
       ],
       "type": "string"
      }
     },
     {
      "description": "Minimum pool liquidity in USD for a pool to be used in routing.",
      "in": "query",
      "name": "min_liq",
      "schema": {
       "default": 50,
       "type": "number"
      }
     },
     {
      "description": "Maximum route length from the asset to USDC.",
      "in": "query",
      "name": "max_hops",
      "schema": {
       "default": 4,
       "type": "integer"
      }
     },
     {
      "description": "Ignore pools with no event for this many days.",
      "in": "query",
      "name": "stale_days",
      "schema": {
       "default": 30,
       "type": "integer"
      }
     },
     {
      "description": "Drop pool quotes deviating more than this fraction from the liquidity-weighted median.",
      "in": "query",
      "name": "max_dev",
      "schema": {
       "default": 0.2,
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Price"
        }
       }
      },
      "description": "OK"
     },
     "400": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Bad parameter or unknown asset"
     },
     "402": {
      "description": "Payment required: x402 offer in the PAYMENT-REQUIRED header (base64 JSON; the same JSON is the body). Retry with PAYMENT-SIGNATURE."
     },
     "429": {
      "description": "Rate limit exceeded (10 requests/s per client IP, burst 20)"
     },
     "500": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      },
      "description": "Internal error"
     }
    },
    "summary": "Price of an asset at a round or time",
    "tags": [
     "prices"
    ]
   }
  },
  "/v1/prices/pricing": {
   "get": {
    "operationId": "pricesPricing",
    "responses": {
     "200": {
      "description": "OK"
     }
    },
    "summary": "Paid resources and their prices (free)",
    "tags": [
     "status"
    ]
   }
  },
  "/v1/prices/status": {
   "get": {
    "operationId": "pricesStatus",
    "responses": {
     "200": {
      "description": "OK"
     }
    },
    "summary": "How far the dataset is built (free)",
    "tags": [
     "status"
    ]
   }
  }
 },
 "servers": [
  {
   "url": "https://x402.api.nodely.io"
  }
 ],
 "tags": [
  {
   "name": "prices"
  },
  {
   "name": "markets"
  },
  {
   "name": "status"
  }
 ]
}