Bitcoin Forum
June 20, 2024, 10:51:08 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How Data Feed in smart contract?  (Read 106 times)
smajbr (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 2


View Profile
April 10, 2019, 12:16:32 PM
 #1

Hello everyone, I'm needing your help: D

How can I get the ETH price data in my contract in solidity language?

I tested chainlink, until I got the testnet price, but I could not get the price to my contract.

I would get the price every time someone send or withdraw features.
Can anyone help?

Thank you.
magpie_lover
Jr. Member
*
Offline Offline

Activity: 182
Merit: 8


View Profile WWW
April 10, 2019, 03:44:13 PM
 #2

Hello everyone, I'm needing your help: D

How can I get the ETH price data in my contract in solidity language?

I tested chainlink, until I got the testnet price, but I could not get the price to my contract.

I would get the price every time someone send or withdraw features.
Can anyone help?

Thank you.

Since this is a programming related question you'll need to ask this in Stack Overflow or some other forums related to Solidity programming. Btw, have you looked at Oraclize?  Smart contracts interact with the outside world through oracles and Oraclize is a provider. They have published code for sample apps on their Github. For example, here is the Kraken Cryptocurrency Price Tracker sample app
bitmover
Legendary
*
Offline Offline

Activity: 2338
Merit: 6022


bitcoindata.science


View Profile WWW
April 10, 2019, 06:39:25 PM
 #3

Smart contracts interact with the outside world through oracles and Oraclize is a provider. They have published code for sample apps on their Github. For example, here is the Kraken Cryptocurrency Price Tracker sample app

He tested with chainlink, which is also an Oracle. I believe it´s more developed, as it has already launched a testnet and is now around40 rank on CMC.

But i believe it´s still soon for this kind of use...

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Bitcotalk
Hero Member
*****
Offline Offline

Activity: 966
Merit: 517



View Profile
April 13, 2019, 05:53:38 AM
 #4

Hello everyone, I'm needing your help: D

How can I get the ETH price data in my contract in solidity language?

I tested chainlink, until I got the testnet price, but I could not get the price to my contract.

I would get the price every time someone send or withdraw features.
Can anyone help?
I don't understand what you are trying to say, how can you get the price of eth writing a smart contract when the price of a coin is not embedded in the code of the coin but rather in the exchange were they are being traded. So what you need to do is to is to call Api from this exchange where ethereum is traded, you can try making use of coinbase because there is no way to call the price of eth from a contract code.
smajbr (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 2


View Profile
April 18, 2019, 06:47:41 AM
 #5


Oops, thanks for the answers, I got through contractfiat he gives me the ETHUSD price per hour.
for now is good, since the contract guarantees the price. Closed cap
Thanks for your help.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!