Skip to main content

Bitcoin current and historical price

Project description

CoinDesk API client

Powered by CoinDesk

Client written in Python3 for CoinDesk API service:

Features

  • Get Bitcoin current price
  • Get Bitcoin historical price

Getting Started

These instructions will get you a copy of the project on your local system.

Prerequisites

CoinDesk API client uses a number of open source projects to work properly:

  • furl - URL parsing and manipulation made easy
  • jsonschema - An implementation of JSON Schema validation for Python
  • requests - Python HTTP for Humans

And of course CoinDesk API client itself is open source with a public repository on GitHub.

Installation

Intall the package from Pypi using pip install -U coindesk.

Quick Start

A series of simple examples:

Get currentprice price for Bitcoin in json format

from coindesk.client import CoindeskAPIClient
api_client = CoindeskAPIClient.start('currentprice')
response = api_client.get()

Get currentprice price for Bitcoin in other currency than USD

from coindesk.client import CoindeskAPIClient
api_client = CoindeskAPIClient.start('currentprice', {'currency': 'EUR'})
response = api_client.get()

Get historical price for Bitcoin in json format

from coindesk.client import CoindeskAPIClient
api_client = CoindeskAPIClient.start('historical')
response = api_client.get()

Get historical price for Bitcoin providing optional parameters

from coindesk.client import CoinDeskAPIClient
api_client = CoindeskAPIClient.start('historical', {'start': '2018-01-01'})
response = api_client.get()

Get supported currencies to fetch Bitcoin price in

from coindesk.client import CoindeskAPIClient
api_client = CoindeskAPIClient()
supported_currencies = api_client.get_supported_currencies()

Full documentation for CoinDesk API is available at https://www.coindesk.com/api/.

License

MIT

Free Software. Hell Yeah!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coindesk-0.2.0.tar.gz (10.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page