Skip to main content

Questions tagged [price]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Order of tokens in Uniswap V3 pool price

I am trying to get a token price from the Uniswap V3 pool. The Uniswap V3 contract provides a slot0 field where the rate is written in two ways. (documentation) using sqrtPriceX96 and using tick Then ...
Yan's user avatar
  • 1
0 votes
1 answer
18 views

Where do the prices of token, displayed in Metamask and on Block Explorers, come from?

When you have tokens in your wallet, and view them in a wallet application like Metamask or via public block explorers like Etherscan, PolygonScan etc, you can see a dollar value for the tokens. Where ...
Alexander Herranz's user avatar
0 votes
0 answers
43 views

How to get the token prices from the uniswap v3 pools?

I have to write the solidity code to fetch the prices of token pairs from the uniswap v3 pools but I have no idea how to get the prices of the token pairs from the uniswap v3 pools to my smart ...
kumar's user avatar
  • 61
0 votes
1 answer
37 views

what am I doing wrong in getting price data from the liq pool?

import requests import json url_v3 = "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3" pools_query_v3 = """ { pools(orderBy: txCount, orderDirection: desc) { ...
Fadai Mammadov's user avatar
0 votes
1 answer
39 views

historical Ethereum trading volume data at a minute interval

I want to access historical Ethereum trading volume and price data at a minute interval for the last six months, I found daily intervals but could not find for minute interval, any suggestion to find ...
Mocak's user avatar
  • 3
1 vote
0 answers
45 views

How to calculate the weighted average price on binance?

can somebody please answer the question below? What is the weighted average trade price of the ETH/USDT SPOT trading pair on the Binance.com platform on January 1st, 2023, in UTC time, considering the ...
Haider Mansoor's user avatar
0 votes
0 answers
28 views

Safely converting 1 WEI to the current ETH/USD Chainlink price

Let c be the current floating point price of ETH/USD precise to 8 decimal places. Since Solidity cannot store floating points, getting the current price of ETH/USD from Chainlink's data feed returns c ...
nostonksafrica's user avatar
0 votes
2 answers
81 views

Calculate BPT price onchain

What's a safe way to calculate the onchain the price of a Balancer's BPT token? More specifically, from a Composable Stable Pool (if the clarification of the pool makes the calculation different). For ...
dNyrM's user avatar
  • 928
1 vote
1 answer
87 views

How to get a token price Of ERC20 token within a contract

How to get a token market price in a solidity smart contract. I want to fetch the token price in a smart contract. I have used the chainlink in the contract like this but I want the price of my erc20 ...
Mustakbil Pakistan's user avatar
0 votes
0 answers
24 views

Live Price monitor

How does dexscreener or dextools websites keep up with the price changes efficiently on thousands of tokens? Can anyone provide a sample code for that? if not, then a roadmap of steps to be taken, ...
Melardev's user avatar
  • 101
0 votes
0 answers
346 views

Got different prices from SqrtPriceX96 and from Tick on Uniswap

I trying to get price (ratio) from pool on Uniswap v3 by JS with ethers.js. But I got a slightly different prices from SqrtPriceX96 and from Tick, for some reason. SqrtPriceX96 and Tick took from '...
Yurii's user avatar
  • 1
0 votes
1 answer
22 views

value for transaction for stable price with chainlink price feed

I have an NFT marketplace contract that sells NFTs with stable price and uses chainlink aggregator for price feed. the contract code is like this: import "@chainlink/contracts/src/v0.8/...
Sepehr Mirnasrollahi's user avatar
0 votes
1 answer
24 views

Chainlink vs DEXs & NFT Market prices

I am doing a futures dApp, so I need the price of the underlying assets (all assets are on-chain not fiat). What is the difference between using DEX and NFT Marketplace on-chain prices as oracle and ...
stevealock's user avatar
2 votes
0 answers
94 views

How to simulate the price impact?

Let's say a trading firm wants to buy $5 MIL worth of SYN in Uniswap V3 pools. SYN currently has a market cap of $135 MIL. I know how to calculate the price impact if it is to purchase it all at once. ...
DankenN's user avatar
  • 31
1 vote
1 answer
40 views

What exactly is 'supply' on the 'supply vs demand' equation to determine the price of a token?

We know that the price of a token is always a balance between supply and demand. Whenever I check what supply is, I get vague definitions. So I would like to hear your opinions about what exactly ...
pellyadolfo's user avatar
2 votes
1 answer
130 views

how to peg an ERC20 token to a stipulated price in other to make it a stablecoin [duplicate]

I'm new into blockchain development and currently challenging myself to create a stablecoin. I have created an ERC20 token but I don't know how to peg the price to the desired price. Please can anyone ...
Syre Musk's user avatar
1 vote
0 answers
55 views

How can I get a sense of slippage before committing to the transaction?

Of course, as we all know, determining slippage for a certainty is impossible. I've done my best in my code to reduce my impact on slippage, finding the largest amount across the two pools in my ...
Trent Kennelly's user avatar
0 votes
1 answer
46 views

How to determine ETH price of ERC20 token using my own full node?

So I have a contract address of an ERC20 token and I have direct access to a full node. I want to determine the price of that token in ETH without making any external API calls and just by using my ...
jafarlihi's user avatar
  • 111
1 vote
1 answer
312 views

Tiny Uniswap amounts cause enormous price impact

When exchanging the smallest possible amount of USDC/WETH - 0.000001 USDC - on Uniswap V3 the price impact soars to 99.95%. Is this accurate, or is this an error in price impact estimation? Why is ...
Voy's user avatar
  • 123
0 votes
1 answer
613 views

Where can I find historical data on call options for Ethereum?

I am trying to find historical data on call option for Ethereum and Bitcoin. I've had no luck finding it. So far I've only been able to get current option prices and onwards. Does anyone know where or ...
madamepresident's user avatar
0 votes
0 answers
104 views

getting the wrong price with getReserves()

I'm attempting to make a function that can give back the price of a token in WETH. however, the price I get back is a massive number and can't be correct. i'm getting an output of ...
Patrick W. McMahon's user avatar
-1 votes
1 answer
57 views

OpenSea - Set fix price on contract

I need to set fix price for an NFT on OpenSea programmatically. How can I set a price for an NFT of a collection by interacting with the OpenSea contract and what is the OpenSea contract address on ...
user66732's user avatar
  • 455
0 votes
2 answers
162 views

How can I download Ethereum transaction list?

I would to some research on how based on the average price one can trade with Ethereum. But I need public transaction prices. How can I get them? The minute-based price list or even hour is ok. I ...
János's user avatar
  • 113
0 votes
0 answers
117 views

explain get chainlink VRF fee cost

Hi can somebody explain to me every variable and operator of this function
Dũng Đàm's user avatar
1 vote
1 answer
66 views

How to get ether amount from state change of a ERC-721 transaction? (web3 py)

I am looking at this NFT token transfer: https://etherscan.io/tx/0xe20b03eaa2ec1062dcdda2057b604a8d5f38b2f863342675c6fe38f8d6324a6c/advanced#statechange When I fetch the transaction, it only returns ...
Yasserius's user avatar
0 votes
1 answer
167 views

Update Mint Price function of my Smart Contract on the Frontend

Good morning! My Smart Contract has a function to update the price once totalSupply reach 2000 tokens minted. I added a function in the front end but i think is not clean at all. Works well on my Dapp ...
edis3's user avatar
  • 35
2 votes
0 answers
272 views

Add a dynamic nft mint price

Good afternoon family! i need help! I'm launching my ERC721A collection very soon, and i need to add a function, just to set different prices on the PUBLIC sale. Let me explain... I will have Freemint(...
edis3's user avatar
  • 35
1 vote
0 answers
78 views

How is the current price on Uniswap v3 computed?

My current understanding is that the current price is a state variable on a given pool (and it maps one to one to the current tick and the sqrtPriceX96 variable. How is it set and updated though? It ...
Marius Zoican's user avatar
1 vote
1 answer
39 views

Why is the gas price so low even though daily transactions have not decreased

The Ethereum gas price is currently about 6 gwei, the lowest I've seen it in a very long time. It was over 100 gwei most of the time for over a year I think. However daily transactions on the network ...
Mikhail Janowski's user avatar
0 votes
1 answer
409 views

Dynamic Price using Chanilinks Price aggregator?

Essentially what I am trying to achieve is a dynamic price to be used for a erc721 contract. The idea is to use chainlinks price aggregator to call eth/usd price and dividing a set usd value by the ...
j_Frost's user avatar
0 votes
2 answers
384 views

How to create an Erc721 contract with fixed dollar price per token (eg. 1 nft should always cost 200$, irrespective of the ether price)

I'm creating an Erc721a contract and I want to set the price of my tokens to 200$, and for that I used chanlink's aggregator v3 interface which returns the dollar value, but how should I use this ? If ...
Priyanshu Jain's user avatar
0 votes
2 answers
569 views

StableSwap invariant and price computation

Having issue reproducing the price Curve.fi propose for swaping tokens. Let's take tricrypto2 pool for example. As I'm writing this, the actual balance of the pool is the following: I'm trying to re-...
loyd.f's user avatar
  • 1
0 votes
1 answer
125 views

0x API showing a different price than what is shown on matcha.xyz

When I run the below it shows a price that is different from what I see on matcha. Trying to figure out how the price on matcha is derived. https://api.0x.org/swap/v1/quote?buyToken=ETH&sellToken=...
user100446's user avatar
0 votes
1 answer
126 views

If Chainlinks price feeds are free to consume, what is the point of requesting data directly from node operators?

If Chainlinks price feeds are free to consume, what is the point of requesting data directly from node operators which would cost LINK? Do platforms such as DEXs or lending platforms like AAVE pay to ...
Druu's user avatar
  • 1
1 vote
1 answer
314 views

Uniswap exchanges at wrong price?

The current state of WETH-DAI pool on Ropsten is (33796288305479532646, 31012471784612084535765) with it 0.01% fee. So, 1 WETH = 917 DAI. Why Uniswap exchanges the pair at 1 WETH : 494 DAI ?
notooth's user avatar
  • 93
0 votes
3 answers
2k views

Add a price for minting an NFT

I attempting to implement an NFT minter into my application, but want to set prices for minting an NFT. I'm using a smart contract template I found but haven't been able to figure out how to set ...
beagle's user avatar
  • 1
0 votes
1 answer
198 views

Fetching token prices using Swap/v1/quote API responds wrong price on avalanche chain?

Using the following query and conversion for bsc and eth respectively works: https://bsc.api.0x.org/swap/v1/quote?buyToken=${contractAddress}&sellToken=WBNB&sellAmount=10000000000000000000 ...
Mike V.'s user avatar
0 votes
1 answer
513 views

Most secure way to get ERC20 token price in Solidity (Polygon network) [duplicate]

I'm building infrastructure for a blockchain game where users can spend ERC20 tokens to buy tickets whose prices are $0.25, $0.5, $1, etc. For that, I need to get ERC20 token current price in ...
MantasFam's user avatar
  • 347
0 votes
0 answers
24 views

How can i get & Store all Pancakeswap chart deta?

I want to create my own dex! Not forking, in smart contract i added some new system,so now i want to know how can i store chart deta and show this on Front, Daily / monthly chart anyone have idea how ...
SayedEx's user avatar
0 votes
1 answer
694 views

Error 'Gas price lower than required' meaning

I'm noob in crypto and especially in ETH. I tried to pay with Metamask and received Fail with error 'Gas price lower than required' https://etherscan.io/tx/...
max.anikin's user avatar
0 votes
1 answer
74 views

Getting Error when Get Pricing of Ethereum

I am new to Solidity. I took a course from freeCodeCamp. My problem is that I wrote a function whose goal is to get ETH price from ChainLink. However, whenever I work this, it says that execution ...
Recep Çankaya's user avatar
0 votes
1 answer
517 views

How to get historical price from Chainlink price

I want to check the price at a previous timestamp, and I see I can use the getHistoricalPrice function . * Returns historical price for a round id. * roundId is NOT incremental. Not all ...
HallonDev's user avatar
0 votes
0 answers
18 views

BEP-20 token price in usd [duplicate]

how can I get BEP-20 token usd price in smart contract, if it is in pair with BNB. Should i create an oracle?
Андрей Барабанов's user avatar
2 votes
0 answers
399 views

The most reliable way to get ERC20 token price

What is the most reliable way to get ERC20 token price? I'm thinking about using Coingecko API, but not sure if it's safe to use in the production environment. Another way to get the token price is to ...
MantasFam's user avatar
  • 347
0 votes
1 answer
280 views

Division error getting token value with too many decimals

I am using the method below to get the value of a token, it works very well when the token value is not something very low like $0.000004101, the problem is in the division of the wBNB / TOKEN reserve,...
Dark Ducke's user avatar
0 votes
1 answer
134 views

Error getting a token price too low

I have the function below that gets the value of a token on the BSC network, but when the token has a very low value, Ex: $0.0000002010 the function cannot get the correct value of the token, it ...
MariINova's user avatar
  • 101
1 vote
1 answer
104 views

Why most of tokens get a quick ATH after launch and then collapse in price?

If you observe the price profile on almost any token (eg in coingecko), you will see a quick peak to ATH soon after the launch, and then, a quick collapse to a mostly flat profile near zero. Any ...
pellyadolfo's user avatar
0 votes
1 answer
154 views

how to solve this problem

https://api.0x.org/swap/v1/price?sellToken=WETH&buyToken=WNXM&sellAmount=1000000000000000000 {"code":100,"reason":"Validation Failed","validationErrors":...
LALALA LA's user avatar
0 votes
0 answers
235 views

Transaction HexBytes('0x5b167dc993642d75287b01d906cdaf287efd3ee726fyg65fyihihiihy687guiyguygtf5uuttytfytfytd') is not in the chain, after 120 seconds

import json from web3 import Web3 In the video, we forget to install_solc from solcx import compile_standard from solcx import compile_standard, install_solc import os from dotenv import load_dotenv ...
Abed ja'fari's user avatar
2 votes
2 answers
2k views

How can I get access to token price data at a specific block?

Apologies if this is a daft question but from some searching on Google I'm not able to find the answers I'm looking for (maybe I'm not searching for the right thing). I want to be able to access the ...
user9754798's user avatar