Skip to content

TypeScript SDK for the Ramaris REST API — on-chain wallet analytics on Base

License

Notifications You must be signed in to change notification settings

ramaris-app/sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ramaris/sdk

TypeScript SDK for the Ramaris REST API. Query on-chain wallet analytics, trading strategies, and performance data on Base.

Install

npm install @ramaris/sdk

Quick Start

import { RamarisClient } from '@ramaris/sdk';

const client = new RamarisClient({
  apiKey: 'rms_your_api_key',
});

// List top strategies
const strategies = await client.strategies.list({ pageSize: 10 });
console.log(strategies.data);

// Get strategy details
const strategy = await client.strategies.get('abc123def');
console.log(strategy.name, strategy.roiPercent);

Get an API Key

  1. Sign up at ramaris.app
  2. Go to API Access
  3. Create a new API key

Free tier gets 1 API key with strategies:read scope (100 req/hr). Upgrade to PRO for wallet data and higher limits.

API Coverage

Strategies (FREE tier)

client.strategies.list({ page, pageSize })   // List strategies
client.strategies.get(shareId)                // Strategy details
client.strategies.watchlist({ page, pageSize }) // Your followed strategies

Wallets (PRO+)

client.wallets.list({ page, pageSize })       // List wallets
client.wallets.get(id)                        // Wallet details

User (PRO+)

client.me.profile()                           // Your profile
client.me.subscription()                      // Your subscription

Health

client.health()                               // API health check

Rate Limits

Tier Requests/Hour Scopes
FREE 100 strategies:read
PRO 1,000 strategies:read, wallets:read
ULTRA 10,000 strategies:read, wallets:read
ENTERPRISE 100,000 strategies:read, wallets:read

Rate limit info is available after any request:

await client.strategies.list();
console.log(client.rateLimit);
// { limit: 100, remaining: 99, reset: 1707667200 }

Error Handling

import { RamarisError, RateLimitError } from '@ramaris/sdk';

try {
  await client.wallets.list();
} catch (err) {
  if (err instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${err.retryAfter}s`);
  } else if (err instanceof RamarisError) {
    console.log(err.code, err.message); // e.g. "INSUFFICIENT_SCOPE"
  }
}

Configuration

const client = new RamarisClient({
  apiKey: 'rms_...',          // Required
  baseUrl: 'https://...',     // Optional, defaults to https://www.ramaris.app/api/v1
});

Links

License

MIT

About

TypeScript SDK for the Ramaris REST API — on-chain wallet analytics on Base

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors