create

fun create(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: Boolean? = null): ZeroXPriceRequest

Factory method to create a ZeroXPriceRequest with Boolean to String conversion for sellEntireBalance.

Return

A new ZeroXPriceRequest instance.

Parameters

chainId

The blockchain identifier.

buyToken

The token to buy.

sellToken

The token to sell.

sellAmount

The amount to sell.

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.

slippageBps

Optional slippage in basis points.

excludedSources

Optional excluded sources.

sellEntireBalance

Optional Boolean flag that will be converted to "true"/"false" string.