# 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

```ts
curl https://www.floor1.fun/api/v1/trading/quotes \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "0x1111111111111111111111111111111111111111",
    "side": "buy",
    "amount": "10000000000000000",
    "slippageBps": 100
  }'
```

Field | Required | Format | 

token | Yes | Token contract address. | 

side | Yes | buy or sell. | 

amount | Yes | Positive decimal uint256 string in atomic units. | 

slippageBps | Yes | Integer from 10 to 5000. | 

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

## Response

Field | Type | Meaning | 

id | string | Quote identifier. | 

chainId / token / side / mode | number / string | 91342, token address, direction, and exact_in. | 

amount / slippageBps | string / number | The requested input and slippage. | 

amountOut / minimumOut | string | Estimated output and on-chain minimum. | 

fee / protocolFee / creatorFee | string | Fees in quote-asset atomic units. | 

issuedAt / expiresAt | number | Unix timestamps in milliseconds. | 

snapshot | object | State provenance; includes blockNumber, indexedAt, and marketVersion. | 

## Errors and limits

```ts
{
  "error": {
    "code": "unprocessable",
    "message": "The curve has insufficient liquidity for this amount."
  }
}
```

Status | Code | Meaning | 

400 | bad_request | Invalid input, unsupported fields, or oversized body. | 

404 | not_found | Token is unknown or removed. | 

422 | unprocessable | Inactive curve, unsupported asset, tiny amount, or insufficient liquidity. | 

429 | rate_limited | Wait for the Retry-After interval. | 

503 | unavailable | Indexed 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.


