Skip to main content

Python API for coinmarketcap.com.

Project description

coinmarketcap is an APACHE licensed library written in Python designed to provide a simple to use API for coinmarketcap.

Installation:

From source use

$ python setup.py install

or install from PyPi

$ pip install coinmarketcap

API Documentation:

This API can currently retrieve the following data from coinmarketcap:

  • ``GET /v1/ticker/``

  • ``GET /v1/ticker/currency``

>>> from coinmarketcap import Market
>>> coinmarketcap = Market()
>>> coinmarketcap.ticker(<currency>)
[
    {
        id: "bitcoin",
        name: "Bitcoin",
        symbol: "BTC",
        rank: 1,
        price_usd: 448.66,
        24h_volume_usd: 84396000,
        market_cap_usd: 6946212888,
        available_supply: 15482200,
        total_supply: 15482200,
        percent_change_1h: 0.47,
        percent_change_24h: -1.61,
        percent_change_7d: 1.25
    },
    {
        id: "ethereum",
        name: "Ethereum",
        symbol: "ETH",
        rank: 2,
        price_usd: 7.28,
        24h_volume_usd: 13419600,
        market_cap_usd: 578917949,
        available_supply: 79512085,
        total_supply: 79512085,
        percent_change_1h: 0.21,
        percent_change_24h: -6.51,
        percent_change_7d: -14.64
    },

    ...
]
  • ``GET /v1/global/``

>>> coinmarketcap.stats()
{
    total_market_cap_usd: 8280726727,
    total_24h_volume_usd: 108644044,
    bitcoin_percentage_of_market_cap: 81.77,
    active_currencies: 690,
    active_assets: 57,
    active_markets: 1902
}

License:

Apache v2.0 License
Copyright 2014-2016 Martin Simon

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

Buy me a coffee?

If you feel like buying me a coffee (or a beer?), donations are welcome:

WDC : WbcWJzVD8yXt3yLnnkCZtwQo4YgSUdELkj
HBN : F2Zs4igv8r4oJJzh4sh4bGmeqoUxLQHPki
DOGE: DRBkryyau5CMxpBzVmrBAjK6dVdMZSBsuS

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

coinmarketcap-2.0.1.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file coinmarketcap-2.0.1.tar.gz.

File metadata

  • Download URL: coinmarketcap-2.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for coinmarketcap-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e72736bdca90e25686e291d2d1c5e85e9f53fe368392def4e5ef8f032d755d5d
MD5 77141a2cca919f517855b1fd738d7e4b
BLAKE2b-256 c2d0c0e07dd23278b8d0515c8c8d5b7712512350f14833e5818b09e1eeca4790

See more details on using hashes here.

Supported by

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