Affiliate Fee Integration
How it works
affiliateFeeAmount = floor((amountIn × partnerFeeBps) / 1,000,000)
poolAmountIn = amountIn - affiliateFeeAmountRequest example
{
"type": "SWAP",
"params": {
"tokens": ["2584333:39", "0:0"],
"amountIn": "1000000",
"amountOut": "100000",
"feeRates": [3000],
"isExactIn": true,
"partnerFeeBps": 10000,
"partnerFeeRecipient": "bc1q..."
}
}Rules
Fee calculation examples
Common errors
Error
Cause
Fix