## Reference: Instruments

Market symbology + instrument cards

**Availability: live** on `https://api.cardog.app`.

### GET /v2/instruments

Symbology search / most-liquid browse *Since 2026-07-30.*

With `q`: typeahead over live instruments. Without: the most-liquid screener rows.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | no | Typeahead query (min 2 chars) |
| `limit` | integer | no | Row cap |

**Response 200** `InstrumentSearch`: Screener rows with quote line + sparkline

- `query`? (string | null)
- `items` (object[])
  - `items[].ref` (string)
  - `items[].label`? (string)
  - `items[].makeName`? (string)
  - `items[].spark`? (number[]): Daily median prices for the trailing 45 days, oldest first. Intended for an inline sparkline.
  - `items[].median30d`? (number | null): Median price 30 days ago. Compare with `median` to get the 30-day change.
  - `items[].count` (integer): Number of live listings for this instrument
  - `items[].best` (number | null): Lowest live asking price
  - `items[].p25` (number | null): 25th percentile of live asking prices
  - `items[].median` (number | null): Median live asking price
  - `items[].p75` (number | null): 75th percentile of live asking prices
  - `items[].avgDom` (number | null): Average days on market across the live listings
  - `items[].cuts30d` (integer | null): Number of price cuts observed in the trailing 30 days
  - `items[].cutPct30d` (number | null): Average price cut as a percentage, trailing 30 days
  - `items[].sightings30d` (integer | null): Number of listing observations in the trailing 30 days
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/instruments?q=cr-v" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const instrumentSearch = await client.v2.instruments.search({ q: "cr-v" });
console.log(instrumentSearch.query);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

instrument_search = client.v2.instruments.search(q="cr-v")
print(instrument_search.query)
```

### GET /v2/instruments/{ref}

The instrument card: quote + history + live sample *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | An instrument ref (model-year: or squish:). Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `window` | "1w" \| "1m" \| "3m" \| "6m" \| "ytd" \| "1y" \| "3y" \| "5y" \| "10y" \| "all" | no | History window |

**Response 200** `InstrumentCard`: Quote + daily bars + bounded live sample

- `instrument` (object)
  - `instrument.ref` (string)
  - `instrument.grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
  - `instrument.label`? (string)
- `quote` (object)
  - `quote.ref` (string): Ref of the instrument (the thing being priced: a model year or a squish), e.g. "model-year:honda/cr-v/2026"
  - `quote.grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
  - `quote.liveCount` (integer): Number of live listings the quote is computed from. Treat it as the sample size.
  - `quote.bestPrice` (number | null): Lowest live asking price
  - `quote.priceP25` (number | null): 25th percentile of live asking prices
  - `quote.priceMedian` (number | null): Median live asking price
  - `quote.priceP75` (number | null): 75th percentile of live asking prices
  - `quote.avgDomDays` (number | null): Average days on market across the live listings
  - `quote.cuts30d` (integer | null): Number of price cuts observed in the trailing 30 days
  - `quote.avgCutPct30d` (number | null): Average price cut as a percentage, trailing 30 days
  - `quote.sightings30d` (integer | null): Number of listing observations in the trailing 30 days
  - `quote.asOf` (string): When the quote was last computed (ISO 8601)
  - `quote.links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `history` (object[])
  - `history[].day` (string): The day this bar covers (ISO date, YYYY-MM-DD)
  - `history[].median` (number | null): Median asking price that day
  - `history[].p25` (number | null): 25th percentile of asking prices that day
  - `history[].p75` (number | null): 75th percentile of asking prices that day
  - `history[].best` (number | null): Lowest asking price that day
  - `history[].count` (integer | null): Number of live listings that day. Set on bars with source "fold".
  - `history[].prints` (integer | null): Number of price observations aggregated into the bar. Set on bars with source "prints".
  - `history[].source` (string): How the bar was built: "fold" (a once-daily snapshot of live listings) or "prints" (built from individual price observations). Other values may be added.
- `listings` (object[]): A capped sample of the current set of live listings for this instrument
  - `listings[].vin` (string)
  - `listings[].price` (number)
  - `listings[].odometer` (number | null)
  - `listings[].domain` (string | null)
  - `listings[].listedAt` (string): Listing date (ISO 8601)
  - `listings[].score` (number | null)
  - `listings[].sourceUri` (string | null)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/instruments/model-year:honda%2Fcr-v%2F2026?window=1y" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const instrumentCard = await client.v2.instruments.getByRef("model-year:honda/cr-v/2026", { window: "1y" });
console.log(instrumentCard.instrument);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

