Loading...
Loading...
© 2026 Hydrex. All rights reserved.
Two fee layers, usable independently or together.
Applied on-chain by the Hydrex router contract. Reflected in amountOut and minOutputAmount so users see their net receive amount.
referral = "0xYourPartnerWallet"
referralFeeBps = 10 // 0.10%Charged by the upstream aggregator before the quote is returned. Already reflected in the upstream rate.
spread = 15 // 0.15%
spreadDirection = "input" // charge the sell token
admin = "0xYourPartnerWallet"const quote = await getQuote({
fromTokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
toTokenAddress: "0x4200000000000000000000000000000000000006",
amount: "100000000",
taker: account.address, // viem account
// Referral fee (on-chain)
referral: "0xYourPartnerWallet",
referralFeeBps: 10,
// Spread fee (aggregator-level)
spread: 15,
spreadDirection: "input",
admin: "0xYourPartnerWallet",
// Tracking
origin: "my-app",
});Best Practice: Always set origin to a stable identifier for your integration for analytics and attribution.