mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-25 02:33:10 +00:00
* 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>
31 lines
732 B
Python
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)
|