Bitcoin Forum
November 01, 2024, 02:29:08 PM *
News: Bitcoin Pumpkin Carving Contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ShapeShift API (get usd values)  (Read 589 times)
zeflex (OP)
Full Member
***
Offline Offline

Activity: 180
Merit: 100


View Profile
July 02, 2017, 11:59:31 PM
 #1

On https://info.shapeshift.io/api I can see all methods we can use to work with their api.

Btw, I don't know what is the usd value they use for their market. The values displayed just under the form to make an exchange: https://shapeshift.io/#/coins

Any details about this ? I don't want to use other providers like poloniex or btc-e because their values are not the same than shapeshift.

Thanks.
layoutph
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 255


View Profile WWW
July 03, 2017, 01:28:02 AM
 #2

Sorry I am a designer with a little glimpse of web development. Is this what you are looking for? https://shapeshift.io/rate/usdt_btc   Browsing this page will show you Shapeshift's current rate for USDT / BTC

On https://info.shapeshift.io/api I can see all methods we can use to work with their api.

Btw, I don't know what is the usd value they use for their market. The values displayed just under the form to make an exchange: https://shapeshift.io/#/coins

Any details about this ? I don't want to use other providers like poloniex or btc-e because their values are not the same than shapeshift.

Thanks.
zeflex (OP)
Full Member
***
Offline Offline

Activity: 180
Merit: 100


View Profile
July 03, 2017, 01:51:55 AM
 #3

Nope: https://shapeshift.io/rate/btc_doge does not return usd price. It returns quantity of doges per btc.
layoutph
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 255


View Profile WWW
July 03, 2017, 04:54:13 AM
 #4

Hmm, shapeshift api doesnt provide DOGE_USD . I guess you need to create your own mathematical function that will resolve DOGE to USD.

First you need to get the value of DOGE per 1BTC by getting the value here:
https://shapeshift.io/rate/btc_doge

{
pair: "btc_doge",
rate: "1038281.25000000"
}

Now that you know the DOGE/BTC rate..

Next is to get the rate of USD to BTC by visiting https://shapeshift.io/rate/usdt_btc

{
pair: "usdt_btc",
rate: "0.00040739"
}

Just apply some math, its like converting feet to inches to centimeter

Nope: https://shapeshift.io/rate/btc_doge does not return usd price. It returns quantity of doges per btc.
zeflex (OP)
Full Member
***
Offline Offline

Activity: 180
Merit: 100


View Profile
July 03, 2017, 05:29:04 AM
 #5

https://shapeshift.io/rate/usdt_btc seems to be invalid at this moment ({"error":"That pair is temporarily unavailable for trades."}) >> But depends after F5 it could appears.

Issue is USDT is a coin (Tether) and not real USD. https://www.coingecko.com/en/price_charts/tether/usd Currently value is close to USD but if you look on 60 days chart, you can see you can't rely on USDT to make maths and get the right usd quote.
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!