Files
OpenBB/tests/openbb_terminal/cryptocurrency/due_diligence/test_coinglass_model.py
Jalil F a9a9b2b785 feat m: [Crypto/DD] Add Coinglass Liquidations (#2402)
* Add initial liquidations calls.

* Fix liquidation terminal call.

* Adding documentation.

* Update to correct docs.

* added stacked bars

* Adding new bar chart visualization to docs.

* revert helpers.

* linting

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: jose-donato <zmcdonato@gmail.com>
2022-08-23 18:30:18 +01:00

31 lines
732 B
Python

# IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from openbb_terminal.cryptocurrency.due_diligence import coinglass_model
@pytest.fixture(scope="module")
def vcr_config():
return {"filter_headers": [("coinglassSecret", "TOKEN")]}
@pytest.mark.vcr
@pytest.mark.parametrize(
"func, kwargs",
[
("get_liquidations", dict(symbol="ETH")),
("get_funding_rate", dict(symbol="ETH")),
("get_open_interest_per_exchange", dict(symbol="ETH")),
],
)
def test_call_func(func, kwargs, recorder):
result = getattr(coinglass_model, func)(**kwargs)
if isinstance(result, tuple):
recorder.capture_list(result)
else:
recorder.capture(result)