getProfile()
Get the authenticated user’s profile, including wallet info, 30-day rolling trade volume, and current fee tier.
getProfile(): Promise<ProfileResult>Parameters
Section titled “Parameters”This method takes no parameters. Authentication is handled via the API key provided when constructing the SDK.
Return Value
Section titled “Return Value”Returns a ProfileResult object with wallet info, volume, and fee tier details.
{ walletAddress: string; // Registered wallet address createdAt: string; // Account creation timestamp (ISO 8601) volume: { sol30d: number; // Total SOL traded in the last 30 days trades30d: number; // Number of confirmed trades in the last 30 days }; fee: { bps: number; // Current platform fee in basis points (50 = 0.5%) decimal: number; // Current platform fee as a decimal (0.005 = 0.5%) nextBps: number; // Fee at the next volume tier (null if at top tier) nextThresholdSol: number; // SOL volume needed for next tier (null if at top tier) };}Example
Section titled “Example”import { DarkfibreSDK } from '@darkfibre/sdk';
const sdk = new DarkfibreSDK({ apiKey: 'your-api-key', privateKey: 'your-base58-private-key',});
const profile = await sdk.getProfile();
console.log('Wallet:', profile.walletAddress);console.log('30d volume:', profile.volume.sol30d, 'SOL');console.log('Total trades:', profile.volume.trades30d);console.log('Current fee:', profile.fee.bps, 'bps');Fee Tiers
Section titled “Fee Tiers”Fee tiers are recomputed every night at 00:00 UTC and applied to your profile automatically.
| 30d Volume | Fee |
|---|---|
| < 1,000 SOL | 0.50% (50 bps) |
| ≥ 1,000 SOL | 0.45% (45 bps) |
| ≥ 10,000 SOL | 0.35% (35 bps) |
| ≥ 50,000 SOL | 0.25% (25 bps) |
| ≥ 100,000 SOL | 0.20% (20 bps) |
| ≥ 250,000 SOL | Custom |
See Pricing for full details.
- Rate limit: 30 requests per minute per API key.
- Rolling window:
volume.sol30dandvolume.trades30dreflect the last 30 days, not a calendar month. Fee tiers update nightly. - Top tier: When
fee.nextBpsandfee.nextThresholdSolare bothnull, you are already on the highest volume tier.
Related
Section titled “Related”- GET /v1/auth/profile - Underlying API endpoint reference
- buy() - Buy tokens using SOL
- sell() - Sell tokens for SOL
- swap() - Generic swap endpoint