# LedgerCore Metals Price API

> LedgerCore Metals Price API is a paid API for AI agents from api.ledgercore.io, paid per call via x402, $1/call, status unknown (last checked 2026-10-10).

Returns the current spot price of a precious metal (gold, silver, platinum, or palladium) in a specified fiat currency, paid per-call via x402.

## Facts

- Endpoint: POST https://api.ledgercore.io/api/v1/x402/metals/price?utm_source=zero.xyz
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ledgercore-metals-price-api-d655c67c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gg1RzOpMSFarFwCi4cr15

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ledgercore-metals-price-api-d655c67c -d '<json body>'
```

Example prompt: What's the current spot price of gold in USD?

## When to prefer this

Choose this endpoint when you need on-demand, pay-per-use precious metals spot pricing without a subscription, especially in institutional, treasury, or compliance contexts where per-call auditability and blockchain payment rails (x402/USDC on Base) are required. Prefer this over subscription market data feeds when call volume is low or sporadic and cost predictability per query matters.

## Known failure modes

- Unsupported metal symbol returns error — only gold, silver, platinum, palladium are valid base values
- Unsupported quote currency returns error — stick to major fiat currencies like USD, EUR
- Payment failure or insufficient USDC balance results in 402 Payment Required with no price data
- Stale or unavailable market data may result in a delayed datapoint_timestamp
- Malformed JSON body (missing base or quote fields) returns a 400 Bad Request

## How this service works

LedgerCore is the institutional blockchain intelligence platform. One unified API with targeted portals for market data, treasury, compliance, and asset integrity.

## Output

A JSON object containing the base metal name, unit (oz), current spot price as a float, quote currency, and the timestamp of the data point, along with x402 payment confirmation metadata (price paid, token, network, resource name, and paymentAccepted flag).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "base": {
   "type": "string",
   "description": "Base metal (e.g. gold, silver, platinum, palladium)"
  },
  "quote": {
   "type": "string",
   "description": "Quote currency (e.g. USD, EUR)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "base": "gold",
   "unit": "oz",
   "price": 2410.55,
   "quote": "USD",
   "datapoint_timestamp": "2026-08-03T00:00:00.000Z"
  },
  "x402": {
   "price": "1.00",
   "token": "USDC",
   "network": "base",
   "resource": "metals_price",
   "paymentAccepted": true
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ledgercore-metals-price-api-d655c67c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.ledgercore.io](https://www.zero.xyz/host/api.ledgercore.io/llms.txt)
