# Boat Anchoring API
> Boat-anchoring maths as an API, computed locally and deterministically — the scope, swing and load numbers a sailor or boater sets the hook by. The scope endpoint gives the rode to let out: scope = rode ÷ the vertical from the seabed to the bow roller (water depth + bow height), measured at high tide, so anchoring in 20 feet with a 4-foot bow at the classic 7:1 means paying out 168 feet of rode — let out more in a blow, and never less than 5:1 on all chain. The swing endpoint gives the circle the boat swings on: radius = the horizontal reach of the rode (√(rode² − vertical²)) plus the boat length, so that 168-foot rode on a 30-foot boat sweeps a 196-foot radius — the room you must leave every other boat, which swings too. The load endpoint gives the wind load the ground tackle has to hold, 0.00256 × drag coefficient × frontal windage area × wind speed², which quadruples every time the wind doubles — 50 square feet of windage takes 138 lb at 30 mph but 553 lb at 60. Everything is computed locally and deterministically, so it is instant and private. Ideal for sailing and boating apps, anchoring and cruising tools, ground-tackle sizing calculators, and seamanship study aids. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Estimates — add current, waves and a safety margin.

## 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/anchor-api/..."
```

## Pricing
- **Free** (Free) — 520 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 13,800 calls/Mo, 6 req/s
- **Pro** ($17/Mo) — 86,000 calls/Mo, 15 req/s
- **Mega** ($49/Mo) — 270,000 calls/Mo, 36 req/s

## Endpoints

### Anchor

#### `GET /v1/load` — Wind load on the boat

**Parameters:**
- `frontal_area_sqft` (query, required, string) — Frontal windage area in sq ft Example: `50`
- `wind_speed_mph` (query, required, string) — Wind speed in mph Example: `30`
- `drag_coefficient` (query, optional, string) — Drag coefficient (default 1.2) Example: `1.2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/anchor-api/v1/load?frontal_area_sqft=50&wind_speed_mph=30&drag_coefficient=1.2"
```

#### `GET /v1/scope` — Rode to deploy for a scope ratio

**Parameters:**
- `depth_ft` (query, required, string) — Water depth in feet (at high tide) Example: `20`
- `bow_height_ft` (query, optional, string) — Bow-roller height above water (default 4) Example: `4`
- `scope_ratio` (query, optional, string) — Scope ratio (default 7) Example: `7`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/anchor-api/v1/scope?depth_ft=20&bow_height_ft=4&scope_ratio=7"
```

#### `GET /v1/swing` — Swing circle around the anchor

**Parameters:**
- `rode_ft` (query, required, string) — Rode deployed in feet Example: `168`
- `depth_ft` (query, required, string) — Water depth in feet Example: `20`
- `bow_height_ft` (query, optional, string) — Bow height above water (default 4) Example: `4`
- `boat_length_ft` (query, required, string) — Boat length in feet Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/anchor-api/v1/swing?rode_ft=168&depth_ft=20&bow_height_ft=4&boat_length_ft=30"
```

### Meta

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

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


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