partner string and optional fee overrides. The fee is collected on-chain at settlement and routed to your partner address, with no extra integration needed.
Quick setup
If you’ve registered your partner key with Velora, just passpartner and the server resolves the fee config:
Delta sends
partner / partnerAddress / partnerFeeBps straight to the server, which resolves and validates them in one call and encodes the fee into the on-chain order, so no local round-trip is needed.getPartnerFee directly:
Fields
| Field | Type | Description |
|---|---|---|
partner | string | Your partner-key string (e.g. "my-app-name"). Used for attribution; required for partner features. |
partnerAddress | string | Optional. Ethereum address that receives the fee. Overrides the address registered for partner. |
partnerFeeBps | number | Optional. Fee in basis points. 25 = 0.25%. Max 200 (2%). |
partnerTakesSurplus | boolean | Optional. When true, you receive a share of swap surplus instead of a fixed fee. Defaults to false. |
Precedence. If both
partnerFeeBps and partnerTakesSurplus are set, partnerFeeBps wins. To take surplus instead, set partnerTakesSurplus: true and omit partnerFeeBps.Fee vs surplus: which to pick
A fixed fee gives predictable per-trade revenue but worsens the user-facing quote; a surplus share is variable but leaves the quote untouched. For the full comparison (including how the split between partner, user, and Velora differs across Delta and Market), see Monetization.Where it applies
- Delta: pass
partner(and overrides) tosdk.delta.getDeltaPrice,sdk.delta.submitDeltaOrder,sdk.delta.buildDeltaOrder, andsdk.delta.postDeltaOrder. The server encodes the fee into the on-chain order. - Market Swap: pass
partnertosdk.swap.getRate(insideoptions: { partner }) andsdk.swap.buildTx(top-level). Fee is taken from the destination token at settlement. - Quote: pass
partnertosdk.quote.getQuote. The returnedpriceRoute/deltaPricealready accounts for the fee, so thedestAmountyou show users is the net amount.
Production tips
- Load
partnerfrom an environment variable. Different builds (staging, production, white-label) can use different keys without code changes. - Audit
partnerAddress. Once a swap settles, fees pay to that address on-chain. Treat it like any treasury address. - Don’t ship per-call overrides unless you genuinely vary fees by route or user tier. Registering defaults with Velora keeps your client code simpler and lets you adjust fees without redeploying.
Related pages
- Pro API accounts: register a partner key and set defaults.
- Widget → Monetize — same fee mechanics for the embeddable widget.
- Swaps → Delta covers the full Delta order flow with partner attribution.
- Swaps → Market, the full Market-Swap flow with partner attribution.