ZeroXPriceRequest

constructor(chainId: String, buyToken: String, sellToken: String, sellAmount: String, txOrigin: String? = null, swapFeeRecipient: String? = null, swapFeeBps: Int? = null, swapFeeToken: String? = null, tradeSurplusRecipient: String? = null, gasPrice: String? = null, slippageBps: Int? = null, excludedSources: String? = null, sellEntireBalance: String? = null)

Parameters

chainId

The blockchain identifier (e.g., "eip155:1" for Ethereum Mainnet). Included in request body.

buyToken

The token to buy. Can be the address or symbol.

sellToken

The token to sell. Can be the address or symbol.

sellAmount

The amount to sell including all decimals.

txOrigin

Optional transaction origin address.

swapFeeRecipient

Optional address to receive swap fees.

swapFeeBps

Optional swap fee in basis points.

swapFeeToken

Optional token to use for swap fees.

tradeSurplusRecipient

Optional address to receive trade surplus.

gasPrice

Optional gas price to use for the transaction.

slippageBps

Optional slippage tolerance in basis points.

excludedSources

Optional comma-separated list of sources to exclude.

sellEntireBalance

Optional flag to sell entire balance (converted to "true"/"false" string).