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

  • 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)

  • 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
post
Body
platformstringOptional
poolstringOptional
tokenstringOptional
amountnumber · doubleOptional

optional amount of token in to swap, if not provided (0) will use amount from worker

updatebooleanOptional

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

slippagenumber · doubleOptional

optional slippage for the swap, if not provided (0) will use slippage from worker

tipnumber · doubleOptional

optional tip for the swap, if not provided (0) will use tip from worker (overrides work only if tip for specific provider is set)

inputstringOptional

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

feenumber · doubleOptional

optional fee for the swap, if not provided (0) will use fee from worker

txBase64stringOptional

txBase64 is an optional field that allows you to perform swap on "new" pools (afk like) basically, it allows the bot to get pool information from the tx instead of fetching it from the rpc so if this field is provided, the bot will execute the swap based on the txBase64 transaction must be in encoded using base64, moreover it must be resolved if it contains ATLs (address table lookups)

Responses
200
OK
application/json
Responseobject
post
POST /api/v1/quick-task/swap HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "platform": "text",
  "pool": "text",
  "token": "text",
  "amount": 1,
  "update": true,
  "slippage": 1,
  "tip": 1,
  "input": "text",
  "fee": 1,
  "txBase64": "text"
}
{}

pumpfun-migration

post

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

Body
tokenstringOptional

pumpfun token address (mandatory)

amountnumber · doubleOptional

amount to use for migration snipe (mandatory)

slippagenumber · doubleOptional

slippage for the swap (optional, default slippage is 50%)

tipnumber · doubleOptional

tip for the swap (optional, default tip is 0.002 SOL)

feenumber · doubleOptional

fee for the swap (optional, default fee is 0.002 SOL)

presetstringOptional

optional preset name to use for the migration snipe (optional, by default the bot will create custom preset)

walletstringOptional

optional wallet name to use for the migration snipe (optional, by default the bot will use qt wallet from config file)

rpcstringOptional

optional rpc name to use for the migration snipe (optional, by default the bot will use qt rpc from config file)

Responses
200
OK
application/json
post
POST /api/v1/quick-task/swap/pumpfun-migration HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "token": "text",
  "amount": 1,
  "slippage": 1,
  "tip": 1,
  "fee": 1,
  "preset": "text",
  "wallet": "text",
  "rpc": "text"
}
{
  "workerGroupName": "text"
}

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 Swap API)

post
Body
namestringOptional
Responses
200
OK
application/json
post
POST /api/v1/quick-task/start HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "workerGroupID": "text"
}

stop

This endpoint is used to stop active worker group

You should pass workerGroupID that you've got from calling Swap API

post
Body
workerGroupIDstringOptional
Responses
200
OK
application/json
Responseobject
post
POST /api/v1/quick-task/stop HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "workerGroupID": "text"
}
{}

Last updated