<p>Well, you have all the information you need:</p>

<ul>
<li>Compute the price of your coin 24h ago (in USD)</li>
<li>Get the price of the bitcoin 24h ago (in USD)</li>
<li>Compute how much bitcoin your coin was worth in BTC 24h ago using the two previous results</li>
<li>Compare with the current BTC value of your coin</li>
</ul>

<p>Done :)</p>

CC BY-SA 3.0
2018-04-05T05:38:03.507Z
2018-04-05T05:38:03.507Z
Continuez Jackson
<p>it's just the current difference between (e.g.)ETH/BTC at this time.</p>

CC BY-SA 3.0
2018-02-10T02:14:51.577Z
yes but where can i create a formula for that, any way to do it with the data provided?
cup_of
CC BY-SA 3.0
2018-02-09T22:44:00.993Z
2018-02-09T22:44:00.993Z
Tailer
<p>I am trying to figure out how coinmarketcap calculates the bitcoin percent change for other coins. For example on ethereum:</p>

<p><a href="https://i.sstatic.net/HOIoi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HOIoi.png" alt="enter image description here"></a></p>

<p>I'm trying to figure out how they calculate that bottom BTC percent change 3.85%.</p>

<p>Their api (<a href="https://api.coinmarketcap.com/v1/ticker/?limit=100" rel="nofollow noreferrer">https://api.coinmarketcap.com/v1/ticker/?limit=100</a>) spits out this data:</p>

<pre><code>{
    "id": "bitcoin", 
    "name": "Bitcoin", 
    "symbol": "BTC", 
    "rank": "1", 
    "price_usd": "8397.08", 
    "price_btc": "1.0", 
    "24h_volume_usd": "8190950000.0", 
    "market_cap_usd": "141531834530", 
    "available_supply": "16854887.0", 
    "total_supply": "16854887.0", 
    "max_supply": "21000000.0", 
    "percent_change_1h": "-0.51", 
    "percent_change_24h": "1.0", 
    "percent_change_7d": "-1.88", 
    "last_updated": "1518191066"
}, 
{
    "id": "ethereum", 
    "name": "Ethereum", 
    "symbol": "ETH", 
    "rank": "2", 
    "price_usd": "846.675", 
    "price_btc": "0.101377", 
    "24h_volume_usd": "3096660000.0", 
    "market_cap_usd": "82559453770.0", 
    "available_supply": "97510206.0", 
    "total_supply": "97510206.0", 
    "max_supply": null, 
    "percent_change_1h": "-0.2", 
    "percent_change_24h": "4.14", 
    "percent_change_7d": "-5.14", 
    "last_updated": "1518191052"
}
</code></pre>

<p>The first number is stated in this <code>"percent_change_24h": "4.14"</code> but they dont show how they came up with that second number ( 3.85% ).</p>

<p>Is there some formula I can create with the data they provide?</p>

<p>Thanks</p>

CC BY-SA 3.0
2018-02-11T05:32:55.350Z
Welcome to Bitcoin.SE! I see you already have experience in other SE sites so I will leave you to it.
Willtech
<api>
Based on the coinmarket cap api, how do they calculate the bitcoin percent change
cup_of
# Based on the coinmarket cap api, how do they calculate the bitcoin percent change

(Asked by: username_0 on 2018-02-09)

I am trying to figure out how coinmarketcap calculates the bitcoin percent change for other coins. For example on ethereum:

[![enter image description here](https://i.sstatic.net/HOIoi.png)](https://i.sstatic.net/HOIoi.png)

I'm trying to figure out how they calculate that bottom BTC percent change 3.85%.

Their api (<https://api.coinmarketcap.com/v1/ticker/?limit=100>) spits out this data:

```
{
    "id": "bitcoin", 
    "name": "Bitcoin", 
    "symbol": "BTC", 
    "rank": "1", 
    "price_usd": "8397.08", 
    "price_btc": "1.0", 
    "24h_volume_usd": "8190950000.0", 
    "market_cap_usd": "141531834530", 
    "available_supply": "16854887.0", 
    "total_supply": "16854887.0", 
    "max_supply": "21000000.0", 
    "percent_change_1h": "-0.51", 
    "percent_change_24h": "1.0", 
    "percent_change_7d": "-1.88", 
    "last_updated": "1518191066"
}, 
{
    "id": "ethereum", 
    "name": "Ethereum", 
    "symbol": "ETH", 
    "rank": "2", 
    "price_usd": "846.675", 
    "price_btc": "0.101377", 
    "24h_volume_usd": "3096660000.0", 
    "market_cap_usd": "82559453770.0", 
    "available_supply": "97510206.0", 
    "total_supply": "97510206.0", 
    "max_supply": null, 
    "percent_change_1h": "-0.2", 
    "percent_change_24h": "4.14", 
    "percent_change_7d": "-5.14", 
    "last_updated": "1518191052"
}

```

The first number is stated in this `"percent_change_24h": "4.14"` but they dont show how they came up with that second number ( 3.85% ).

Is there some formula I can create with the data they provide?

Thanks

**Tags:** api

> **Comments:**
> **username_1**: Welcome to Bitcoin.SE! I see you already have experience in other SE sites so I will leave you to it.  

---

## 2 answers

### Answer by username_2 on 2018-04-05. Score: 2 | Accepted answer

Well, you have all the information you need:

* Compute the price of your coin 24h ago (in USD)
* Get the price of the bitcoin 24h ago (in USD)
* Compute how much bitcoin your coin was worth in BTC 24h ago using the two previous results
* Compare with the current BTC value of your coin

Done :)


---

### Answer by username_3 on 2018-02-09. Score: 0

it's just the current difference between (e.g.)ETH/BTC at this time.

> **Comments:**
> **username_0**: yes but where can i create a formula for that, any way to do it with the data provided?  

---

