# Get a quote

`POST /api/quote` · Optional key

Prices one plan (or every fixed plan) from the live price index, valid for the payment window.

Prices one plan from the live price index (what the sources charge now), the live burn price and TRX rate; `pricing.index` says when that index was taken and from how many sources. Paying in USDT costs more than in TRX (`priceUsdt`): the deposit address must be activated and swept.

Leave out the plan to get `{"quotes": [...]}` for `1tx`, `10tx`, `50tx`, `100tx`, minus any no source can fill right now. A plan no source can fill answers `422 no_source`. A quote is valid until `expiresAt`, 15 minutes by default.

## Request

Base URL: `https://feebolt.com`. Works without a key (per-IP limits). With an API key the limits are per key and higher.

### Body parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `packageId` | string | no | A plan id: `1tx`, `7tx-1d`, `12tx-3d`… See [plans](https://feebolt.com/developers/plans/). |
| `transfers` | integer | no | Instead of `packageId`: 1 to 2,000. Send with `duration`. |
| `duration` | "1h" \| "1d" \| "3d" | no | How long the energy stays. `3d` needs 3 transfers or more. |
| `recipient` | "holder" \| "empty" | no | Whether the USDT receiver already holds USDT: `holder` sizes the energy at 64,285 per transfer, `empty` at 130,285. Default `"holder"`. |
| `recipientAddress` | string | no | The USDT receiver. We read the chain to size the energy; overrides `recipient`. |

## Examples

```bash
# Optional: add -H "Authorization: Bearer $FEEBOLT_API_KEY" for per-key limits
curl -X POST https://feebolt.com/api/quote \
  -H "content-type: application/json" \
  -d '{"packageId":"1tx","recipient":"holder"}'
```

```js
const res = await fetch("https://feebolt.com/api/quote", {
  method: "POST",
  headers: {
    // optional: Authorization: `Bearer ${process.env.FEEBOLT_API_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "packageId": "1tx",
    "recipient": "holder"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.message);
```

```python
import requests

r = requests.post(
    "https://feebolt.com/api/quote",
    json={
        "packageId": "1tx",
        "recipient": "holder"
    },
)
r.raise_for_status()
data = r.json()
```

## Response: 200 OK

`{quote}` for one plan, or `{quotes}` for all fixed plans.

```json
{
  "quote": {
    "packageId": "1tx",
    "transfers": 1,
    "hours": 1,
    "energyPerTransfer": 64285,
    "energy": 64285,
    "burnSunPerEnergy": 100,
    "priceSun": 1820000,
    "priceTrx": 1.82,
    "priceUsd": 0.55,
    "priceUsdtMicro": 1160000,
    "priceUsdt": 1.16,
    "burnSun": 6428500,
    "burnTrx": 6.43,
    "burnUsd": 1.93,
    "savingSun": 4608500,
    "savingTrx": 4.61,
    "savingUsd": 1.38,
    "savingPct": 72,
    "perTransferTrx": 1.82,
    "activationSun": 0,
    "trxUsd": 0.299702,
    "pricing": {
      "version": 2,
      "index": {
        "at": 1795895286725,
        "source": "snapshot",
        "stale": true,
        "sourcesCount": 1
      }
    },
    "quotedAt": 1795895286725,
    "expiresAt": 1795896186725
  }
}
```

## Errors

| HTTP | error | When |
| --- | --- | --- |
| 400 | `bad_request` | The body isn't a JSON object, or is over 4 KB. |
| 400 | `bad_package` | Unknown package, or a plan outside 1 to 2,000 transfers (3 or more for 3d), or a duration other than 1h, 1d, 3d. |
| 400 | `bad_recipient` | recipient isn't holder or empty, or recipientAddress isn't a TRON address. |
| 422 | `no_source` | No energy source can fill this plan right now. Try fewer transfers or later. |
| 429 | `rate_limited` | Too many calls (per IP, or per key with a key). Wait for Retry-After seconds. |
| 502 / 503 | `upstream` | The TRON node didn't answer (503 when it rate-limited us). Retry in a few seconds. |

## Rate limits

- Without a key: 60 at once, then 1 per second, per IP.
- With an API key: 300 at once, then 5 per second, per key.

---

HTML: https://feebolt.com/developers/quote/ · OpenAPI: https://feebolt.com/developers/openapi.json · All docs as one Markdown file: https://feebolt.com/developers/full.md
