Questions tagged [pancakeswap]
62 questions
4
votes
1 answer
PancakeSwap Contract / Swaping token for another token
I want to swap some testnet bep20 tokens to busd(bep20) with pancakeswap testnet contarct through web3.
I looked into the contract but I can't get what "amountOutMin" and "path" mean.
How can I swap them with this contract?
Pancakeswap testnet…

hiro
- 41
- 4
2
votes
0 answers
Transaction has been reverted by the EVM ( PANCAKESWAP manual trade bot in js)
Guys i'm trying to do an manual trade bot in pancake for study , but i can't understand what it's wrong with my code now , i'm trying for a few days understand what is wrong but i really don't know what is happen.
const Web3 =…

Vinicius Lopes
- 21
- 1
2
votes
1 answer
How to correctly call the API endpoint with Python 3 without getting error 500?
I am following the instruction as per the API documentation and enquiring the following endpoint:
summary = 'https://api.pancakeswap.info/api/v2/summary'
However I am getting the following error:
{'error': {'code': 500, 'message': 'GraphQL error:…

Pro Girl
- 762
- 7
- 21
2
votes
0 answers
How does "bestTradeExactIn" returns value [PancakeSwap frontend]
I was trying to understand how the token swap prices are determined in PancakeSwap by looking at codes and finally got to the point where best price is calculated based on some values.
The method is below:
/**
* Given a list of pairs, and a…

Masa
- 362
- 2
- 14
2
votes
2 answers
swapExactTokensForETHSupportingFeeOnTransferTokens has a path argument, I know I have to put the token's contract address first
I want to swap a token to BNB
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
I do not know what to put on calldata path, I've…

Surface
- 21
- 1
- 4
2
votes
0 answers
PancackeswapV2Router swapExactETHForTokensSupportingFeeOnTransferTokens: 'Pancake: TRANSFER_FAILED' when "from" equals to "pancackeSwapV2pair"
PancakeSwap is driving me crazy!
I have this simple contract: when the token are transferred from someone different from the owner, instead of making the transer, swap the reveiced tokens with Bnb.
function _swapAsBnb(address from, address to,…

xyz
- 21
- 1
2
votes
0 answers
Listening to PairCreated Event on PancakeSwap's Factory Contract with DefaultProvider
I'm trying to listen to the PairCreated event on the Factory Contract of PancakeSwap s.t. I get a warning if a new token is being issued.
I basically do this:
const ethers = require('ethers');
const addresses = {
WBNB:…

xotix
- 494
- 1
- 13
- 41
2
votes
1 answer
how to listen for buy events of my bsc token?
I was just trying to create something which will listen to buy(pancakeswap) events of a specific token like SafeMoon & notify me when someone buys it on pancakeswap.
My progress so far.
The Way I Am Doing Now Is Finding Pancakeswap Pair Address Of A…

Mr. AdityaYT
- 51
- 1
- 6
1
vote
1 answer
Pancakeswap API is down
Is there an open and free alternative to using this API? It returns a 500 error right now and has been this way for a few days.
https://api.pancakeswap.info/api/v2/tokens

Tye Beach
- 21
- 3
1
vote
0 answers
how to add liquidity using smart contract?
We are trying to add liquidity using smart contract. we have deflationary tokens which charge fee on buy and sell of token. but when we are trying to addLiquidity using uniswap or pancake swap its also charging tax fee ,So to overcome this issue and…

Axat tech
- 11
- 2
1
vote
1 answer
Problem with BSC Token pricing on Pancakeswap
I kinda need help figuring out the problem here, if anyone can help its very very much appreciated!
I'm trying to test out liquidity for my own token on the Binance Smart Chain, however I'm encountering a confusing issue that I can't seem to figure…

coderpr0grammer
- 11
- 1
1
vote
0 answers
how to buy/sell bsc tokens on pancakeswap from a solidity smart contract?
I just start to learn solidity and I've finished a couple courses and I want some help to create my first working smart contract.
The smart contract I want to build will buy and sell tokens on the pancakeswap platform from a smart contract; it like…

mhamed99
- 11
- 2
1
vote
0 answers
When using swapExactTokensForTokensSupportingFeeOnTransferTokens in web3 on Pancakeswap I get no results,. It executes, but gives no error no result
I'm trying to do a swap on Pancakswap using JS and web3. I am using the swapExactTokensForTokensSupportingFeeOnTransferTokens function on the routerV2 contract.
The code in question:
let result = await…

David Pawlak
- 11
- 4
1
vote
1 answer
Web3py swap tokens path of contracts
I'm trying to swap tokens with web3py using the swapExactETHForTokensSupportingFeeOnTransferTokens function, with some tokens it works perfectly, in others I get the error "execution reverted: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT" I'm informing…

MariINova
- 323
- 4
- 15
1
vote
1 answer
web3 python getAmountsOut execution reverted
I managed to set up this function that returns the token value in USD of a contract, everything works fine in some contracts, but in other contracts I get the error "execution reverted" when calling the function "getAmountsOut" does anyone have any…

MariINova
- 323
- 4
- 15