Skip to main content

Coinpaprika API client written in Python

Project description

Coinpaprika API wrapper for python

Coinpaprika API delivers free & frequently updated market data from the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.

Coinpaper.io uses the Coinpaprika API for all price-related data. The here provided wrapper for the coinpaprika API is delivered under the MIT License.

Installation:

The package is uploaded to PyPi.

pip install coinpaprika-client

Global

Get market overview data

import Coinpaprika

api_client = Coinpaprika.Client()
market_overview = api_client.global_market_overview()

Coins

List coins

import Coinpaprika

api_client = Coinpaprika.Client()
all_coins = api_client.coins()

Get coin by ID

import Coinpaprika

api_client = Coinpaprika.Client()
bitcoin = api_client.coins.with_id("btc-bitcoin")

Get twitter timeline for coin

Not more than last 50 tweets

import Coinpaprika

api_client = Coinpaprika.Client()
twitter_timeline = api_client.coins.twitter("btc-bitcoin")

Get coin events by coin ID

import Coinpaprika

api_client = Coinpaprika.Client()
events = api_client.coins.events("btc-bitcoin")

Get exchanges by coin ID

import Coinpaprika

api_client = Coinpaprika.Client()
exchanges = api_client.coins.exchanges("btc-bitcoin")

Get markets by coin ID

import Coinpaprika

api_client = Coinpaprika.Client()
markets = api_client.coins.markets("btc-bitcoin")

Get OHLC for last full day

Open/High/Low/Close values with volume and market_cap

import Coinpaprika

api_client = Coinpaprika.Client()
last_OHLC = api_client.coins.last_OHLC("btc-bitcoin")

Get historical OHLC

Open/High/Low/Close values with volume and market_cap. Request example: https://api.coinpaprika.com/v1/coins/btc-bitcoin/ohlcv/historical?start=2019-01-01&end=2019-01-20 if the last day is current day it can an change with every request until actual close of the day at 23:59:59

import Coinpaprika
from datetime import datetime, timedelta

api_client = Coinpaprika.Client()
historical_OHLC = api_client.coins.historical_OHLC(
    coin_id="btc-bitcoin",
    start=datetime.now() - timedelta(weeks=1),
    end=datetime.now(),
    limit=7,
)

Get today OHLC (can change every each request until actual close of the day at 23:59:59)

Open/High/Low/Close values with volume and market_cap for today

import Coinpaprika

api_client = Coinpaprika.Client()
todays_OHLC = api_client.coins.today_OHLC(coin_id="btc-bitcoin")

People

Get people by ID

import Coinpaprika

api_client = Coinpaprika.Client()
vitalik = api_client.people.with_id("vitalik-buterin")

Tags

List tags

import Coinpaprika

api_client = Coinpaprika.Client()
tags = api_client.tags()

Get tag by ID

import Coinpaprika

api_client = Coinpaprika.Client()
tag = api_client.tags.with_id("blockchain-service")

Tickers

Get tickers for all coins

import Coinpaprika

api_client = Coinpaprika.Client()
tickers = api_client.tickers()

Get ticker information for specific coin

import Coinpaprika

api_client = Coinpaprika.Client()
btc_ticker = api_client.tickers.for_coin("btc-bitcoin")

Get historical tickers for specific coin

import Coinpaprika
from datetime import datetime, timedelta

api_client = Coinpaprika.Client()
historical_ticker = api_client.tickers.historical_ticker_for_coin(
    coin_id="btc-bitcoin",
    start=datetime.now() - timedelta(weeks=1),
    end=datetime.now(),
    limit=1000,
    interval="1h"
)

Exchanges

List exchanges

import Coinpaprika

api_client = Coinpaprika.Client()
exchanges = api_client.exchanges()

Get exchange by ID

import Coinpaprika

api_client = Coinpaprika.Client()
binance = api_client.exchanges.with_id("binance")

List markets by exchange ID

import Coinpaprika

api_client = Coinpaprika.Client()
binance_markets = api_client.exchanges.markets("binance")

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

coinpaprika-client-1.1.2.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

coinpaprika_client-1.1.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file coinpaprika-client-1.1.2.tar.gz.

File metadata

  • Download URL: coinpaprika-client-1.1.2.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for coinpaprika-client-1.1.2.tar.gz
Algorithm Hash digest
SHA256 9c2898d2be3603f2bd43be1ea0cb59d9ff11579550ded078b02b7825c740152c
MD5 33eac477e9c109614016dbde670a13b1
BLAKE2b-256 3aab409750420bc1f93089b575aed3f803bce429d14630fc2eebe7c731cc6d74

See more details on using hashes here.

File details

Details for the file coinpaprika_client-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: coinpaprika_client-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for coinpaprika_client-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c12bf1cf787f51a57d62476bd11011b0d71ce7907c88f4ce40da55940019b66f
MD5 e8f89471a552232170c90a0d0991cf4e
BLAKE2b-256 e42f4ce1dc034a58efbfd3fb8f4a4843fe9684da9f64383bc6a2e6638b1d335d

See more details on using hashes here.

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