# RTD Pt100 Sensor API
> RTD (resistance-temperature-detector) sensor maths as an API, computed locally and deterministically with the IEC 60751 Callendar–Van Dusen equation — the resistance, temperature and tolerance numbers an instrumentation or controls engineer reads a Pt100 or Pt1000 with. The resistance endpoint gives the sensor resistance from temperature: above 0 °C, R = R₀·(1 + A·T + B·T²) with A = 3.9083×10⁻³ and B = −5.775×10⁻⁷; below 0 °C a third term adds C·(T−100)·T³ — a standard Pt100 (100 Ω at 0 °C) reads 138.51 Ω at 100 °C and 80.31 Ω at −50 °C, and a Pt1000 is ten times that. The temperature endpoint inverts it to turn a measured resistance back into temperature — analytically above 0 °C, iteratively below — exactly what a transmitter does with the bridge reading, and a reminder that a 3- or 4-wire connection cancels the lead-wire resistance so it does not read as extra degrees. The tolerance endpoint gives the IEC 60751 accuracy band in both °C and Ω by class — AA ±(0.10 + 0.0017·|T|), A ±(0.15 + 0.002·|T|), B ±(0.30 + 0.005·|T|), C ±(0.60 + 0.010·|T|) — the error growing with distance from 0 °C. Everything is computed locally and deterministically, so it is instant and private. Ideal for instrumentation and controls software, data-logger and transmitter firmware, calibration and industrial-IoT tools. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For NTC thermistors use a thermistor API; for thermocouples a thermocouple API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/rtd-api/..."
```

## Pricing
- **Free** (Free) — 6,050 calls/Mo, 2 req/s
- **Starter** ($11/Mo) — 61,500 calls/Mo, 6 req/s
- **Pro** ($35/Mo) — 253,000 calls/Mo, 15 req/s
- **Mega** ($107/Mo) — 1,255,000 calls/Mo, 40 req/s

## Endpoints

### RTD

#### `GET /v1/resistance` — Resistance from temperature

**Parameters:**
- `temp_c` (query, required, string) — Temperature (°C) Example: `100`
- `r0_ohm` (query, optional, string) — Resistance at 0 °C (Ω, default 100) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rtd-api/v1/resistance?temp_c=100&r0_ohm=100"
```

**Response:**
```json
{
    "data": {
        "note": "An RTD's resistance follows the IEC 60751 Callendar–Van Dusen equation: above 0 °C, R = R₀·(1 + A·T + B·T²) with A = 3.9083×10⁻³ and B = −5.775×10⁻⁷; below 0 °C a third term adds C·(T−100)·T³. A standard Pt100 (R₀ = 100 Ω at 0 °C) reads 138.51 Ω at 100 °C; a Pt1000 is ten times that. The platinum's near-linear, repeatable response is why RTDs beat thermistors for accuracy over a wide range.",
        "inputs": {
            "r0_ohm": 100,
            "temp_c": 100
        },
        "ratio_r_r0": 1.385055,
        "resistance_ohm": 138.5055
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.508Z",
        "request_id": "492af0be-466b-4a8b-aeae-d75a81c03b8e"
    },
    "status": "ok",
    "message": "Resistance",
    "success": true
}
```

#### `GET /v1/temperature` — Temperature from resistance

**Parameters:**
- `resistance_ohm` (query, required, string) — Measured resistance (Ω) Example: `138.5055`
- `r0_ohm` (query, optional, string) — Resistance at 0 °C (Ω, default 100) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rtd-api/v1/temperature?resistance_ohm=138.5055&r0_ohm=100"
```

**Response:**
```json
{
    "data": {
        "note": "Going from a measured resistance back to temperature inverts the Callendar–Van Dusen equation: above 0 °C it solves analytically as T = (−A + √(A² − 4B(1 − R/R₀))) ÷ 2B; below 0 °C the cubic term forces an iterative solution. This is exactly what a transmitter or data logger does with the bridge reading — mind the lead-wire resistance, which a 3- or 4-wire connection cancels out so it does not read as extra temperature.",
        "inputs": {
            "r0_ohm": 100,
            "resistance_ohm": 138.5055
        },
        "temp_c": 100
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.621Z",
        "request_id": "a611806c-8cb9-4dbf-90b5-18a6a218b158"
    },
    "status": "ok",
    "message": "Temperature",
    "success": true
}
```

#### `GET /v1/tolerance` — Tolerance band by accuracy class

**Parameters:**
- `temp_c` (query, required, string) — Temperature (°C) Example: `100`
- `accuracy_class` (query, optional, string) — Class AA/A/B/C (default B) Example: `B`
- `r0_ohm` (query, optional, string) — Resistance at 0 °C (Ω, default 100) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rtd-api/v1/tolerance?temp_c=100&accuracy_class=B&r0_ohm=100"
```

**Response:**
```json
{
    "data": {
        "note": "IEC 60751 grades RTD accuracy by class: AA ±(0.10 + 0.0017·|T|), A ±(0.15 + 0.002·|T|), B ±(0.30 + 0.005·|T|), C ±(0.60 + 0.010·|T|) in °C — the error grows with distance from 0 °C. Class B is the everyday industrial grade; AA/A for precision work. Self-heating from the measuring current and lead resistance add to this on top, so keep the excitation low and use a 3/4-wire hookup.",
        "inputs": {
            "r0_ohm": 100,
            "temp_c": 100,
            "accuracy_class": "B"
        },
        "tolerance_c": 0.8,
        "tolerance_ohm": 0.3034
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.701Z",
        "request_id": "374fcaa3-710d-420f-b04d-7eed21a448bc"
    },
    "status": "ok",
    "message": "Tolerance",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rtd-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "Ohms, °C. IEC 60751 Pt (α=0.00385): R = R₀(1+A·T+B·T²) [+C·(T−100)·T³ below 0]; A=3.9083e-3, B=−5.775e-7, C=−4.183e-12. Pt100 R₀=100 Ω, Pt1000 R₀=1000 Ω. For NTC thermistors use a thermistor API; for thermocouples a thermocouple API.",
        "service": "rtd-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/tolerance": "Tolerance ±°C and ±Ω by accuracy class.",
            "GET /v1/resistance": "Resistance from temperature (Callendar–Van Dusen).",
            "GET /v1/temperature": "Temperature from a measured resistance."
        },
        "description": "RTD (Pt100/Pt1000) sensor maths: resistance↔temperature via Callendar–Van Dusen, and IEC 60751 tolerance bands."
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.782Z",
        "request_id": "9da2281c-b5f8-4468-a32e-29c37506fff3"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/rtd-api
OpenAPI spec: https://www.oanor.com/api/rtd-api/openapi.json
