---
title: "Individual cryptopool swaps."
method: GET
path: "/v1/analytics/markets/swaps/cryptopool"
tags: ["markets"]
---

# Individual cryptopool swaps.

`GET /v1/analytics/markets/swaps/cryptopool`

One row per cryptopool trade. USD × 1e18; `tokensSold`/`tokensBought` are token-native — `assetDecimals` for the asset leg, 18 for crvUSD (coin 0). Newest first; `isDesc` and `sortBy=date|amount|fee` change it. New rows only prepend, so dedupe on `id` while paging. `minAmountUsd` drops priced rows under the given threshold ($0.1, $1, $100, $1000, $10000, $100000, $1000000); `totalCount` follows it. A row with a real amount and no USD value is kept whatever the threshold — unpriced is not filtered, and ranks at zero. Omitting `marketIdx` spans every market. `offset` is capped at 1000000 and a request past it is a 400 — narrow with `marketIdx`, `address` or `minAmountUsd`. A market whose asset the API does not know is a 500 for the whole list; name a `marketIdx` to read the others.

## Query parameters

- `chainId` string
- `limit` string — Integer 1-200; outside is a 400, never clamped.
- `offset` string — Integer 0-1000000; outside is a 400, never clamped.
- `marketIdx` string — Integer 0-64; outside is a 400, never clamped.
- `includeLegacy` 'true' | 'false'
- `minAmountUsd` '0.1' | '1' | '100' | '1000' | '10000' | '100000' | '1000000'
- `address` string
- `isDesc` 'true' | 'false'
- `sortBy` 'date' | 'amount' | 'fee'

## Response `200`

Individual cryptopool swaps.

- object
  - `success` true, required
  - `data` object[], required
    - `id` string, required
    - `marketId` string, required
    - `blockNumber` number, required
    - `blockTimestamp` number, required
    - `transactionHash` string, required
    - `logIndex` number, required
    - `poolAddress` string, required
    - `buyer` string, required
    - `soldId` string, required
    - `tokensSold` string, required
    - `boughtId` string, required
    - `tokensBought` string, required
    - `feeRaw` string, required
    - `feeIsCrvUsd` number, required
    - `feeUsdRaw` string, required
    - `volumeUsdRaw` string, required
    - `priceScaleRaw` string, required
    - `assetToken` string, required
    - `assetDecimals` number, required
  - `totalCount` string, required
  - `timestamp` string, required

## Other responses

- `400` — Invalid request
- `500` — Internal error
- `502` — Upstream data/schema error

---

[API](https://skmtc.dev/yieldbasis/apis/yieldbasis-api.md) · [All operations](https://skmtc.dev/yieldbasis/apis/yieldbasis-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/yieldbasis/yieldbasis-api/revisions/b5b24c7435c8/schema)
