> For the complete documentation index, see [llms.txt](https://router.foreverlong.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://router.foreverlong.io/swap-api.md).

# Swap API

The Everlong Swap API provides optimal routing and transaction generation for token swaps across supported liquidity sources.

Most integrations interact with the Everlong Router contract using calldata generated by the API.

The API handles:

* Route discovery
* Liquidity aggregation
* Transaction construction

This allows developers to integrate swaps without implementing complex routing logic.

***

### Zero Fees <a href="#zero-fees" id="zero-fees"></a>

The Everlong Router charges no additional protocol fees on swaps.

Users receive the full output of the optimised route without any hidden aggregator fees.

This ensures integrations always deliver maximum value to users.

### Positive Price Impact <a href="#positive-price-impact" id="positive-price-impact"></a>

Everlong’s routing engine is designed to maximise execution efficiency.

By intelligently aggregating liquidity across multiple pools, routes may sometimes produce positive price impact, meaning users can receive more output tokens than the expected market price.

This can occur when the routing engine:

* Identifies price imbalances across liquidity pools
* Splits trades across multiple venues
* Executes routes that capture arbitrage opportunities

### Core Contracts <a href="#core-contracts" id="core-contracts"></a>

#### Everlong Router <a href="#everlong-router" id="everlong-router"></a>

The Everlong Router is the primary contract used to execute swaps.

Most applications interact with this contract using the transaction payload returned by the Swap API.

The router coordinates swap execution across multiple liquidity sources.

***

#### Route Definition <a href="#route-definition" id="route-definition"></a>

The API generates the full swap route definition used during execution.

This route data is included in the transaction calldata returned by the /swap endpoint.

The route definition must never be modified.

Changing the route parameters can result in:

* failed transactions
* incorrect swap execution
* potential loss of funds

Always execute the transaction payload exactly as returned by the API.

***

### Execution Contracts <a href="#execution-contracts" id="execution-contracts"></a>

The underlying execution contracts used to perform swaps may change as new liquidity sources are added or routing logic evolves.

For this reason:

* Execution contracts should never be hardcoded
* Always rely on the transaction payload returned by the API
* Direct interaction with execution contracts is not recommended

***

### Rate Limits <a href="#rate-limits" id="rate-limits"></a>

Standard API keys have the following rate limits:

| Burst capacity | Refill rate            |
| -------------- | ---------------------- |
| 100 requests   | 10 requests per second |

If the rate limit is exceeded, the API returns:

```
429 Rate limit exceeded
```

[<br>](https://open-2v.gitbook.com/url/preview/site_IgQ4w/~/revisions/J17CB98xTQ3Qnt6uLSrZ/everlong-swap-api/guide)
