Official SURCHI SDKs abstract the authentication, token refresh, WebSocket management, and request retry logic described elsewhere in this documentation into idiomatic client libraries — so you can focus on building features rather than API plumbing. SDKs are designed to mirror the REST API surface closely, making it easy to switch between direct HTTP calls and the SDK without changing your mental model.
Official SDKs are currently in development and will be released alongside the API Alpha in Phase 2. The interfaces shown below reflect the planned public API and may change before the stable release. Join the developer waitlist at surchi.io/developers for early access to SDK beta builds and release notifications.
JavaScript / TypeScript SDK (Coming Soon)
The official JavaScript and TypeScript SDK supports both Node.js (v18+) and browser environments, with full TypeScript typings included.
Installation
Initialization
import { SurchiClient } from '@surchi/sdk';
const client = new SurchiClient({
apiKey: process.env.SURCHI_API_KEY,
});
The client handles token exchange and automatic refresh internally — you provide your API key once and the SDK manages the Bearer token lifecycle.
Fetching Intelligence Signals
// Fetch latest signals filtered by asset and confidence
const signals = await client.intelligence.getSignals({
asset: 'SOL',
minConfidence: 0.8,
});
console.log(signals);
Subscribing to the Live Signal Stream
// Subscribe to a real-time signal stream
const stream = client.intelligence.stream({
assets: ['SOL', 'JTO'],
minConfidence: 0.75,
onSignal: (signal) => {
console.log('New signal:', signal);
},
onError: (err) => {
console.error('Stream error:', err);
},
});
// Stop the stream when done
stream.close();
Querying Market Data
// Fetch real-time market data
const data = await client.market.getData({
asset: 'SOL',
include: ['price', 'volume', 'liquidity'],
});
console.log(`SOL price: $${data.priceUsd}`);
Wallet Portfolio
// Query a wallet portfolio
const portfolio = await client.wallet.getPortfolio({
address: '7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU',
});
console.log(`Total value: $${portfolio.totalValueUsd}`);
Python SDK (Coming Soon)
The official Python SDK targets Python 3.10+ with async support via asyncio and synchronous wrappers for simpler scripts.
Installation
Initialization and Usage
import os
from surchi import SurchiClient
client = SurchiClient(api_key=os.environ['SURCHI_API_KEY'])
# Fetch market data
data = client.market.get_data(asset='SOL', include=['price', 'volume'])
print(f"SOL price: ${data['price_usd']}")
# Fetch intelligence signals
signals = client.intelligence.get_signals(asset='SOL', min_confidence=0.8)
for signal in signals:
print(f"[{signal['confidence']:.0%}] {signal['summary']}")
Async Usage
import asyncio
import os
from surchi import AsyncSurchiClient
async def main():
client = AsyncSurchiClient(api_key=os.environ['SURCHI_API_KEY'])
# Concurrent requests
signals, market_data = await asyncio.gather(
client.intelligence.get_signals(asset='SOL'),
client.market.get_data(asset='SOL'),
)
print(signals, market_data)
asyncio.run(main())
The SURCHI developer community is encouraged to build and publish SDK wrappers in other languages — Rust, Go, Ruby, and more. Community-maintained libraries will be listed in the SURCHI GitHub organization once they meet basic quality and maintenance standards.
If you’ve built a SURCHI client library, open an issue or pull request in the community SDKs repository to get it listed here.
Until official SDKs launch, use the REST API directly — it’s straightforward. All endpoints follow standard REST conventions, return JSON, and use the same Bearer token authentication. The code examples throughout this documentation are written as plain curl and fetch calls that work without any library dependency.