pancaketrade icon indicating copy to clipboard operation
pancaketrade copied to clipboard

[Request] Support Fiat for base

Open geeks121 opened this issue 2 years ago • 18 comments

Switchable base instead using BNB, can be edit in telegram dialog, BUSD, USDT, DAO etc btw great project, thanks to make it public

geeks121 avatar Aug 26 '21 05:08 geeks121

Hi there. This is something I want to add eventually, but I have to think how best to do it when a coin has multiple pairs available. For now the bot is basic and always uses the direct pair with BNB, and is unable to trade using other tokens. I wonder if the user would need to decide when adding the token, if they want to see the price and trade on the BNB or BUSD pair for example. Because each pair can potentially offer a different price.

The really smart thing to do would be to implement a full router to decide the best swaps but I'm not ready to implement this, so I think it will have to be fixed to a single pair. I can imagine that the user could add each token more than once and use a different pair on each, so they can choose which currency they want to trade against by selecting the relevant token entry. Or the bot could show the price of each pair on the same token entry and ask the user which one they want to use when buying/selling.

beeb avatar Aug 30 '21 13:08 beeb

The develop branch currently has added support for BUSD token pairs. The bot will still always buy with BNB and sell for BNB but it can route the swap through the BUSD pair:

  • BNB -> BUSD -> token
  • token -> BUSD -> BNB

in case this is more profitable than using the BNB pair directly.

beeb avatar Sep 30 '21 15:09 beeb

hi thank you for added the FIAT Pair,, the reason why i ask for FIAT is to make it easy how much profit is in USD ,, for BNB i should make convert manually,, with this feature i can easy how much is the profit in usd.. thanks again,, i'll donate when profit using this bot ..

geeks121 avatar Oct 01 '21 08:10 geeks121

Thanks Beep, this is an awesome framework.. great work

So if I want to trade only single pair say BUSD-rUSD. Can I change the base pair(BNB) token address to BUSD and achieve. Or do I need to change the router address as well.

Thanks Ujesh

ujesh-t avatar Oct 05 '21 19:10 ujesh-t

hi thank you for added the FIAT Pair,, the reason why i ask for FIAT is to make it easy how much profit is in USD ,, for BNB i should make convert manually,, with this feature i can easy how much is the profit in usd.. thanks again,, i'll donate when profit using this bot ..

Hey! The bot will show you the position value in USD pretty much everywhere. All BNB values are converted to USD in parentheses so you can assess your profit this way.

beeb avatar Oct 06 '21 05:10 beeb

Thanks Beep, this is an awesome framework.. great work

So if I want to trade only single pair say BUSD-rUSD. Can I change the base pair(BNB) token address to BUSD and achieve. Or do I need to change the router address as well.

Thanks Ujesh

Hey there. It's currently not possible to directly trade with BUSD. If you change the BNB token address, the bot will fail because it will use the wrong methods from the PancakeSwap router (which should be used with BNB). The router address should never be changed. The bot is hardcoded to use BNB as base currency for buying tokens, and sells tokens to get BNB back. Only the path to get there now includes BUSD liquidity, where previously this was not the case.

beeb avatar Oct 06 '21 05:10 beeb

Thanks for the info @beeb, I got your point. Since we are using swapExactETHForTokensSupportingFeeOnTransferTokens method it will always swap to BNB. Let me do some research and try changing it with swapExactTokensForTokens method. It will be tough for me as I am new to these.

ujesh-t avatar Oct 06 '21 06:10 ujesh-t

image Made the bot to sell on BUSD-rUSD pair, buying needs more code change though as buying uses balance of BNB directly for calculations.

Thanks for the pointers @beeb

ujesh-t avatar Oct 06 '21 16:10 ujesh-t

Hello.

Congratulations on the excellent work. I hope to be able to contribute soon.

I installed the latest version (v0.6.0), but there is no buy/sell option in BUSD. Is there any configuration to be done?

devaex avatar Oct 16 '21 18:10 devaex

Hi @beeb thank you for your amazing work. I am currently trading a coin manually and it would be awesome to have some assistance in the form of your bot. The issue I have been stumbling upon is that BNB is the main pair and it affects the price a lot. Like the people above I would love a USDT main pair, could I help or make a donation towards resources for the change?

Max-pkt avatar Oct 16 '21 22:10 Max-pkt

Hi @devaex please read the release notes. There is no manual option to buy using BUSD, the bot still uses BNB to buy, but uses the BUSD liquidity to get the best price.

@Max-pkt which token are you talking about? Do you mean that USDT is the largest liquidity pair for that token?

beeb avatar Oct 18 '21 05:10 beeb

Ok, I got it.

And is there any way to trigger the order limit by the value in BUSD?

As the BNB price varies, the order limit can be executed by the variation of the BNB and not the currency itself.

For example, buy cake if it drops to 0.040 BNB. The order can be executed because the BNB went up and not because CAKE went down.

devaex avatar Oct 18 '21 16:10 devaex

And is there any way to trigger the order limit by the value in BUSD?

No this is not possible at the moment.

beeb avatar Oct 25 '21 16:10 beeb

@devaex the ability to set orders using dollar prices instead of BNB prices is available as preview in the (unstable) develop branch. Will be included in the next release.

As for using a different base token than BNB for buying and selling, this will require some more rework and might need to wait for 1 or 2 more releases.

beeb avatar Feb 03 '22 07:02 beeb

@devaex the ability to set orders using dollar prices instead of BNB prices is available as preview in the (unstable) develop branch. Will be included in the next release.

As for using a different base token than BNB for buying and selling, this will require some more rework and might need to wait for 1 or 2 more releases.

Thank you!! Your project will pump after your implementing of BUYING and SELLING with BUSD

Eg: 10 BUSD => X SPG (Space Crypto) X SPG => 10 BUSD

And if there are a middle token (like WBNB), automatically detect and pass through:

10 BUSD => WBNB => X SPG (Space Crypto) X SPG => WBNB => 10 BUSD

This will be the most exciting release cause BNB prices can drops and leaving our money there is not always a good idea (some trading opportunities happen suddenly and if we need to swap first to bnb could not be great)

But great job, great project!

felipe-douradinho avatar Feb 19 '22 13:02 felipe-douradinho

Thanks for the comment. This is on the roadmap but will be more complex to implement. And most likely people will have to select 1 token they'd like to use for buying, and stick to it for all their positions. But it will get implemented eventually.

beeb avatar Feb 19 '22 15:02 beeb

This will be perfect if i could use BUSD instead of BNB as base, the pair i trade only has liquidity in BUSD and routing through BNB gives you very bad prices on this pair. Thanks for your awesome work!

robertogalan avatar Mar 30 '22 05:03 robertogalan

This will be perfect if i could use BUSD instead of BNB as base, the pair i trade only has liquidity in BUSD and routing through BNB gives you very bad prices on this pair. Thanks for your awesome work!

This is planned in the future, but for now you should still get a good price even when buying with BNB, because pancakeswap will first swap your BNB to BUSD and then buy tokens with the BUSD liquidity. The only downside is that you pay the liquidity provider fee twice (0.25%)

beeb avatar Mar 30 '22 06:03 beeb