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

# Swap API

**`swap`**\
\
This endpoint will work **ONLY** if you have active worker group with **watch** mode worker. Once you send the request, **ALL** workers will handle the task like **afk** one, so filters / strategies / etc will be applied\
\
You have 6 options for the request body:

* you can provide **`platform`**, **`pool`** and **`token`**: the bot will do the exact thing you expect him to do
* you can provide **`platform`**, **`pool`** - the bot will do the exact thing you expect him to do&#x20;
* you can provide **`platform`** and **`token`**: the bot will try to find the pool for that token and platform and if there are **MULTIPLE** pools the bot will use that latest one (<mark style="color:red;">**RISKY**</mark>)&#x20;
* you can provide **`pool`** but no platform and token: the bot will try to fetch the pool and auto set everything based on the info it fetched&#x20;
* you can provide **`token`** but no platform and pool: the bot will try to find the pool and if there are MULTIPLE pools the bot will use that latest one (<mark style="color:red;">**RISKY**</mark>)
* you can provide `txBase64` and omit `platform`, `pool` and `token` fields: the bot will try to parse the tx and get pool information from it

*Platform possible values:*

```
raydium
raydium-cp
raydium-clmm
meteora
pumpfun
jupiter
moonshot
pamm
raydium-launchpad
meteora-dbc
```

{% openapi src="/files/qHCAEArG2ucZW4C4k6id" path="/api/v1/quick-task/swap" method="post" %}
[openapi.yaml](https://285536559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRWufhdF9QJ79pFmmf3JN%2Fuploads%2FjVCaCxgQZD8tWYjptrBn%2Fopenapi.yaml?alt=media\&token=00c00615-9406-4ebf-9d7c-4e28fe6bcf21)
{% endopenapi %}

**`pumpfun-migration`**

{% openapi src="/files/qHCAEArG2ucZW4C4k6id" path="/api/v1/quick-task/swap/pumpfun-migration" method="post" %}
[openapi.yaml](https://285536559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRWufhdF9QJ79pFmmf3JN%2Fuploads%2FjVCaCxgQZD8tWYjptrBn%2Fopenapi.yaml?alt=media\&token=00c00615-9406-4ebf-9d7c-4e28fe6bcf21)
{% endopenapi %}

**`start`**

This endpoint is used to start created csv task file\
You can launch as many worker groups as you want from the same task file

As a **`name`** the bot accepts following strings:

* "tasks/solswap-my\_name.csv"
* "tasks/solswap-my\_name"
* "solswap-my\_name.csv"
* "solswap-my\_name"

Successful response will return **`workerGroupID`** which you should store somewhere in order to stop it! (By calling [#api-v1-quick-task-stop](#api-v1-quick-task-stop "mention"))

{% openapi src="/files/7dG67K477GEG1jRizv6Y" path="/api/v1/quick-task/start" method="post" %}
[openapi.yaml](https://285536559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRWufhdF9QJ79pFmmf3JN%2Fuploads%2FGYYVURGaop8KJyAmcmSQ%2Fopenapi.yaml?alt=media\&token=eb72654b-1b45-4c92-bb1a-90ca6fbe1c2d)
{% endopenapi %}

**`stop`**

This endpoint is used to stop active worker group

You should pass **`workerGroupID`** that you've got from calling [#api-v1-quick-task-start](#api-v1-quick-task-start "mention")

{% openapi src="/files/ZIhZsoigy0GG95IhtF12" path="/api/v1/quick-task/stop" method="post" %}
[openapi.yaml](https://285536559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRWufhdF9QJ79pFmmf3JN%2Fuploads%2FoL71QCRFRCFUbbLbbzcD%2Fopenapi.yaml?alt=media\&token=1e706197-54be-40cf-a6e7-5bab2df5e6d9)
{% endopenapi %}
