---
title: "Per-machine earnings day-series (host owner)"
method: GET
path: "/api/v1/hosts/machines/{id}/earnings"
tags: ["hosts"]
---

# Per-machine earnings day-series (host owner)

`GET /api/v1/hosts/machines/{id}/earnings`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/hosts/machines/{id}/earnings`
- Auth: HTTP bearer

The account-wide `/hosts/earnings` day-series narrowed to one machine and attributed through `jobs.machine_id`, in the identical shape so one chart renders both. Ledger-derived only: every bar links back to `journal_lines` on `host_payable:<id>` for jobs that ran on this machine, and the series reconciles exactly to those rows. `paid_micro` is zero throughout, because payout settlements carry no `job_id` and belong to the account rather than to any one machine — attributing them would double-count a payout across the fleet. A non-owner receives 404, never 403, so machine existence never leaks. A malformed `window` is refused rather than silently defaulted.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `window` string

## Response `200`

Daily earnings bars for this machine, oldest first.

- object
  - `window_days` integer, required
  - `from` string, date-time, required
  - `to` string, date-time, required
  - `days` object[], required
    - `day` string, required: UTC calendar day, YYYY-MM-DD
    - `earned_micro` string, required
    - `fee_micro` string, required
    - `paid_micro` string, required: Unsigned base-10 integer as string; never a float.
    - `rental_count` integer, required

## Other responses

- `default`: Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

---

[API](https://skmtc.dev/amplerun/apis/amplerun-business-api.md) · [All operations](https://skmtc.dev/amplerun/apis/amplerun-business-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amplerun/apis/amplerun-business-api/revisions/40944687fa52?raw)
