How It Works
Builder fees are optional parameters included when opening trades that allow integrators to specify:builder- The fee recipient addressbuilderFee- The fee percentage (scaled by 1e6)
Key Characteristics
- Charged at trade opening only - Fees are deducted from the collateral when the trade is opened
- Maximum fee cap - Builder fees are capped at 0.5% (50 basis points) to protect users
- Atomic transfer - Fees are transferred atomically when the trade opens, with no accrual, claiming, or withdrawal step required
- Permissionless - Any address can act as a builder without prior approval or registration
- Required Parameters - Builder parameters must be provided but can be set to zero address (0x0) and zero fee if no builder fee is needed
Using Builder Fees with the Python SDK
Basic Example with Builder Fee
Trade Without Builder Fee
If you don’t specify builder parameters, the SDK automatically uses default values (zero address and zero fee):Direct Contract Interaction
Contract Interface
TheopenTrade function accepts a BuilderFee struct: