DropstabAPI is a TypeScript library for interacting with the Dropstab API.
It provides a convenient interface for managing portfolios and analyzing on-chain data.
Once the package is published to npm, you can install it with the following command:
npm install dropstab-apiimport { 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);
})();const api = new DropstabAPI(baseURL: string);| Parameter | Type | Description |
|---|---|---|
baseURL |
string | The base URL for Dropstab API |
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');Retrieves a list of portfolio groups.
Example:
const portfolios = await api.portfolioService.getPortfolioGroups();
console.log(portfolios);This project is licensed under the MIT License. See the LICENSE.md file for details.