Install @ensofinance/sdk and create an EnsoClient with your API key. The SDK wraps Route, Bundle, protocol data, approvals, and balances. Install from the current docs page so the package name and methods stay accurate.
Definition
The Enso SDK is a JavaScript library for calling the Enso API from an application, instead of writing every HTTP request by hand.
How it works
Install with your package manager, for example
npm install @ensofinance/sdk(yarn, pnpm, and bun are also documented).Construct
new EnsoClient({ apiKey: "YOUR_API_KEY" }).Call methods such as
getRouteDataandgetBundleDatawith the same concepts as the REST API:fromAddress,tokenIn,tokenOut,amountIn,slippage, androutingStrategy.Submit the returned
txwith your wallet library. Use string amounts, and handleEnsoApiErrorwhen a call fails.
How Enso does this
The SDK page documents installation, EnsoClient, routing strategies, and core methods. The public package name is @ensofinance/sdk. This article does not pin a version number; use the version you install from the current page. For HTTP-only testing, you can still call https://api.enso.build with curl.
FAQ
Does the SDK replace an API key?
No. You still create a key in the Developer Portal and pass it into EnsoClient.
Are legacy routing strategies for new apps?
The SDK lists legacy strategy values, but Routing Strategies says they should not be selected for new implementations. Use router, delegate, or ensowallet-v2.
Related articles
How do I call the Route API with curl?
How do I authenticate Enso API requests?
How do I get an Enso API key?
What is a routing strategy?
How do I bundle multiple DeFi actions into one transaction?
