Skip to content

step-finance/step-api-sdk

Repository files navigation

Step API SDK

This SDK provides a simple and efficient way to interact with the Step API.

Installation

Install the SDK using pnpm:

npm install @stepfinance/step-api-sdk

Usage

Initialize the Client

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);

Fetch Portfolio Data

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);
  }
})();

API Reference

See the API Reference for more information.

Testing

Run the tests to ensure the SDK works as expected:

pnpm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published