Skip to main content

CoinMarketCap API

License

Unofficial Python wrapper around the CoinMarketCap API

Installation

PyPI

Use the following command to install:

  • pip install CoinMktCap

Source Code

  •  git clone https://github.com/sarthakkimtani/CoinMktCap.git
     cd CoinMktCap
     python setup.py install
    

Example

  from CoinMktCap import CoinMarketCap
  
  market = CoinMarketCap("API_KEY")
  eth = market.cryptocurrency_info(symbol="ETH")
  
  something(eth.data)

Methods

Pass the required parameters for each endpoint. Refer the docs

Method Definition Endpoint
cryptocurrency_map Map of all currencies /cryptocurrency/map
cryptocurrency_info Info of specified currency /cryptocurrency/info/
cryptocurrency_latest_listings Active cryptocurrencies with latest market data /cryptocurrency/listings/latest
cryptocurrency_historical_listings Cryptocurrencies for a historical UTC date /cryptocurrency/listings/historical
cryptocurrency_latest_quotes Latest market quote for 1 or more cryptocurrencies /cryptocurrency/quotes/latest
cryptocurrency_historical_quotes Historic market quotes for any cryptocurrency /cryptocurrency/quotes/historical
cryptocurrency_market_pairs Active market pairs for given cryptocurrency /cryptocurrrency/market-pairs/latest
cryptocurrency_latest_ohlcv Latest OHLCV (Open, High, Low, Close, Volume) /cryptocurrency/ohlcv/latest
cryptocurrency_historical_ohlcv Historical OHLCV (Open, High, Low, Close, Volume) /cryptocurrency/ohlcv/historical
exchange_map List of all active cryptocurrency exchanges /exchange/map
exchange_info Static metadata for one or more exchanges /exchange/info
exchange_latest_listings List of all cryptocurrency exchanges /exchange/listings/latest
exchange_historical_listings Historic market quotes for any exchange /exchange/listings/historical
exchange_latest_quotes Latest aggregate market data for 1 or more exchanges /exchange/quotes/latest
exchange_historical_quotes Historic quotes for any exchange /exchange/quotes/historical
exchange_market_pairs Market pairs for a given exchange /exchange/market-pairs/latest
global_metrics_latest Latest global cryptocurrency market metrics /global-metrics/quotes/latest
global_metrics_historical Historical global cryptocurrency market metrics global-metrics/quotes/historical
price_conversion_tool Convert an amount of one cryptocurrency or fiat currency tools/price-conversion
blockchain_latest Latest blockchain statistics blockchain/statistics/latest
fiat_map Mapping of all supported fiat currencies fiat/map
key_info API key details key/info

Properties

  • data (dict): will give you the result.
  • status (dict): the status object always included for both successful calls and failures.
  • timesamp (str): current time on the server when the call was executed.
  • error_code (str | None): In case of an error has been raised, this property will give you the status error code.
  • error_message (str | None): In case of an error has been raised, this property will give details about error.

License

MIT License

Metadata

Release files for CoinMktCap 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CoinMktCap 0.1.0
File Size Uploaded
CoinMktCap-0.1.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CoinMktCap 0.1.0
File Interpreter ABI Platform
CoinMktCap-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / CoinMktCap-0.1.0.tar.gz

Download URL CoinMktCap-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c89fbc0d60a5f866de59d655531b8acf9cbb9d9056bcbd47fc5dc3ddbfdf9eb0
BLAKE2b-256 checksum
How to use checksums
02af72cc2de28effbd4878088bbb2e39102b3d731bd0810627738de5216676b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

Release files / CoinMktCap-0.1.0-py3-none-any.whl

Download URL CoinMktCap-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8efb6d8dea0f85bec4972d48ee29b54ad83fdc25c95a06d8849209646e2b592
BLAKE2b-256 checksum
How to use checksums
7a4357cbb36cba0c69619dff4a5681101734535bbfe26e5e1e05f1c762ae92fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page