NavoSwap
App

JavaScript SDK

We publish @navoswap/sdk with a typed NavoSwapClient around the public API. It uses fetch—Node 18+, browsers, edge workers, whatever already has fetch.

Install

npm install @navoswap/sdk

Construction

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 /health
  • estimateUsd(currency_from, amount_from): GET /swap/usd
  • getSwapPrice(params): GET /swap/quote
  • createSwapOrder(body): POST /swap/create (adds API key header if configured)
  • getSwapStatus(order_id): GET /swap/status
  • listAssets(network?): GET /assets (optional network query)
  • getPublicAnalytics(days?): GET /analytics/public (optional days)

Failed calls raise NavoSwapApiError with status + parsed JSON when we have it.

Types

CreateSwapOrderInput, SwapQuote, SwapOrderInfo, AssetInfo line up with Swap REST.