Skip to main content

Client to get a crypto newsfeed in your app from the CryptoControl API

Project description

CryptoControl Crypto News API

Official Python client for the CryptoControl.io API. The CryptoControl python client lets developers access rich formatted articles from cryptonews sources from all around the world.

Installation

pip install crypto-news-api

Usage

First make sure that you've recieved an API key by visiting https://cryptocontrol.io/apis. With the API key you can write the following code.

from crypto_news_api import CryptoControlAPI

api = CryptoControlAPI("API_KEY_HERE")

print(api.getTopNews())
print(api.getTopNewsByCoin("bitcoin"))

Available Functions

  • getTopNews() Get the top news articles from the CryptoControl News API.
  • getLatestNews() Get the latest news articles from the CryptoControl News API.
  • getTopNewsByCategory() Get news articles grouped by category from the CryptoControl News API.
  • getTopNewsByCoin(coinSlug: String) Get the top news articles for a specific coin from the CryptoControl API.
  • getLatestNewsByCoin(coinSlug: String) Get the latest news articles for a specific coin from the CryptoControl News API.
  • getTopNewsByCoinCategory(coinSlug: String) Get news articles grouped by category for a specific coin from the CryptoControl News API.

The coin slugs are the coin id's used from the CoinMarketCap api. You can see the full list of coins here: https://api.coinmarketcap.com/v1/ticker/?limit=2000

Sample Response from the API

[
    {
        "publishedAt": "2018-05-23T06:30:51.000Z",
        "hotness": 70698.68569444444,
        "activityHotness": 1.6,
        "primaryCategory": "General",
        "words": 302,
        "similarArticles": [
            {
                "publishedAt": "2018-05-23T03:00:05.000Z",
                "_id": "5b04de8d18f173000f9a6d72",
                "title": "PayPal: We’ll ‘Definitely Support’ Bitcoin If It Becomes ‘Better Currency’",
                "url": "https://cryptocontrol.io/r/api/article/5b04de8d18f173000f9a6d72?ref=5ac11440ec0af7be35528459"
            }
        ],
        "coins": [
            {
                "_id": "59cb59e81c073f09e76f614b",
                "name": "Bitcoin",
                "slug": "bitcoin",
                "tradingSymbol": "btc"
            }
        ],
        "_id": "5b07ea76214428000f55a513",
        "description": "Welcome to Crypto Daily™ News, this news piece \"Ripple XRP And Bitcoin Cash Now Live On Revolut\" is breaking news from the Crypto sector.",
        "title": "Ripple XRP And Bitcoin Cash Now Live On Revolut - Crypto Daily™",
        "url": "https://cryptocontrol.io/r/api/article/5b07ea76214428000f55a513?ref=5ac11440ec0af7be35528459",
        "thumbnail": "https://cryptocontrol.io/r/thumbnail/5b07ea76214428000f55a513?ref=5ac11440ec0af7be35528459",
        "originalImageUrl": "https://cryptodaily.co.uk/wp-content/uploads/2018/05/ripple-bitcoincash-credit.jpg"
    }
]

Project details


Download files

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

Files for crypto-news-api, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size crypto_news_api-1.0.5-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size crypto_news_api-1.0.5.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page