JavaScript SDK
The official package @navoswap/sdk ships a small, typed NavoSwapClient that wraps the public JSON API. It targets modern runtimes with fetch (Node 18+, browsers, edge).
Install
npm install @navoswap/sdkConstruction
import { NavoSwapClient } from "@navoswap/sdk";
const client = new NavoSwapClient({
baseUrl: "https://api.navoswap.com/api/v1",
apiKey: process.env.NAVOSWAP_PARTNER_API_KEY, // optional; only sent on createSwapOrder
});Methods (high level)
getHealth():GET /healthestimateUsd(currency_from, amount_from):GET /swap/usdgetSwapPrice(params):GET /swap/quotecreateSwapOrder(body):POST /swap/create(adds API key header if configured)getSwapStatus(order_id):GET /swap/statuslistAssets(): Asset catalog for UI buildersgetPublicAnalytics(): When exposed by the API
Errors throw NavoSwapApiError with HTTP status and parsed body when available.
Types
CreateSwapOrderInput, SwapQuote, SwapOrderInfo, and AssetInfo mirror the wire format documented under Swap REST endpoints.