get_all_in_rate
Compute the all-in ocean freight cost for a specific lane, including base rate and all surcharges.
Instructions
Get the ALL-IN ocean freight cost for a lane — the TRUE landed cost of the move, not just the base spot rate. get_spot_rate returns the index-blended BASE; this returns base + every applicable carrier SURCHARGE & accessorial, which routinely inflates the real cost by +30-60%. Models the opaque thicket importers actually pay: Terminal Handling (origin+destination), BAF/LSS bunker fuel (modeled from a marine-fuel proxy and the corridor's burn), CAF currency adjustment, Peak-Season Surcharge (only inside the seasonal peak window), a damped GRI residual, port Congestion surcharge, ISPS security, Documentation/B-L fee, ECA emissions, War-Risk / Red-Sea–Suez DIVERSION surcharge (only on Suez-exposed Asia↔Europe / Asia↔US-East lanes, higher when Cape-of-Good-Hope diverted), Panama Canal low-water surcharge (only on Panama-routed lanes), optional Overweight, and expected Demurrage & Detention (tiered escalating per-day cost past your free days). The engine knows WHICH route each lane follows (transpacific vs Suez vs Panama vs transatlantic) and applies ONLY the surcharges that actually bite that lane and ship date — and lists the ones it deliberately EXCLUDED and why. Returns the full line-item breakdown, the all-in total, and a base-vs-all-in comparison. Every figure is tagged 'typical' (representative published value) or 'modeled' (estimate) — these are indicative modeling values, not a carrier tariff. PREMIUM: pay per call with x402 (USDC on Base) or set a prepaid key (FREIGHT_PULSE_KEY). Same UN/LOCODE port normalization as get_spot_rate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin_port | Yes | Origin port (city name, UN/LOCODE, or 'City, Country'). Same resolution as get_spot_rate. | |
| dest_port | Yes | Destination port (city name, UN/LOCODE, or 'City, Country'). | |
| container_type | No | Container size: '20ft', '40ft' or '40HC'. Optional; defaults to '40ft'. | |
| ship_date | No | Intended shipment date (ISO 'YYYY-MM-DD'). Drives Peak-Season Surcharge & GRI applicability. Optional; defaults to today. | |
| free_days | No | Carrier free days at destination before Demurrage & Detention accrues (default 5 when an estimated dwell is supplied). | |
| estimated_days_at_port | No | Total days you expect the box to sit at the destination terminal. If it exceeds free_days, the engine adds the expected (tiered, escalating) Demurrage & Detention. Omit to skip D&D. | |
| overweight | No | Flag an overweight load to include the overweight surcharge. Optional; default false. | |
| fuel_proxy | No | Optional live VLSFO marine-fuel price ($/tonne) to drive the BAF model. Omit to use a recent representative level (~$600/t, tagged modeled). |