<p>Perhaps you can use the Python library CCXT:</p>

<p><a href="https://github.com/kroitor/ccxt" rel="nofollow noreferrer">https://github.com/kroitor/ccxt</a></p>

<p>It offers an homogeneous interface for accessing market data at different exchanges like Kraken, Coinbase, Bitstamp, etc...</p>

CC BY-SA 3.0
2017-12-25T09:04:11.410Z
2017-12-25T09:04:11.410Z
lackadaisical
<p>Here is the documentation:
<a href="https://cryptowat.ch/docs/api" rel="nofollow noreferrer">https://cryptowat.ch/docs/api</a></p>

<p><a href="https://api.cryptowat.ch/assets" rel="nofollow noreferrer">https://api.cryptowat.ch/assets</a>
This URL gives you a response with their assets, btc is also there as {"symbol":"btc","name":"Bitcoin","fiat":false,"route":"<a href="https://api.cryptowat.ch/assets/btc" rel="nofollow noreferrer">https://api.cryptowat.ch/assets/btc</a>"}</p>

<p>We can see the "route" is <a href="https://api.cryptowat.ch/assets/btc" rel="nofollow noreferrer">https://api.cryptowat.ch/assets/btc</a>
Which should give us more information: 
{"exchange":"kraken","pair":"btcusd","active":true,"route":"<a href="https://api.cryptowat.ch/markets/kraken/btcusd" rel="nofollow noreferrer">https://api.cryptowat.ch/markets/kraken/btcusd</a>"},</p>

<p><a href="https://api.cryptowat.ch/markets/kraken/btcusd" rel="nofollow noreferrer">https://api.cryptowat.ch/markets/kraken/btcusd</a>
contains information on how to get btc/usd prices etc</p>

<p>.../markets/kraken/btcusd/price
Gives following result:
{<strong>"result":{"price":7208.6}</strong>,"allowance":{"cost":864413,"remaining":7999135587}}</p>

<p>Which is the price in usd for btc on kraken.</p>

<p>In the last URL "kraken" is an asset and "btcusd" is a pair. These can be replaced with different assets(exchanges) and pairs(two currencies).</p>

<p>In order to get past history you can simply use:
<a href="https://api.cryptowat.ch/markets/kraken/btcusd/trades" rel="nofollow noreferrer">https://api.cryptowat.ch/markets/kraken/btcusd/trades</a>
Returns 50 last trades. </p>

<p>You can also pass arguments or "params" in the following way</p>

<p>.../markets/kraken/btcusd/trades?<strong>limit=100</strong></p>

<p>.../markets/kraken/btcusd/trades?<strong>since=1481663244</strong></p>

<p>Comined:</p>

<p>.../markets/kraken/btcusd/trades?<strong>limit=100&amp;since=1481663244</strong></p>

<p>This way you can get past history and all other info.</p>

CC BY-SA 3.0
2017-11-09T18:38:22.020Z
2017-11-09T18:38:22.020Z
2313112441312
<p>I am struggling to get access to the kind of information I have on cryptowat.ch. For example on Kraken there is an API, but I didn't find how to get the past history, the volume information, etc. </p>

<p>Is there any straightforward solution for this? </p>

<api><trading><python>
How to access market price from Python?
nowox
# How to access market price from Python?

(Asked by: username_0 on 2017-11-05)

I am struggling to get access to the kind of information I have on cryptowat.ch. For example on Kraken there is an API, but I didn't find how to get the past history, the volume information, etc.

Is there any straightforward solution for this?

**Tags:** api, trading, python


---

## 2 answers

### Answer by username_1 on 2017-12-25. Score: 3

Perhaps you can use the Python library CCXT:

<https://github.com/kroitor/ccxt>

It offers an homogeneous interface for accessing market data at different exchanges like Kraken, Coinbase, Bitstamp, etc...


---

### Answer by username_2 on 2017-11-09. Score: 1

Here is the documentation:
<https://cryptowat.ch/docs/api>

<https://api.cryptowat.ch/assets>
This URL gives you a response with their assets, btc is also there as {"symbol":"btc","name":"Bitcoin","fiat":false,"route":"<https://api.cryptowat.ch/assets/btc>"}

We can see the "route" is <https://api.cryptowat.ch/assets/btc>
Which should give us more information:
{"exchange":"kraken","pair":"btcusd","active":true,"route":"<https://api.cryptowat.ch/markets/kraken/btcusd>"},

<https://api.cryptowat.ch/markets/kraken/btcusd>
contains information on how to get btc/usd prices etc

.../markets/kraken/btcusd/price
Gives following result:
{**"result":{"price":7208.6}**,"allowance":{"cost":864413,"remaining":7999135587}}

Which is the price in usd for btc on kraken.

In the last URL "kraken" is an asset and "btcusd" is a pair. These can be replaced with different assets(exchanges) and pairs(two currencies).

In order to get past history you can simply use:
<https://api.cryptowat.ch/markets/kraken/btcusd/trades>
Returns 50 last trades.

You can also pass arguments or "params" in the following way

.../markets/kraken/btcusd/trades?**limit=100**

.../markets/kraken/btcusd/trades?**since=1481663244**

Comined:

.../markets/kraken/btcusd/trades?**limit=100&since=1481663244**

This way you can get past history and all other info.


---

