https://github.com/dineshpinto/coinglass-api
RESTful Python client for Coinglass crypto derivatives API
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.2%) to scientific vocabulary
Keywords
Repository
RESTful Python client for Coinglass crypto derivatives API
Basic Info
- Host: GitHub
- Owner: dineshpinto
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://pypi.org/project/coinglass-api/
- Size: 962 KB
Statistics
- Stars: 51
- Watchers: 4
- Forks: 16
- Open Issues: 3
- Releases: 5
Topics
Metadata Files
README.md
Coinglass API
Unofficial Python client for Coinglass API
Wrapper around the Coinglass API to fetch data about crypto derivatives.
All data is output in pandas DataFrames (single or multi-index) and all time-series data uses a DateTimeIndex.
Supports all Coinglass API endpoints.

Installation
bash
pip install coinglass-api
Usage
```python from coinglass_api import CoinglassAPI
cg = CoinglassAPI(coinglass_secret="abcd1234")
Get perpetual markets for BTC
perpmarketsbtc = cg.perpetual_market(symbol="BTC")
Get OI history
oihistorybtc = cg.openinteresthistory(symbol="BTC", time_type="h1", currency="USD")
Funding rate of ETH on dYdX
frbtcdydx = cg.funding(ex="dYdX", pair="ETH-USD", interval="h8")
Get average funding for BTC
fravgbtc = cg.funding_average(symbol="BTC", interval="h4")
Get funding OHLC for ETH-USDT on Binance
frohlcethbinance = cg.fundingohlc(ex="Binance", pair="ETHUSDT", interval="h4")
Get aggregated OI OHLC data for BTC
oiaggeth = cg.openinterestaggregated_ohlc(symbol="ETH", interval="h4")
Get OHLC liquidations data for ETH-USD on dYdX
liqohlcethdydx = cg.liquidationpair(ex="dYdX", pair="ETH-USD", interval="h4")
Get liquidation data for BTC
liqbtc = cg.liquidationsymbol(symbol="BTC", interval="h4")
Get long/short ratios for BTC
lsrbtc = cg.longshort_symbol(symbol="BTC", interval="h4")
Get GBTC market history
gbtchistory = cg.grayscalemarket_history()
and more...
```
Examples
```
cg.funding(ex="dYdX", pair="ETH-USD", interval="h8").head() ```
|
time | exchangeName
| symbol
| quoteCurrency
| fundingRate
|
|:--------------------|:------------------|:------------|:-------------------|:-----------------|
| 2022-08-22 08:00:00 | dYdX | ETH | USD | -0.001151 |
| 2022-08-22 16:00:00 | dYdX | ETH | USD | 0.001678 |
| 2022-08-23 00:00:00 | dYdX | ETH | USD | 0.003743 |
| 2022-08-23 08:00:00 | dYdX | ETH | USD | 0.003561 |
| 2022-08-23 16:00:00 | dYdX | ETH | USD | 0.000658 |
```
cg.funding(ex="dYdX", pair="ETH-USD", interval="h8").info() ```
```
0 exchangeName 500 non-null object 1 symbol 500 non-null object 2 quoteCurrency 500 non-null object 3 fundingRate 500 non-null float64 dtypes: float64(1), object(3) memory usage: 19.5+ KB ```
```
cg.funding(ex="dYdX", pair="ETH-USD", interval="h8").plot(y="fundingRate") ```

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.
Owner
- Name: Dinesh Pinto
- Login: dineshpinto
- Kind: user
- Location: Switzerland/Germany
- Website: dineshpinto.github.io
- Twitter: dineshkpinto
- Repositories: 6
- Profile: https://github.com/dineshpinto
quantum info PhD student @ EPFL, pythonista & rustacean
GitHub Events
Total
- Watch event: 19
- Pull request event: 1
- Fork event: 5
Last Year
- Watch event: 19
- Pull request event: 1
- Fork event: 5
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| dineshpinto | a****z@i****m | 44 |
| dineshpinto | d****5@g****m | 18 |
Packages
- Total packages: 1
-
Total downloads:
- pypi 360 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 15
- Total maintainers: 1
pypi.org: coinglass-api
Unofficial Python client for Coinglass API
- Homepage: https://github.com/dineshpinto/coinglass-api
- Documentation: https://coinglass-api.readthedocs.io/
- License: MIT
-
Latest release: 1.3.0
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- anyio 3.6.2 develop
- appnope 0.1.3 develop
- argon2-cffi 21.3.0 develop
- argon2-cffi-bindings 21.2.0 develop
- arrow 1.2.3 develop
- asttokens 2.2.1 develop
- attrs 22.2.0 develop
- babel 2.11.0 develop
- backcall 0.2.0 develop
- beautifulsoup4 4.11.1 develop
- bleach 5.0.1 develop
- cffi 1.15.1 develop
- colorama 0.4.6 develop
- comm 0.1.2 develop
- debugpy 1.6.5 develop
- decorator 5.1.1 develop
- defusedxml 0.7.1 develop
- entrypoints 0.4 develop
- executing 1.2.0 develop
- fastjsonschema 2.16.2 develop
- fqdn 1.5.1 develop
- ipykernel 6.20.1 develop
- ipython 8.8.0 develop
- ipython-genutils 0.2.0 develop
- isoduration 20.11.0 develop
- jedi 0.18.2 develop
- jinja2 3.1.2 develop
- json5 0.9.11 develop
- jsonpointer 2.3 develop
- jsonschema 4.17.3 develop
- jupyter-client 7.4.9 develop
- jupyter-core 5.1.3 develop
- jupyter-events 0.6.3 develop
- jupyter-server 2.1.0 develop
- jupyter-server-terminals 0.4.4 develop
- jupyterlab 3.5.2 develop
- jupyterlab-pygments 0.2.2 develop
- jupyterlab-server 2.18.0 develop
- markupsafe 2.1.1 develop
- matplotlib-inline 0.1.6 develop
- mistune 2.0.4 develop
- nbclassic 0.4.8 develop
- nbclient 0.7.2 develop
- nbconvert 7.2.7 develop
- nbformat 5.7.3 develop
- nest-asyncio 1.5.6 develop
- notebook 6.5.2 develop
- notebook-shim 0.2.2 develop
- packaging 23.0 develop
- pandocfilters 1.5.0 develop
- parso 0.8.3 develop
- pexpect 4.8.0 develop
- pickleshare 0.7.5 develop
- platformdirs 2.6.2 develop
- prometheus-client 0.15.0 develop
- prompt-toolkit 3.0.36 develop
- psutil 5.9.4 develop
- ptyprocess 0.7.0 develop
- pure-eval 0.2.2 develop
- pycparser 2.21 develop
- pygments 2.14.0 develop
- pyrsistent 0.19.3 develop
- python-json-logger 2.0.4 develop
- pywin32 305 develop
- pywinpty 2.0.10 develop
- pyyaml 6.0 develop
- pyzmq 25.0.0 develop
- rfc3339-validator 0.1.4 develop
- rfc3986-validator 0.1.1 develop
- send2trash 1.8.0 develop
- sniffio 1.3.0 develop
- soupsieve 2.3.2.post1 develop
- stack-data 0.6.2 develop
- terminado 0.17.1 develop
- tinycss2 1.2.1 develop
- tomli 2.0.1 develop
- tornado 6.2 develop
- traitlets 5.8.1 develop
- uri-template 1.2.0 develop
- wcwidth 0.2.6 develop
- webcolors 1.12 develop
- webencodings 0.5.1 develop
- websocket-client 1.4.2 develop
- certifi 2022.12.7
- charset-normalizer 3.0.1
- idna 3.4
- numpy 1.24.1
- pandas 1.5.2
- python-dateutil 2.8.2
- pytz 2022.7.1
- requests 2.28.2
- six 1.16.0
- urllib3 1.26.14
- pandas ^1.5.2
- python ^3.10
- requests ^2.28.2
- Gr1N/setup-poetry v8 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite