Configure SDK
Basic Configuration
Default Configuration
import { Sodax } from '@sodax/sdk';
const sodax = new Sodax();Dynamic Configuration
await sodax.initialize();Partner Fees
import { Sodax, PartnerFee } from '@sodax/sdk';
const partnerFee: PartnerFee = {
address: '0x0000000000000000000000000000000000000000', // address to receive fee
percentage: 100, // 100 = 1%, 10000 = 100%
};
// Fee on swaps only
const sodaxWithSwapFees = new Sodax({
swap: { partnerFee },
});
// Fee on money market only
const sodaxWithMoneyMarketFees = new Sodax({
moneyMarket: { partnerFee },
});
// Fees on both features
const sodaxWithFees = new Sodax({
swap: { partnerFee },
moneyMarket: { partnerFee },
});Custom Configuration
Partner Fees
Solver Configuration
Money Market Configuration
Hub Provider Configuration
Complete Custom Configuration
Additional Resources
Last updated