# Relayer APIs

The relayer provides the following APIs to receive swap request and release, and to query recent swaps.

The current Meson relayer is running at <https://relayer.meson.fi>.

### Submit a Swap Request

Receives an incoming swap request submitted by Meson app. Calling this API requires the swap request data and a valid user signature. The relayer will perform preliminary checks and broadcast the data to connected LP services if deemed valid.

```
POST https://relayer.meson.fi
```

**Request Body**

Example:

```json
// TODO give an example
{
  "encoded": ""
}
```

### Submit a Swap Release

Receives an incoming swap release submitted by Meson app. Calling this API requires the swap release data and a valid user signature. The relayer will perform preliminary checks and broadcast the data to connected LP services if deemed valid.

```
PUT https://relayer.meson.fi
```

**Request Body**

Example:

```json
// TODO give an example
{
  "encoded": ""
}
```

### Query Recent Swaps

Returns swaps form the pending pool, which are swaps that were submitted to the relayer recently but have not completed the entire swap process.

```
GET https://relayer.meson.fi
```

**Returns**

Example:

```json
// TODO give an example
[
  {
    "encoded": ""
  },
  ...
]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meson.fi/protocol/system-design/relayer/apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
