One SDK for everything on Solon: markets, trading, dividends, primary offerings, bridge and compliance identity. JavaScript works out of the box; Python SDK and 6 sample projects ship with mainnet.
<!-- 1. include ethers + Solon SDK --> <script src="https://solon.digital/assets/ethers.umd.min.js"></script> <script src="https://solon.digital/assets/solon-defi.js"></script> <script src="https://solon.digital/assets/solon-sdk.js"></script> // 2. connect (read-only mode needs no key) const sdk = new SolonSDK(); await sdk.connect('0xYOUR_PRIVATE_KEY'); // or sdk.connectProvider(window.ethereum) // 3. check price -> buy 10 SLN of NVDA token await sdk.price('NVDA'); // 145.0 (in SLN) await sdk.buy('NVDA', '10'); // settled atomically on-chain
| Parameter | Value |
|---|---|
| Network name | Solon Chain Testnet |
| Chain ID | 51051(0xC78B) |
| Public RPC | https://solon.digital/solonrpc/ |
| Native token | SLN (18 decimals, for gas) |
| Block Explorer | solon.digital/explorer |
| Testnet faucet | solon.digital/faucet(100 SLN per claim) |
| Block time | ~3s (sub-second target on mainnet) |
| Token standard | ERC-3643 compatible security tokens (18-decimal fractions, freeze/recovery, compliance rule engine) |
| Endpoint | Notes |
|---|---|
| GET /api/v1/status | Chain status: height, block interval, gas, peer count |
| GET /api/v1/markets | All-token market data: oracle price, 24h volume and trade count |
| GET /api/v1/tokens/{SYM}/quote | Single-token quote + two-way AMM estimate (1 SLN buys / 1 share sells) |
| GET /api/v1/tokens/{SYM}/trades?limit=50 | Recent trades (side, amount, counterparty, tx hash) |
| GET /api/v1/tokens/{SYM}/holders | Holder registry (recomputed trade-by-trade, with shares, 5-min cache) |
| GET /api/v1/tokens/{SYM}/candles | Candles OHLCV (15m / 1h / 4h, aggregated from Swap events) |
| GET /api/explorer/api?module=account&action=… | Etherscan compatible: balance / tokenbalance / tokentx |
# Zero-dependency access from any language (curl / Python requests)
curl https://solon.digital/api/v1/markets
import requests
m = requests.get('https://solon.digital/api/v1/markets').json()
print([(x['symbol'], x['priceSln']) for x in m['markets']])
| Endpoint | Notes |
|---|---|
| GET /api/v1/pro/settlement | Daily settlement report: 24h total volume/trades, per-token breakdown, unique traders, top 5 traders |
# HMAC 签名调用(bash + openssl 零依赖)
TS=$(date +%s); KEY=sk_demo_solon_001; SECRET=whsec_demo_7f3a9c2e5b
SIGN=$(printf "%s:%s" "$TS" "$KEY" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')
curl -H "x-api-key: $KEY" -H "x-api-ts: $TS" -H "x-api-sign: $SIGN" \
https://solon.digital/api/v1/pro/settlement
| Group | Method | Notes |
|---|---|---|
| Market | price(sym) · prices() · quoteBuy(sym, sln) · quoteSell(sym, shares) | Oracle prices and AMM buy/sell quotes |
| Trade | buy(sym, sln) · sell(sym, shares) | AMM market orders, fractions down to 0.000001 share |
| Limit | placeBuy / placeSell(sym, price, shares) · cancelOrder(id) | On-chain limit order book, escrow auto-refunded |
| Dividends | dividends() · claimable(divId) · claimDividend(divId) | Snapshot distribution, one-click claim |
| Primary | offers() · subscribe(offerId, amount) | Primary subscription with atomic DvP settlement |
| Bridge | bridgeDeposit(sln, chainId, target) · bridgeClaim(id) | Lock / claim, progress trackable on-chain |
| Account | balanceSLN() · balanceOf(sym) · isVerified() · registerSelf() | Balances, positions and KYC identity |
Fetch oracle prices for every stock token in one call.
const sdk = new SolonSDK();
console.log(await sdk.prices());
// { NVDA: 145, AAPL: 230, TSLA: 420, … }↓ Download full exampleCheck KYC on both sides before transferring — no on-chain reverts.
const ok = await sdk.isVerified(toAddr);
if (!ok) throw new Error('Recipient has not passed KYC');
// then call token transfer↓ Download full exampleWalk every distribution batch and claim everything claimable.
for (const d of await sdk.dividends()) {
if (await sdk.claimable(d.id) > 0)
await sdk.claimDividend(d.id);
}↓ Download full exampleRead live offerings and subscribe by shares (DvP settlement).
const [offer] = await sdk.offers(); await sdk.subscribe(offer.id ?? 1, '100'); // 100 GLD shares, atomic DvP settlement↓ Download full example
Lock SLN into the bridge; self-claim after relay confirmation.
await sdk.bridgeDeposit('50', 11155111, myAddr);
// track progress: bridge.getXfer(id)↓ Download full examplePlace a bid, watch for fills, auto-cancel on timeout.
await sdk.placeBuy('NVDA', '140', '5');
// ... not filled after 10 min:
await sdk.cancelOrder(orderId); // escrowed SLN auto-refunded↓ Download full example· Python and TypeScript SDKs are both available (web3.py / ethers v6, methods mirror the JS SDK); the viem wrapper ships with mainnet.
· Institutional API (REST + WebSocket, API Key + HMAC + IP whitelist) opens in phase two — endpoint list in the developer docs.
· All contract addresses and ABIs are bundled in solon-defi.js (JS) and assets/abi/*.json (Python) — zero manual config.