Skip to main content

Unofficial Python client for Coinglass API

Project description

Coinglass API

PyPi version Python 3.10 Python 3.11

Unofficial Python client for Coinglass API

Wrapper around the Coinglass API to fetch data about the crypto markets. All data is output in pandas DataFrames (single or multi-index).

Note: This is work in progress. Currently only supports the indicator API endpoint.

Example Plot

Installation

pip install coinglass-api

Usage

from coinglass_api import CoinglassAPI

cg = CoinglassAPI(api_key="abcd1234")

# Funding rate of ETH on dYdX
fr_btc_dydx = cg.funding(ex="dYdX", pair="ETH-USD", interval="h8")

# Get average funding for BTC
fr_avg_btc = cg.funding_average(symbol="BTC", interval="h4")

# Get funding OHLC for ETHUSDT on Binance
fr_ohlc_eth_binance = cg.funding_ohlc(ex="Binance", pair="ETHUSDT", interval="h4")

# Get aggregated OI OHLC data for BTC
oi_agg_eth = cg.open_interest_aggregated_ohlc(symbol="ETH", interval="h4")

# Get OHLC liquidations data for ETHUSDT on dYdX
liq_ohlc_eth_dydx = cg.liquidation_pair(ex="dYdX", pair="ETH-USD", interval="h4")

# Get liquidation data for BTC
liq_btc = cg.liquidation_symbol(symbol="BTC", interval="h4")

# Get long/short ratios for BTC
lsr_btc = cg.long_short_symbol(symbol="BTC", interval="h4")

Disclaimer

This project is for educational purposes only. You should not construe any such information or other material as legal, tax, investment, financial, or other advice. Nothing contained here constitutes a solicitation, recommendation, endorsement, or offer by me or any third party service provider to buy or sell any securities or other financial instruments in this or in any other jurisdiction in which such solicitation or offer would be unlawful under the securities laws of such jurisdiction.

Under no circumstances will I be held responsible or liable in any way for any claims, damages, losses, expenses, costs, or liabilities whatsoever, including, without limitation, any direct or indirect damages for loss of profits.

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

coinglass_api-0.2.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

coinglass_api-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file coinglass_api-0.2.0.tar.gz.

File metadata

  • Download URL: coinglass_api-0.2.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Darwin/22.2.0

File hashes

Hashes for coinglass_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f53e02a1788fc611b2790e4b13b22b29578f42a66ee792b73207270a5b9f308d
MD5 80f28465463ce0590917f906b93295d0
BLAKE2b-256 49c25efe04ad07c3aca0545d0e62e6a37df8937e4972aa5fdb2e2e9973d8ae94

See more details on using hashes here.

Provenance

File details

Details for the file coinglass_api-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: coinglass_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Darwin/22.2.0

File hashes

Hashes for coinglass_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb6feb50353d40e16099b22d7346cd6b17ab3ce8080050177be164d6a9add28c
MD5 af586c80c9e7e785c32a673de5ced542
BLAKE2b-256 b1cc775135fd13a2d6a629a7e9a0bf6d0457248803bebf5ed5ad4b2381d1ea8f

See more details on using hashes here.

Provenance

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