Get Uniswap V2 Spot Token Price with Code | Uniswap V2, SwapRouter & EthersJS
HTML-код
- Опубликовано: 7 сен 2024
- Get my free EthersJS cheatsheet to master Web3!
👉 blockman-codes...
------------------------------------------
Courses:
👉 Build a Uniswap V3 interface that can do swaps: bit.ly/3JkXYqL
------------------------------------------
How do you get the swap price for a token pair on Uniswap V2 with code?
We can do it with a few lines of code using Uniswap V2's SwapRouter contract and EthersJS.
We'll cover it in this tutorial.
Learn to use all of Uniswap's swap and liquidity functionality with code. bit.ly/3JkXYqL
where can we access this code ?, no github link
when u click a link how that opens in new tab any extension you are using??
do i get it the real-time price?
it is giving wrong output values for larger amount of input token
great work! I found that its pretty slow to query token price via API with smart token price. Is there a way to speed up?
and does your queried token price match with what is shown in UI?
The UI price incorporates split routes and multi-hops, so unlikely to get exactly that value when checking the price on a single pool.
Slow requests when querying a contract likely due to the node provider. Infura is usually good though. Unless you're talking about querying the subgraph
Great work 👍 can you make video on how we can interact with deployed smart contract through forking
Yes. Adding to my todo list
Make a video on getting tax of a token by simulating using hardfork like hardhat or ganache in uniswap v2.
Can you give me a specific example you'd like me to cover?
Hello, make please similar tutorial about pancakeSwap V3 🙏
Added to my todo list
Hello, i want to enroll on your course on teachable. But i dont have credit card. Can u activate paypal payment?
Also how to contact you sir, discord invitation on ur channel expired
I've now activated paypal. Let me know if it still doesn't work
@@blockmancodes i just enrolled sir. So far its a good course. Can't wait until it fully completed.
Btw will u add features like yield farming. I mean like cake token on pancakeswap