Skip to content

whooooop/dropstab

Repository files navigation

DropstabAPI

DropstabAPI is a TypeScript library for interacting with the Dropstab API.
It provides a convenient interface for managing portfolios and analyzing on-chain data.


📦 Installation

Once the package is published to npm, you can install it with the following command:

npm install dropstab-api

🚀 Getting Started

Usage Example:

import { DropstabAPI } from 'dropstab-api';

// Initialize the DropstabAPI instance
const api = new DropstabAPI('https://api2.icodrops.com');

(async () => {
  // Log in to the API
  await api.login('your_email@example.com', 'your_password');

  // Retrieve portfolio groups
  const portfolios = await api.portfolioService.getPortfolioGroups();
  console.log('Portfolios:', portfolios);
})();

🛠 Available Methods

📌 Initialization:

const api = new DropstabAPI(baseURL: string);
Parameter Type Description
baseURL string The base URL for Dropstab API

📌 AuthService Methods

🔐 login(email: string, password: string): Promise<void>

Authenticates the user and stores tokens in memory.

Parameter Type Description
email string User's email address
password string User's password

Example:

await api.login('your_email@example.com', 'your_password');

📌 PortfolioService Methods

📂 getPortfolioGroups(): Promise<PortfolioGroup[]>

Retrieves a list of portfolio groups.

Example:

const portfolios = await api.portfolioService.getPortfolioGroups();
console.log(portfolios);

🛡 License

This project is licensed under the MIT License. See the LICENSE.md file for details.

About

Dropstab API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors