Skip to main content
POST
Builds the sweepDistributorFees transaction for one direct liquidity provider: a provider that funds the pool itself rather than through a registered vault. The market credits the distributor share to providers in proportion to the liquidity each supplied while the interest accrued, so a direct position earns a slice like any other. On a current market the only direct provider that can still deposit is the operator wallet. Omit provider and the sweep is built for it. Pass provider to sweep for another direct position, such as a former operator wallet that supplied liquidity before rotating. A registered vault cannot be swept here. It collects its own slice through Collect Distributor Fees and passes it to the distributors behind its holders.

Who receives the slice

The destination is fixed by the market, never by the signer, and recipient in the response names it. Which wallet that is depends on the market implementation. Any wallet may sign, with one exception on the current implementation. When the provider is a contract, such as a multisig, the market accepts the sweep only from that contract itself, and any other signer reverts.

Path Parameters

string
required
Market ID.

Body Parameters

string
The direct liquidity provider whose slice to sweep, as a 0x-prefixed 20-byte address. Defaults to the market’s operator wallet. Ignored when confirming with txHash.
string
Hash of the sweep you broadcast. Send it to confirm the transaction and record the result. Omit it to receive the calldata.

Response Fields

object
Before offering calldata, the API simulates the sweep from the wallet the market would pay. A simulated revert comes back as an error instead of a transaction. A confirmed sweep is recorded on the market as a DISTRIBUTOR_FEES_SWEPT transaction, visible through List Transactions.

Error Codes

Confirming with txHash can also return any transaction verification error.