Skip to content

scifantastic/deepnets_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deepnets-client

CLI and library for querying the Deepnets.ai Solana token safety API. Fetches fresh holder analysis, surfaces hidden wallet networks, and prints a formatted safety report.

Quick Start

# Install dependencies
npm install

# Copy .env.example to .env and add your API key
cp .env.example .env

# Run a safety check on any Solana token mint
npx tsx src/cli.ts <mint_address>

Get your API key at deepnets.ai/profile.

Example Output

═══════════════════════════════════════════════════
  Token Safety Report: $EXAMPLE
═══════════════════════════════════════════════════

Token         Example Token ($EXAMPLE)
Mint          ExAmPlEmiNtAdDrEsS...
Platform      pump.fun
Created       3/15/2026, 2:30:00 PM

Safety Level  DANGEROUS

── Network Concentration ──
Top network   72.3% held by 145 wallets
Network ID    angry_penguin
              deepnets.ai/network/AbC123...

── Holder Distribution ──
Total holders 1,250
Top holder    8.2%
Top 10        35.1%

── Token Properties ──
Mintable      No
Freezable     No
Mutable meta  Yes

⚠ Critical Risks
  • 72.3% is owned by 145 wallets from the same deep network

Library Usage

import { DeepnetsClient } from 'deepnets-client';

const client = new DeepnetsClient({
  apiKey: 'your_api_key',
});

// Get fresh safety analysis (triggers research + waits)
const safety = await client.getFreshSafety('mint_address_here');
console.log(safety.overallSafetyLevel); // 'OK' | 'RISKY' | 'DANGEROUS'
console.log(safety.topNetworkOwnership); // e.g. 72.3

// Or just check cached data (no research triggered)
const cached = await client.getTokenSafety('mint_address_here');

Real-Time Token Stream

Subscribe to new tokens as they're added to the Deepnets watchlist via WebSocket. Each token comes enriched with holder analysis, safety data, and social research.

Requires Deep Diver tier (150,000 $DNET).

import { DeepnetsClient } from 'deepnets-client';

const client = new DeepnetsClient({ apiKey: 'your_api_key' });

const disconnect = client.streamTokens({
  onTokens: (tokens) => {
    for (const token of tokens) {
      console.log(`${token.symbol}${token.safetyAnalysis?.overallSafetyLevel}`);
      console.log(`  Market cap: $${token.market_cap}`);
      console.log(`  Top network: ${token.holderAnalysis?.topNetworkOwnership}%`);
      console.log(`  Social: ${token.socialResearch?.totalMentions} mentions`);
    }
  },
  onConnected: () => console.log('Streaming!'),
  onError: (err) => console.error('Error:', err),
});

// Later: disconnect()

Stream example (CLI)

# Pretty-printed output
DEEPNETS_API_KEY=xxx npx tsx examples/stream-tokens.ts

# JSON output (one object per line, pipe to jq, etc.)
DEEPNETS_API_KEY=xxx npx tsx examples/stream-tokens.ts --json

Token payload fields

Each NewToken object includes:

Field Description
mint Token mint address
name, symbol Token name and ticker
price, market_cap USD price and market cap at watchlist add time
volume_30m_usd, volume_1h_usd Recent trading volume
holders Number of holders
holderAnalysis Network concentration, risk levels, top holder %, wallet counts
safetyAnalysis Safety level, critical risks, warnings, rugcheck, mint/freeze flags
socialResearch Mentions, views, sentiment, trending potential, entity verification
dexscreenerProfile DexScreener icon, links, CTO status
creator, platform Creator wallet and launch platform

API Reference

  • getTokenSafety(mint) — Fetch cached safety data. Returns null if not yet researched.
  • requestResearch(mint) — Trigger fresh research. Returns requestId.
  • waitForResearch(requestId) — Poll until research completes or times out.
  • getFreshSafety(mint) — All-in-one: request → wait → fetch result.
  • streamTokens(opts) — Subscribe to real-time new token events. Returns a disconnect function.
  • disconnect() — Close the WebSocket connection.

About

CLI and library for querying the Deepnets.ai Solana token safety API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors