# Sailing & Hull Design API
> Sailing and naval-architecture maths as an API, computed locally and deterministically — the hull-speed and design-ratio numbers a sailor, boat-shopper or yacht designer sizes a boat with. The hullspeed endpoint gives the theoretical displacement speed limit from the waterline: hull speed = 1.34 × √LWL (feet) in knots, so a 25-foot waterline tops out around 6.7 knots (7.7 mph, 12.4 km/h) — with a tunable coefficient up to about 1.5 for light, easily-driven hulls, since planing boats leave the formula behind entirely. The ratios endpoint computes the two classic performance numbers: the Sail Area/Displacement ratio, SA/D = sail area ÷ (displaced volume in ft³)^⅔ using displaced volume = displacement ÷ 64 lb/ft³ for seawater — around 16–18 is a typical cruiser and 20-plus is sporty — and the Displacement/Length ratio, DLR = (displacement in long tons) ÷ (0.01 × LWL)³, where under 200 is light and over 300 is heavy, each returned with a class label. The ballast endpoint gives the ballast ratio = ballast ÷ displacement × 100, a rough proxy for stiffness and sail-carrying power that most cruisers hit near 35–45 %. Everything is computed locally and deterministically, so it is instant and private. Ideal for sailing, boating, marine, yacht-brokerage and boat-design app developers, boat-comparison and rig-sizing tools, and naval-architecture calculators. Pure local computation — no key, no third-party service, instant. Imperial units. Live, nothing stored. 3 compute endpoints. Design-ratio estimates, not a velocity prediction program.

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

## Pricing
- **Free** (Free) — 6,950 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 53,500 calls/Mo, 6 req/s
- **Pro** ($12/Mo) — 222,000 calls/Mo, 15 req/s
- **Mega** ($38/Mo) — 1,315,000 calls/Mo, 40 req/s

## Endpoints

### Sailing

#### `GET /v1/ballast` — Ballast ratio

**Parameters:**
- `ballast_lb` (query, required, string) — Ballast weight (lb) Example: `4000`
- `displacement_lb` (query, required, string) — Displacement (lb) Example: `10000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sailing-api/v1/ballast?ballast_lb=4000&displacement_lb=10000"
```

**Response:**
```json
{
    "data": {
        "band": "high (stiff / offshore)",
        "note": "Ballast ratio = ballast ÷ displacement × 100, a rough proxy for stiffness (sail-carrying power). Most cruisers sit near 35–45 %; it ignores keel depth and hull form, which also drive stability.",
        "inputs": {
            "ballast_lb": 4000,
            "displacement_lb": 10000
        },
        "ballast_ratio_percent": 40
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:04.523Z",
        "request_id": "3700ea0a-c5af-4f6f-937c-df03f776d7fa"
    },
    "status": "ok",
    "message": "Ballast ratio",
    "success": true
}
```

#### `GET /v1/hullspeed` — Theoretical hull speed

**Parameters:**
- `lwl_ft` (query, required, string) — Load waterline length (ft) Example: `25`
- `coefficient` (query, optional, string) — Speed coefficient (default 1.34) Example: `1.34`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sailing-api/v1/hullspeed?lwl_ft=25&coefficient=1.34"
```

**Response:**
```json
{
    "data": {
        "note": "Hull speed = coefficient × √LWL (feet), in knots. 1.34 is the classic displacement limit; light, easily-driven hulls reach ~1.4–1.5. Planing boats exceed it entirely. A 25 ft waterline gives about 6.7 knots.",
        "inputs": {
            "lwl_ft": 25,
            "coefficient": 1.34
        },
        "hull_speed_kmh": 12.41,
        "hull_speed_mph": 7.71,
        "hull_speed_knots": 6.7
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:04.611Z",
        "request_id": "50b6e1e0-a985-413f-862d-8cbbde56b678"
    },
    "status": "ok",
    "message": "Hull speed",
    "success": true
}
```

#### `GET /v1/ratios` — SA/D and DLR ratios

**Parameters:**
- `sail_area_sqft` (query, required, string) — Sail area (ft²) Example: `400`
- `displacement_lb` (query, required, string) — Displacement (lb) Example: `10000`
- `lwl_ft` (query, required, string) — Load waterline length (ft) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sailing-api/v1/ratios?sail_area_sqft=400&displacement_lb=10000&lwl_ft=25"
```

**Response:**
```json
{
    "data": {
        "note": "SA/D = sail area ÷ (displaced volume in ft³)^(2/3); ~16–18 is a typical cruiser, 20+ is sporty. DLR = (displacement in long tons) ÷ (0.01 × LWL)³; under 200 is light, over 300 heavy.",
        "inputs": {
            "lwl_ft": 25,
            "sail_area_sqft": 400,
            "displacement_lb": 10000
        },
        "dlr_class": "moderate",
        "sad_class": "cruiser",
        "displaced_volume_cuft": 156.25,
        "displacement_length_ratio": 285.7,
        "sail_area_displacement_ratio": 13.79
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:04.703Z",
        "request_id": "4db20b9e-a972-4c27-a7ed-5950f19d0d59"
    },
    "status": "ok",
    "message": "Design ratios",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Imperial units (feet, pounds, ft²). Hull speed = 1.34 × √LWL knots. SA/D uses displaced volume = displacement ÷ 64 lb/ft³ (seawater). DLR uses long tons. These are design-ratio estimates, not a VPP. For weather routing use a different API.",
        "service": "sailing-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/ratios": "SA/D and DLR performance ratios from sail area, displacement and LWL.",
            "GET /v1/ballast": "Ballast ratio from ballast and displacement weights.",
            "GET /v1/hullspeed": "Theoretical displacement hull speed from waterline length."
        },
        "description": "Sailing / naval-architecture maths: hull speed, sail-area/displacement & displacement/length ratios, and ballast ratio."
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:04.787Z",
        "request_id": "fdd50eb6-d707-41cd-aecd-ec90189471ea"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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