---
title: "Get metrics"
method: GET
path: "/bus/metric/{key}"
tags: ["bus"]
---

# Get metrics

`GET /bus/metric/{key}`

Returns the metrics for the specified key

## Path parameters

- `key` 'contract' | 'contractprune' | 'performance' | 'wallet', required

## Query parameters

- `start` string, date-time, required
- `n` integer, required
- `interval` integer, required — Interval duration in milliseconds
- `contractid` string — A unique identifier for a file contract
- `hostkey` string — A ed25519 public key
- `hostversion` string

## Response `200`

Successfully retrieved metrics

- union[]
  - union
    - ContractMetric
      - `timestamp` string, date-time
      - `contractID` string — A unique identifier for a file contract
      - `hostKey` string — A ed25519 public key
      - `remainingCollateral` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `remainingFunds` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `revisionNumber` integer — The revision number of the contract
      - `deleteSpending` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `fundAccountSpending` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `sectorRootsSpending` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `uploadSpending` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
    - ContractPruneMetric
      - `timestamp` string, date-time
      - `contractID` string — A unique identifier for a file contract
      - `hostKey` string — A ed25519 public key
      - `hostVersion` string
      - `pruned` integer
      - `remaining` integer
      - `duration` integer — Duration in nanoseconds
    - WalletMetric
      - `timestamp` string, date-time
      - `confirmed` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `spendable` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `unconfirmed` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).
      - `immature` string — An unsigned amount of Hastings, the smallest unit of currency in Sia. 1 Siacoin (SC) equals 10^24 Hastings (H).

## Other responses

- `400` — Invalid parameters
- `500` — Internal server error

---

[API](https://skmtc.net/siafoundation/apis/renterd-api.md) · [All operations](https://skmtc.net/siafoundation/apis/renterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/siafoundation/renterd-api/versions/184a3d5207da/schema)
