This SDK provides a simple and efficient way to interact with the Step API.
Install the SDK using pnpm:
npm install @stepfinance/step-api-sdk
To start using the SDK, initialize the StepAPIClient
with your API key:
import { StepAPIClient } from ‘@stepfinance/step-api-sdk’
const API_KEY = "<your-key-here>";
// Insert an API key generated from your dashboard
const client = new StepAPIClient(API_KEY);
Retrieve portfolio data for a specific wallet address:
(async () => {
try {
const data = await client.getPortfolioData(address, {
modules: "token,nft,liquidity",
});
console.log("Positions:", data);
} catch (error) {
console.error("Error fetching positions:", error);
}
})();
See the API Reference for more information.
Run the tests to ensure the SDK works as expected:
pnpm test