SDKs & Libraries
Official SDKs
| Language | Package | Install |
|---|---|---|
| TypeScript/Node.js | @cryptachain/sdk | npm install @cryptachain/sdk |
| Python | cryptachain | pip install cryptachain |
| Java | com.cryptachain:cryptachain-sdk | Maven Central |
TypeScript SDK
bash
npm install @cryptachain/sdktypescript
import CryptaChain from '@cryptachain/sdk';
const client = new CryptaChain({ apiKey: process.env.CRYPTACHAIN_API_KEY! });
// Wallet balances
const balances = await client.wallets.getBalances('0xd8dA...', { chain: 'ethereum', includePrices: true });
console.log(`Portfolio: $${balances.totalValueUsd}`);
// Stream all transfers (auto-pagination)
for await (const tx of client.wallets.getAllTransfers('0xd8dA...', { chain: 'ethereum' })) {
console.log(`${tx.blockTimestamp} ${tx.direction} ${tx.value} ${tx.assetSymbol}`);
}
// Price lookup (v2.3 response shape)
const price = await client.prices.bySymbol('BTC', '2026-04-04', 'EUR');
console.log(`BTC: €${price.price} (${price.source}, quality: ${price.qualityScore})`);
// FX rate
const rate = await client.fx.getRate('EUR', 'USD', '2026-04-04');
console.log(`1 EUR = $${rate.rate} (${rate.source})`);
// IAS 21 monthly average
const avg = await client.fx.getMonthlyAverage('EUR', 2026, 4);
console.log(`April 2026 EUR/USD avg: ${avg.averageRate}`);Python SDK
bash
pip install cryptachainpython
from cryptachain import CryptaChain
client = CryptaChain(api_key="your-api-key")
# Wallet balances
balances = client.wallets.get_balances("0xd8dA...", chain="ethereum")
print(f"Portfolio: ${balances.total_value_usd}")
# Stream all transfers (auto-pagination)
for transfer in client.wallets.iter_all_transfers("0xd8dA...", chain="ethereum"):
print(f"{transfer.block_timestamp} {transfer.direction} {transfer.value} {transfer.asset_symbol}")
# Price lookup (v2.3 response shape)
price = client.prices.by_symbol("BTC", date="2026-04-04", currency="EUR")
print(f"BTC: €{price.price} (source: {price.source}, quality: {price.quality_score})")
# FX rate
rate = client.fx.get_rate("EUR", "USD", "2026-04-04")
print(f"1 EUR = ${rate.rate} ({rate.source})")
# Export to pandas DataFrame
df = client.wallets.to_dataframe("0xd8dA...", chain="ethereum")Java SDK
xml
<dependency>
<groupId>com.cryptachain</groupId>
<artifactId>cryptachain-sdk</artifactId>
<version>0.1.0</version>
</dependency>java
var client = CryptaChain.builder()
.apiKey("your-api-key")
.build();
// Wallet balances
var balances = client.wallets().getBalances("0xd8dA...", "ethereum");
System.out.println("Portfolio: $" + balances.totalValueUsd());
// Stream all transfers (auto-pagination)
client.wallets().streamAllTransfers("0xd8dA...", "ethereum")
.forEach(tx -> System.out.printf("%s %s %s %s%n",
tx.blockTimestamp(), tx.direction(), tx.value(), tx.assetSymbol()));
// Price lookup (v2.3 response shape)
var price = client.prices().bySymbol("BTC", LocalDate.of(2026, 4, 4), "EUR");
System.out.println("BTC: €" + price.price() + " (" + price.source() + ")");
// FX rate
var rate = client.fx().getRate("EUR", "USD", LocalDate.of(2026, 4, 4));
System.out.println("1 EUR = $" + rate.rate() + " (" + rate.source() + ")");REST API (no SDK)
Every endpoint in this documentation can be called directly with any HTTP client. The SDKs are convenience wrappers — they add type safety, automatic retries, and rate limit handling, but the raw API is fully documented here.
bash
# Any HTTP client works
curl https://api.cryptachain.com/v1/fx/rate?from=EUR&to=USD&date=2026-04-04 \
-H "X-API-Key: $CRYPTACHAIN_API_KEY"