API REFERENCE
↓

Quotes over HTTP.

A public, read-only endpoint for exact-input quote requests.

POST/api/v1/trading/quotes

Send JSON to https://www.floor1.fun. This endpoint needs no site session or API key. Browser calls are supported with CORS; credentials are omitted. It computes a quote and does not send a transaction.

Request

Terminal
curl https://www.floor1.fun/api/v1/trading/quotes \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "0x1111111111111111111111111111111111111111",
    "side": "buy",
    "amount": "10000000000000000",
    "slippageBps": 100
  }'
FieldRequiredFormat
tokenYesToken contract address.
sideYesbuy or sell.
amountYesPositive decimal uint256 string in atomic units.
slippageBpsYesInteger from 10 to 5000.

Unknown request fields are rejected. Maximum request body size is 2048 bytes. There is no exact-output mode.

Response

FieldTypeMeaning
idstringQuote identifier.
chainId / token / side / modenumber / string91342, token address, direction, and exact_in.
amount / slippageBpsstring / numberThe requested input and slippage.
amountOut / minimumOutstringEstimated output and on-chain minimum.
fee / protocolFee / creatorFeestringFees in quote-asset atomic units.
issuedAt / expiresAtnumberUnix timestamps in milliseconds.
snapshotobjectState provenance; includes blockNumber, indexedAt, and marketVersion.

Errors and limits

JSON
{
  "error": {
    "code": "unprocessable",
    "message": "The curve has insufficient liquidity for this amount."
  }
}
StatusCodeMeaning
400bad_requestInvalid input, unsupported fields, or oversized body.
404not_foundToken is unknown or removed.
422unprocessableInactive curve, unsupported asset, tiny amount, or insufficient liquidity.
429rate_limitedWait for the Retry-After interval.
503unavailableIndexed parameters or quote service are unavailable.

The local fallback admits 40 quote requests per 10 seconds per instance and trusted caller key. Hosted firewall rules can apply stricter limits. Respect Retry-After on 429 and 503 responses. Responses use Cache-Control: no-store. OPTIONS returns the browser preflight response. Other Floor1 API endpoints are outside this public SDK.