Skip to content

Please add "BUY EXACTTOKENS" function #415

@bobby4star

Description

@bobby4star

Hi Devs,

It would be awesome if you could update the limitswap bot to buy the exact amount of tokens specified, provided that the price/total amount in base is within a specified limit. This will be a great feature where a launch has a max buy limit of say 30,000 tokens, and would allow the bot to buy all 30,000 providing the account has sufficient funds. At the moment, with current bot, it is a guessing game on how much in BNB to buy with, and transactions can fail if sending too much, or can result in only a fraction of tokens being bought vs the maximum permitted amount.

Here I give a suggestion on how the tokens.json file could work:-

[
{

"ENABLED": "true",

"SYMBOL": "CAKE",
"ADDRESS": "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",

"BUYAMOUNTINBASE": "0.00005",
"BUYPRICEINBASE":  "0",
"SELLPRICEINBASE": "11111",
"SLIPPAGE": "5",

"MAXTOKENS": "1",
"MOONBAG": "0",

"EXACT_TOKENS": "true",  (over-rides BUYAMOUNTINBASE and instead buys the EXACT_TOKENS at whatever the price is) 
"EXACT_TOKENS_BUY_AMOUNT": "enter exact number of tokens to purchase"
"EXACT_TOKENS_BUY_LIMIT_IN_BASE": "enter max buy amount limit in BNB/basepair, bot does not buy if total price of maxtokens is above this wallet funding limit"   (or omit this step and just let the tx fail if the wallet has insufficient funds)

"RUGDOC_CHECK": "true",
"BUYAFTER_XXX_SECONDS": "0",    
"MAX_FAILED_TRANSACTIONS_IN_A_ROW": "2",    

"LIQUIDITYCHECK": "false",
"LIQUIDITYAMOUNT": "100",
"LIQUIDITYINNATIVETOKEN": "true",
"USECUSTOMBASEPAIR": "false",
"BASESYMBOL": "BUSD",
"BASEADDRESS": "0xe9e7cea3dedca5984780bafc599bd69add087d56",

"SELLAMOUNTINTOKENS": "ALL",
"HASFEES": "false",
"GAS": "8",
"BOOSTPERCENT": "30",
"GASLIMIT": "1000000"

}
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions