> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashnet.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Routes and limits

> Assets and route limits

Routes list which assets can reach which destinations; limits give amount bounds for a pair. Read `/routes` for capability and decimals, `/limits` for form validation, then `/estimate` for pricing and `/quote` when the user commits. Do not hardcode availability or bounds.

## Routes

`GET /v2/orchestration/routes` returns `{ assets: [...] }`, one entry per asset. The `id` is `<chain>:<asset>`, for example `base:USDC`, `ton:GRAM`, `hypercore:USDC`. Fetch it:

```bash theme={null}
curl "https://orchestration.flashnet.xyz/v2/orchestration/routes"
```

Illustrative asset entry; read current capabilities from the response.

```json theme={null}
{
  "id": "base:USDC",
  "chain": "base",
  "asset": "USDC",
  "assetDisplayName": "USD Coin",
  "assetDisplaySymbol": "USDC",
  "chainDisplayName": "Base",
  "chainIcon": "/chain-base.svg",
  "contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "decimals": 6,
  "chainId": "8453",
  "route": {
    "to": { "except": ["litecoin:LTC"] },
    "exactOutTo": ["lightning:BTC"],
    "fixedTo": ["bitcoin:BTC", "lightning:BTC", "spark:BTC", "spark:USDB"]
  }
}
```

Read the source asset's sets for the requested destination:

* `to`: supported destinations.
* `exactOutTo`: destinations supporting exact-out amounts.
* `fixedTo`: destinations supporting fixed delivery.

Each set is `"all"` (every other asset), a list of ids (empty means none), or an object with an `except` list. Availability also depends on partner configuration and live pricing. Discover routes with the same partner key used for quotes when applicable.

`contractAddress` identifies the token; native assets use null. `chainId` identifies the network where supplied. `decimals` is the smallest-unit exponent for that specific asset: Base USDC uses 6, BSC USDC 18, and Hypercore USDC 8. Never infer decimals from the ticker.

Read capability from set membership, not from the symbol. Two assets that share a ticker on different chains are different ids with different sets, and an id that is missing from the response is never routable.

## Limits

`GET /v1/orchestration/limits` returns `{ generatedAt, routes: [...] }` with bounds per canonical route. Filter by `sourceChain`, `sourceAsset`, `destinationChain`, and `destinationAsset`:

```bash theme={null}
curl "https://orchestration.flashnet.xyz/v1/orchestration/limits?sourceChain=lightning&sourceAsset=BTC&destinationChain=spark&destinationAsset=USDB"
```

Illustrative route entry, trimmed; use live bounds:

```json theme={null}
{
  "sourceChain": "lightning",
  "sourceAsset": "BTC",
  "destinationChain": "spark",
  "destinationAsset": "USDB",
  "direction": "sell",
  "exactOutEligible": true,
  "fixedEligible": false,
  "limits": {
    "orderNotionalUsd": {
      "minCents": "100",
      "maxCents": "11220000",
      "source": "runtime_order_bounds"
    },
    "exactIn": {
      "supported": true,
      "requestAmount": {
        "leg": "source",
        "chain": "lightning",
        "asset": "BTC",
        "minAmountSmallest": "1200",
        "maxAmountSmallest": "98000000",
        "minUsdCents": "100",
        "maxUsdCents": "11220000"
      },
      "constraints": ["runtime_order_bounds"]
    },
    "exactOut": { "supported": true, "requestAmount": {}, "constraints": [] },
    "fiatUsd": {
      "supported": true,
      "min": "1.00",
      "max": "50000.00",
      "surfaces": ["onramp", "pay_link"]
    },
    "dynamicProviderLimits": {
      "possible": false,
      "components": [],
      "description": null
    },
    "constraints": [
      {
        "id": "runtime_order_bounds",
        "amountMode": "exact_in",
        "leg": "source",
        "source": "runtime_order_bounds",
        "description": "Operator-tuned notional bounds"
      }
    ]
  }
}
```

Direction is buy, sell, or xchain. The notional band is operator-tuned and changes without notice. The exact-in and exact-out blocks give the request-amount bounds in smallest units and in cents. The fiat band is present only when the source is Lightning BTC. When `dynamicProviderLimits.possible` is true, live pricing can still reject an amount inside the published band. Every bound has a typed entry in `constraints` whose `source` is one of runtime\_order\_bounds, flashnet\_static\_limit, bitcoin\_l1\_delivery, provider\_quote, or fiat\_amount.

Three minimums are static and enforced in code: 5,000 sats of swap input from Bitcoin L1 (published as `minAmountSmallest: "5149"` once the static deposit fee is added), 1,200 sats from Spark, and 10,000 sats for delivery to Bitcoin L1.

Some cross-chain planner routes appear on `/routes` but not on `/limits`. Treat `/limits` as a guardrail for your form, not as an execution guarantee: `/estimate` and `/quote` can still return `amount_too_small`, `amount_too_large`, `amount_exceeds_liquidity`, or `route_unavailable` for an amount inside the published band.

Both endpoints are rate limited to 60 requests per minute per IP. Responses carry `X-RateLimit-*` headers and exhaustion returns `429 rate_limited`. See [Rate limits](/api/rate-limits).
