Monetize SDK
Defining Fee
import { PartnerFee } from '@sodax/sdk';
// Partner fee can be defined as a percentage or a definite token amount.
// Fee is optional, you can leave it empty/undefined.
const partnerFeePercentage = {
address: '0x0000000000000000000000000000000000000000', // EVM (Sonic) address to receive fee
percentage: 100, // 100 = 1%, 10000 = 100%
} satisfies PartnerFee;
const partnerFeeAmount = {
address: '0x0000000000000000000000000000000000000000', // EVM (Sonic) address to receive fee
amount: 1000n, // definite amount denominated in token decimal precision
} satisfies PartnerFee;Global fee configuration
Per-request fee configuration
Quote request
Swap request
Partner Fee Claiming
Accessing the partner service
Step 1 — Query accrued balances
Step 2 — Configure auto-swap preferences
Step 3 — Approve the fee token
Step 4 — Claim fees (end-to-end swap)
Step 5 — Same-token claims (no conversion) and recovery
Error handling
Raw transaction mode
Last updated