Swap API
Last updated
Last updated
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 5 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
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 (RISKY)
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
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 (RISKY)
Platform possible values:
pumpfun-migration
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 POST /api/v1/quick-task/stop)
stop
This endpoint is used to stop active worker group
You should pass workerGroupID
that you've got from calling POST /api/v1/quick-task/start
/api/v1/quick-task/swap
optional amount of token in to swap, if not provided (0) will use amount from worker
update flag allows the bot to know whether user want to update the current position (buy more case) or treat it as a separate position by default bot will serve it as separate
optional slippage for the swap, if not provided (0) will use slippage from worker
optional tip for the swap, if not provided (0) will use tip from worker (overrides work only if tip for specific provider is set)
input is an optional string that must be in sol pub key format. If provided, the bot will determine whether its pool or token address by itself so you can safely omit pool, token and platform fields its still not recommended to use this field, if provided value is a token address since the bot will not be able to choose the 'best' pool but instead use the last one
optional fee for the swap, if not provided (0) will use fee from worker
SwapPumpfunMigration is a special endpoint that is used to create a worker group file for pumpfun migration snipe The bot will use wallet and rpc from config file and based on provided data will create a worker group file Note: this endpoint is not used to execute the migration snipe, but to prepare the worker group file
/api/v1/quick-task/swap/pumpfun-migration
pumpfun token address (mandatory)
amount to use for migration snipe (mandatory)
slippage for the swap (optional, default slippage is 50%)
tip for the swap (optional, default tip is 0.002 SOL)
fee for the swap (optional, default fee is 0.002 SOL)
optional preset name to use for the migration snipe (optional, by default the bot will create custom preset)
optional wallet name to use for the migration snipe (optional, by default the bot will use qt wallet from config file)
optional rpc name to use for the migration snipe (optional, by default the bot will use qt rpc from config file)
/api/v1/quick-task/stop
/api/v1/quick-task/start