QUOTES
↓

Know your trade before you sign.

Exact-input quotes with slippage protection and indexed state.

Request an estimate for a buy or sell. Quotes include expected output, minimum output, fees, an expiry, and the indexed block used for the calculation. Requesting a quote never asks the wallet to sign.

Request a quote

TypeScript
const quote = await floor1.quote({
  token,
  side: 'buy',
  amount: 10_000_000_000_000_000n,
  slippageBps: 100,
}, { signal: abortController.signal });
ParameterTypeMeaning
tokenAddressActive Floor1 token contract address.
sidebuy | sellDirection of the trade.
amountbigintPositive exact input in atomic units.
slippageBpsnumber10–5000 inclusive. Defaults to 100.

Amounts and fees

FieldUnits
amountBuy: wei of native ETH. Sell: atomic token units.
amountOut / minimumOutBuy: atomic token units. Sell: wei of native ETH.
fee / protocolFee / creatorFeeWei of the quote asset (ETH/WETH) for both sides.

Floor1 tokens use 18 decimals. Use viem parseEther and parseUnits to create input bigints. Keep quote strings as strings or convert them to bigint; JavaScript numbers lose precision for these values. Output is net of the protocol and creator fees. Network gas is separate.

Slippage and expiry

Formula
minimumOut = amountOut * (10_000 - slippageBps) / 10_000

The calculation rounds down using integer arithmetic. 100 basis points means 1%; 500 means 5%. A quote expires 30 seconds after issue. Transaction builders reject expired quotes. The contract enforces minimum output when the trade executes.

Indexed state

Quotes use the latest available indexed reserves. The snapshot includes blockNumber, indexedAt (Unix milliseconds), and marketVersion so you can show the state used for the estimate. An idle token can have an old block number without its reserves having changed. Indexing can lag the chain, and a quote reserves no liquidity or price.

Availability

The API rejects inactive curves, unsupported quote assets, unknown tokens, insufficient real reserves, inputs that round to zero, and incomplete indexed parameters. It returns an error instead of inventing a price. Graduated tokens are not supported by these bonding-curve trading methods.