Skip to main content

cryptodatapi

Crypto API Python Package Version

Python library for integrating with Crypto API functionality.

Requirements

Python 2.7 and later.

Setup

You can install this package by using the pip tool and installing:

$ pip install cryptodatapi

Or:

$ easy_install cryptodatapi

Usage Example

import cryptodatapi
from dotenv import load_dotenv
import os

## Loads environment variables from .env
load_dotenv('.env')

username = os.getenv('_USERNAME')
password = os.getenv('_PASSWORD')

## Authentication
cryptodatapi.login(username, password)

## Retrieve All Cryptocurrency Prices
cryptoPrices = cryptodatapi.get_crypto_price()
print(cryptoPrices)

## Retrieve Cryptocurrency Price by ID
cryptoPriceByID = cryptodatapi.get_crypto_price(id='<insert unique id>')
print(cryptoPriceByID)

## Retrieve Bitcoin Price
cryptoPrice = cryptodatapi.get_crypto_price(sym='BTC')
print(cryptoPrice)

## Retrieve All Cryptocurrency Top Gainers
cryptoGainers = cryptodatapi.get_gainers()
print(cryptoGainers)

## Retrieve Cryptocurrency Top Gainers by ID
cryptoGainersByID = cryptodatapi.get_gainers(id='<insert unique id>')
print(cryptoGainersByID)

## Retrieve All Cryptocurrency Top Losers
cryptoLosers = cryptodatapi.get_losers()
print(cryptoLosers)

## Retrieve Cryptocurrency Top Losers by ID
cryptoLosersByID = cryptodatapi.get_losers(id='<insert unique id>')
print(cryptoLosersByID)

## Retrieve All Cryptocurrency 2021 Historical Prices
cryptoHistorical2021 = cryptodatapi.get_hist_price_2021()
print(cryptoHistorical2021)

## Retrieve Cryptocurrency 2021 Historical Prices by ID
cryptoHistorical2021ByID = cryptodatapi.get_hist_price_2021(id='<insert unique id>')
print(cryptoHistorical2021ByID)

## Retrieve All Cryptocurrency 2022 Historical Prices
cryptoHistorical2022 = cryptodatapi.get_hist_price_2022()
print(cryptoHistorical2022)

## Retrieve Cryptocurrency 2022 Historical Prices by ID
cryptoHistorical2022ByID = cryptodatapi.get_hist_price_2022(id='<insert unique id>')
print(cryptoHistorical2022ByID)

## Retrieve All Cryptocurrency Derivatives Exchanges
cryptoDerivatives = cryptodatapi.get_derivatives()
print(cryptoDerivatives)

## Retrieve Cryptocurrency Derivatives Exchanges by ID
cryptoDerivativesByID = cryptodatapi.get_derivatives(id='<insert unique id>')
print(cryptoDerivativesByID)

## Retrieve All Cryptocurrency Decentralized Exchanges
cryptoDecentralized = cryptodatapi.get_dex()
print(cryptoDecentralized)

## Retrieve Cryptocurrency Decentralized Exchanges by ID
cryptoDecentralizedByID = cryptodatapi.get_dex(id='<insert unique id>')
print(cryptoDecentralizedByID)

## Retrieve All Cryptocurrency Lending Exchanges
cryptoLending = cryptodatapi.get_lending()
print(cryptoLending)

## Retrieve Cryptocurrency Lending Exchanges by ID
cryptoLendingByID = cryptodatapi.get_lending(id='<insert unique id>')
print(cryptoLendingByID)

## Retrieve All Cryptocurrency Spot Exchanges
cryptoSpot = cryptodatapi.get_spot()
print(cryptoSpot)

## Retrieve Cryptocurrency Spot Exchanges by ID
cryptoSpotByID = cryptodatapi.get_spot(id='<insert unique id>')
print(cryptoSpotByID)

## Retrieve All Cryptocurrency News
cryptoNews = cryptodatapi.get_news()
print(cryptoNews)

## Retrieve Cryptocurrency News by ID
cryptoNewsByID = cryptodatapi.get_news(id='<insert unique id>')
print(cryptoNewsByID)

Setting up an Crypto API Account

Sign up for a self-service user account.

Using the Crypto API

You can read the API documentation to understand what’s possible with the Crypto API. If you need further assistance, don’t hesitate to contact us.

License

This project is licensed under the MIT License.

Metadata

Release files for cryptodatapi 1.0.4

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

Source distribution (sdist)

Source distribution for cryptodatapi 1.0.4
File Size Uploaded Provenance Actions
cryptodatapi-1.0.4.tar.gz 6.9 kB Without provenance Details for cryptodatapi-1.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 16.2 kB

Release files / cryptodatapi-1.0.4.tar.gz

Download URL cryptodatapi-1.0.4.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1f610d890ae70df1ffbfc89429675b211b35f77aeedd36d4f8ab875e1b0989a1
BLAKE2b-256 checksum
How to use checksums
73db7138d358111aa2ea5f38a64300411b3bca9e5900f361a0263f78db9006d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.0

Release files / cryptodatapi-1.0.4-py3-none-any.whl

Download URL cryptodatapi-1.0.4-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94b1994f6965ab71335e6ced08715e3612c6af1578675e7c5d69d5d1f816504e
BLAKE2b-256 checksum
How to use checksums
21db2db9c5f575d48a23e0d7cada600bf7f3d4fce225de31acf08db98dc5c011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.0

Security for cryptodatapi 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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