instrument_card = client.v2.instruments.get_by_ref("model-year:honda/cr-v/2026", window="1y")
print(instrument_card.instrument)
```

### GET /v2/instruments/{ref}/mileage

Price against odometer, projected to one car *Since 2026-11-22.*

Fits asking price on odometer across the instrument's live listings (Theil–Sen: the median pairwise slope, robust to mispriced listings) and projects the band to `km`: the fit there plus the quartiles of its residuals. Outside the sample's odometer range the projection is clamped and flagged `extrapolated`. With `lat`/`lng`, the local market around that point: rings from `radiusKm` widened until `minLocal` listings are inside, then the `province`, each price moved to `km` along the fit. `exclude` takes one VIN out of every statistic. Live retail asking prices only, never sales.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year or squish instrument ref. Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `km` | integer | yes | The odometer to project to, kilometres |
| `exclude` | string | no | A VIN to leave out of every statistic |
| `lat` | number | no | Latitude of the local read's centre |
| `lng` | number | no | Longitude of the local read's centre |
| `province` | string | no | Two-letter province of that point: the widest ring, and the province index |
| `radiusKm` | integer | no | The first local radius, kilometres |
| `minLocal` | integer | no | Listings a local read needs |

**Response 200** `InstrumentMileage`: The fit, the projected band, the local read and the sparkline points

- `instrument` (object)
  - `instrument.ref` (string)
  - `instrument.grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
- `basis` ("asking"): Always live retail asking prices
- `asOf` (string): When the live sample was read (ISO 8601)
- `subject` (object)
  - `subject.km` (integer)
  - `subject.excluded` (boolean): True when the `exclude` VIN was in the sample and was taken out
- `sample` (object)
  - `sample.n` (integer): Live listings read, after the erroneous-price floor and the exclusion
  - `sample.withOdometer` (integer): Of those, listings with a stated odometer of at least 1,000 km (the fit's points)
  - `sample.kmMin` (number | null)
  - `sample.kmMax` (number | null)
  - `sample.medianDaysListed` (number | null): Median days since the sample's listings first appeared
  - `sample.cutShare30d` (number | null): Share of the sample (0..1) whose price was cut in the trailing 30 days
  - `sample.avgCutPct30d` (number | null): Average size of those cuts, percent
- `national` (object): The sample's asking-price quartiles at every odometer, unadjusted
  - `national.n` (integer)
  - `national.p25` (number | null)
  - `national.median` (number | null)
  - `national.p75` (number | null)
- `fit` (object)
  - `fit.status` ("ok" | "thin" | "no_spread" | "no_slope"): `ok`: a usable fit. `thin`: too few listings with an odometer. `no_spread`: the odometers sit too close together to measure a slope. `no_slope`: price does not fall with distance in this sample (a trim or condition mix outweighs it), so no slope is served.
  - `fit.method` ("theil-sen")
  - `fit.n` (integer)
  - `fit.slopePer1000Km` (number | null): Change in asking price per 1,000 km, dollars (negative: price falls with distance)
  - `fit.intercept` (number | null): The fit's asking price at 0 km, dollars
  - `fit.r2` (number | null): Share of the price variance the fit explains (0..1)
  - `fit.madPct` (number | null): Median absolute residual as a percent of the median price
  - `fit.kmMin` (number | null)
  - `fit.kmMax` (number | null)
- `projected` (object | null): The band at the asked odometer; null unless the fit is `ok`
  - `projected.km` (integer): The odometer asked for
  - `projected.atKm` (integer): The odometer the band was projected to: `km`, clamped into the sample's range
  - `projected.extrapolated` (boolean): True when `km` was outside the sample's range and was clamped
  - `projected.p25` (number)
  - `projected.median` (number)
  - `projected.p75` (number)
- `local` (object | null): The local market around `lat`,`lng`; null without a point
  - `local.status` ("ok" | "thin")
  - `local.radiusKm` (integer | null): The ring that reached `minLocal`; null when the read fell back to the province
  - `local.province` (string | null)
  - `local.mileageAdjusted` (boolean): True when each local price was moved to `km` along the fit before the quartiles
  - `local.steps` (object[]): Each ring tried, innermost first; `null` is the province
    - `local.steps[].radiusKm` (integer | null)
    - `local.steps[].n` (integer)
  - `local.n` (integer)
  - `local.p25` (number | null)
  - `local.median` (number | null)
  - `local.p75` (number | null)
- `province` (object | null)
  - `province.code` (string)
  - `province.n` (integer)
  - `province.median` (number | null)
  - `province.index` (number | null): This instrument's median in the province over its national median, both at `km` when the fit is `ok`
- `trims` (object[]): Trims as listed in the sample, most common first
  - `trims[].trim` (string)
  - `trims[].n` (integer)
  - `trims[].median` (number | null): Median asking price of the trim, moved to `km` along the fit when it is `ok`
- `points` (object[]): Up to 80 of the fit's points, for a sparkline
  - `points[].km` (number)
  - `points[].price` (number)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/instruments/model-year:honda%2Fcr-v%2F2026/mileage?km=%7Bkm%7D" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const instrumentMileage = await client.v2.instruments.mileage("model-year:honda/cr-v/2026", { km: "{km}" });
console.log(instrumentMileage.instrument);
```

**Example: Python** (`pip install cardog`)

```python
# The Python SDK does not carry this operation yet.
# Call GET /v2/instruments/{ref}/mileage with an org session token
# in the X-Cardog-Agent-Grant header (see the curl sample).
```

---

Previous: [Listings](https://cardog.app/docs/reference/listings.md) (API reference)
Next: [Quotes](https://cardog.app/docs/reference/quotes.md) (API reference)
