Integrate SDK
🔗 Clypto API SDK
📦 Installation
npm install @clypto/api-sdkUsage
import { ClyptoApi } from '@clypto/api-sdk';
const apiKey = 'your-api-key';
const clypto = new ClyptoApi(apiKey);
// Get supported chains
const chains = await clypto.getChains();
// Get tokens for a specific provider
const tokens = await api.getTokens({ provider: 'thorchain' });
// Get a quote
const quote = await api.getQuote({
srcChain: 'bitcoin',
srcToken: '', // pass empty string for native assets like bitcoin, ethereum
destChain: '1', // ethereum
destToken: '',
amount: '100000000', // 1btc
slippageBps: 150,
referrer: 'address',
referralFeeBps: 25, // 0.25%
});
// Get a swap transaction
const swap = await clypto.getSwap({
srcChain: 'bitcoin',
srcToken: '', // pass empty string for native assets like bitcoin, ethereum
destChain: '1', // ethereum
destToken: '',
srcAddress: 'bc...', // btc wallet address
destAddress: '0x...', // eth wallet address
amount: '100000000', // 1btc
slippageBps: 150,
referrer: 'address',
referralFeeBps: 25, // 0.25%
});API Reference
Last updated