Introduction to the HyperBloom API
/swap/v1/price
endpoint in the HyperBloom protocol is designed to provide an indicative price for a transaction. Unlike the /swap/v1/quote
endpoint, it does not return a transaction executable on an Ethereum node but rather offers pricing information that would be available for a similar call to /swap/v1/quote
. This endpoint is particularly useful for Request for Quote (RFQ) scenarios.
/swap/v1/price
mirrors that of /swap/v1/quote
, with specific exceptions applicable across all supported chains:
Query Param | Description |
---|---|
sellToken | The ERC20 token address of the token you wish to sell. Always use the token address instead of symbols (e.g., ETH) to ensure API recognition. |
buyToken | The ERC20 token address of the token you wish to receive. Always use the token address instead of symbols (e.g., ETH) to ensure API recognition. |
sellAmount | (Optional) The amount of sellToken (in base units) you intend to send. |
slippagePercentage | (Optional, default is 0.01) Maximum acceptable slippage for buyToken if sellAmount is provided, or for sellAmount if buyAmount is provided. Default is 1% if not specified. |
takerAddress | (Optional) Address that will fill the quote. Recommended for accurate gas estimation and transaction validation. |
excludedSources | (Optional) Specifies liquidity sources to exclude (e.g., Uniswap, SushiSwap). Cannot be combined with includedSources . |
includedSources | (Optional) Specifies liquidity sources to include. Cannot be combined with excludedSources . |
integratorPercentageFee | (Optional) Fees to be charged. Example: 1% β 0.01 , 0.1% β 0.001 , 0.025% β 0.00025 |
integratorRecipientAddress | (Optional) HyperEVM address to receive fees specified with integratorPercentageFee . Both integratorPercentageFee and integratorRecipientAddress are required together. |
/swap/v1/price
is identical to /swap/v1/quote
, except the guaranteedPrice
, to
, and data
fields are always undefined.
Field | Description |
---|---|
price | Provides the price of buyToken in sellToken and vice versa, excluding slippage. Includes fee if buyTokenPercentageFee and feeRecipient are set. |
estimatedPriceImpact | Estimated change in asset price due to swap execution. Returns null if estimation fails. |
value | Ether amount (in wei) to be sent with the transaction. |
gasPrice | Gas price (in wei) for transaction submission. Must be equal to or lower than this value for success. |
gas | Estimated gas limit for transaction settlement. Accurate estimate requires takerAddress . |
estimatedGas | Estimated actual gas usage, always less than gas . |
protocolFee | Maximum ether amount for protocol fee (in wei). |
minimumProtocolFee | Minimum ether amount for protocol fee (in wei). |
buyAmount | Amount of buyToken to be acquired. Excludes sources not supporting buyAmount . |
sellAmount | Amount of sellToken to be sold. Recommended for comprehensive on-chain source coverage. |
sources | Distribution of buyAmount or sellAmount across liquidity sources. |
buyTokenAddress | ERC20 token address for buyToken . |
sellTokenAddress | ERC20 token address for sellToken . |
allowanceTarget | Contract address requiring allowance for swap completion. Null address for βETHβ swaps. |
sellTokenToEthRate | Exchange rate between ETH and sellToken . |
buyTokenToEthRate | Exchange rate between ETH and buyToken . |
sellToken
, buyToken
, and sellAmount
.
Request