diff --git a/openbb_terminal/cryptocurrency/defi/coindix_model.py b/openbb_terminal/cryptocurrency/defi/coindix_model.py index 9838be4d89ce..b7809ba53091 100644 --- a/openbb_terminal/cryptocurrency/defi/coindix_model.py +++ b/openbb_terminal/cryptocurrency/defi/coindix_model.py @@ -148,7 +148,7 @@ def get_defi_vaults( data = response.json()["data"] if len(data) == 0: return pd.DataFrame() - return pd.DataFrame(data)[VAULTS_FILTERS].fillna("NA") + return pd.DataFrame(data)[VAULTS_FILTERS] except Exception as e: logger.exception(e) raise ValueError(f"Invalid Response: {response.text}") from e diff --git a/openbb_terminal/cryptocurrency/defi/coindix_view.py b/openbb_terminal/cryptocurrency/defi/coindix_view.py index c1e9e6ab76ee..bbe25c364d14 100644 --- a/openbb_terminal/cryptocurrency/defi/coindix_view.py +++ b/openbb_terminal/cryptocurrency/defi/coindix_view.py @@ -69,7 +69,7 @@ def display_defi_vaults( ) return - df = df.sort_values(by=sortby, ascending=descend) + df = df.sort_values(by=sortby, ascending=descend).fillna("NA") df["tvl"] = df["tvl"].apply(lambda x: lambda_long_number_format(x)) df["apy"] = df["apy"].apply( lambda x: f"{str(round(x * 100, 2))} %" if isinstance(x, (int, float)) else x diff --git a/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_model/test_get_defi_vaults.yaml b/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_model/test_get_defi_vaults.yaml index 315f07bc1e1f..6ebe7f9b0fe3 100644 --- a/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_model/test_get_defi_vaults.yaml +++ b/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_model/test_get_defi_vaults.yaml @@ -9,25 +9,28 @@ interactions: Connection: - keep-alive User-Agent: - - python-requests/2.27.1 + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:82.1) Gecko/20100101 Firefox/82.1 method: GET uri: https://apiv2.coindix.com/search?sort=-apy&tvl=1m&kind=all response: body: - string: '{"hasPrevPage":false,"hasNextPage":true,"total":1581,"totalPages":50,"data":[{"id":96613,"name":"ESHARE-BNB","icon":"https://api.coindix.com/icons/ESHARE-BNB.png","chain":"BNB Chain","protocol":"Beefy","base":30.42511882,"reward":0,"rewards":{},"apy":30.42511882,"tvl":1592553,"link":"https://api.coindix.com/vault/96613/redirect","is_new":false,"watched":false},{"id":77959,"name":"ust-wormholeUST-3Crv","icon":"https://api.coindix.com/icons/ust-wormholeUST+3Crv.png","chain":"Ethereum","protocol":"Convex","base":0.0898,"reward":14.8516,"rewards":{"CRV":8.125599999999999,"CVX":6.726},"apy":14.9414,"tvl":2600000,"link":"https://api.coindix.com/vault/77959/redirect","is_new":false,"watched":false},{"id":50508,"name":"GRAPE-MIM","icon":"https://api.coindix.com/icons/GRAPE-MIM.png","chain":"Avalanche","protocol":"Beefy","base":12.53196591,"reward":0,"rewards":{},"apy":12.53196591,"tvl":1109040,"link":"https://api.coindix.com/vault/50508/redirect","is_new":false,"watched":false},{"id":75836,"name":"BSHARE-FTM","icon":"https://api.coindix.com/icons/BSHARE-FTM.png","chain":"Fantom","protocol":"Beefy","base":11.58813773,"reward":0,"rewards":{},"apy":11.58813773,"tvl":1648934,"link":"https://api.coindix.com/vault/75836/redirect","is_new":false,"watched":false},{"id":75835,"name":"BASED-TOMB","icon":"https://api.coindix.com/icons/BASED-TOMB.png","chain":"Fantom","protocol":"Beefy","base":5.27602349,"reward":0,"rewards":{},"apy":5.27602349,"tvl":1135801,"link":"https://api.coindix.com/vault/75835/redirect","is_new":false,"watched":false},{"id":96612,"name":"EMP-ETH","icon":"https://api.coindix.com/icons/EMP-ETH.png","chain":"BNB Chain","protocol":"Beefy","base":3.64525182,"reward":0,"rewards":{},"apy":3.64525182,"tvl":1258560,"link":"https://api.coindix.com/vault/96612/redirect","is_new":false,"watched":false},{"id":103379,"name":"BADGER-WBTC","icon":"https://api.coindix.com/icons/BADGER-WBTC-NEW.png","chain":"Ethereum","protocol":"Balancer","base":0.023,"reward":3.3817,"rewards":{"Max BAL":2.4155,"Min BAL":0.9662000000000001},"apy":3.4047,"tvl":15240604,"link":"https://api.coindix.com/vault/103379/redirect","is_new":false,"watched":false},{"id":120475,"name":"BSW-BNB","icon":"https://api.coindix.com/icons/BSW-BNB.png","chain":"BNB Chain","protocol":"Alpaca","base":0.19856523,"reward":3.03549494,"rewards":{"ALPACA":0.010639233528841602},"apy":2.80859948,"tvl":1873050,"link":"https://api.coindix.com/vault/120475/redirect","is_new":false,"watched":false},{"id":143897,"name":"WBTC-OSMO","icon":"https://api.coindix.com/default_icon.png","chain":"Osmosis","protocol":"Osmosis","base":2.312,"reward":0,"rewards":{},"apy":2.312,"tvl":4730492,"link":"https://api.coindix.com/vault/143897/redirect","is_new":true,"watched":false},{"id":59324,"name":"ROWAN-OSMO","icon":"https://api.coindix.com/icons/ROWAN-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":2.2872,"reward":0,"rewards":{},"apy":2.2872,"tvl":1834223,"link":"https://api.coindix.com/vault/59324/redirect","is_new":false,"watched":false},{"id":35035,"name":"CAKE-BUSD","icon":"https://api.coindix.com/icons/CAKE-BUSD.png","chain":"BNB Chain","protocol":"Alpaca","base":0.78121807,"reward":1.05165023,"rewards":{"ALPACA":0.03465277361996981},"apy":2.04617026,"tvl":4480007,"link":"https://api.coindix.com/vault/35035/redirect","is_new":false,"watched":false},{"id":135902,"name":"DAI-OSMO","icon":"https://api.coindix.com/icons/DAI-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":1.6725,"reward":0,"rewards":{},"apy":1.6725,"tvl":4371544,"link":"https://api.coindix.com/vault/135902/redirect","is_new":false,"watched":false},{"id":134578,"name":"USDC-OSMO","icon":"https://api.coindix.com/icons/USDC-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":1.403,"reward":0,"rewards":{},"apy":1.403,"tvl":25314311,"link":"https://api.coindix.com/vault/134578/redirect","is_new":false,"watched":false},{"id":16709,"name":"VVS-CRO","icon":"https://api.coindix.com/icons/VVS-CRO.png","chain":"Cronos","protocol":"Beefy","base":1.3365707,"reward":0,"rewards":{},"apy":1.3365707,"tvl":1011871,"link":"https://api.coindix.com/vault/16709/redirect","is_new":false,"watched":false},{"id":29984,"name":"ZERO-WETH","icon":"https://api.coindix.com/icons/ZERO-WETH.png","chain":"Ethereum","protocol":"Uniswap","base":1.31960048,"reward":0,"rewards":{},"apy":1.31960048,"tvl":1559733,"link":"https://api.coindix.com/vault/29984/redirect","is_new":false,"watched":false},{"id":105317,"name":"PTP","icon":"https://api.coindix.com/icons/PTP.png","chain":"Avalanche","protocol":"Vector","base":0,"reward":1.28748507,"rewards":{"PTP":0.2565863183878838,"VTX":1.0308987475572733},"apy":1.28748507,"tvl":1503929,"link":"https://api.coindix.com/vault/105317/redirect","is_new":false,"watched":false},{"id":35019,"name":"CAKE-USDT","icon":"https://api.coindix.com/icons/CAKE-USDT.png","chain":"BNB Chain","protocol":"Alpaca","base":0.22087476,"reward":1.0938928,"rewards":{"ALPACA":0.005928218519989986},"apy":1.2138105,"tvl":1027282,"link":"https://api.coindix.com/vault/35019/redirect","is_new":false,"watched":false},{"id":40917,"name":"VVS-WCRO","icon":"https://api.coindix.com/icons/CRO-VVS.png","chain":"Cronos","protocol":"VVS","base":0.0079,"reward":1.19399809,"rewards":{},"apy":1.20189809,"tvl":47140000,"link":"https://api.coindix.com/vault/40917/redirect","is_new":false,"watched":false},{"id":135903,"name":"WETH-OSMO","icon":"https://api.coindix.com/icons/WETH-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":1.1909,"reward":0,"rewards":{},"apy":1.1909,"tvl":9242039,"link":"https://api.coindix.com/vault/135903/redirect","is_new":false,"watched":false},{"id":40922,"name":"VVS-USDT","icon":"https://api.coindix.com/icons/VVS-USDT.png","chain":"Cronos","protocol":"VVS","base":0.0265,"reward":1.14577941,"rewards":{},"apy":1.17227941,"tvl":3730000,"link":"https://api.coindix.com/vault/40922/redirect","is_new":false,"watched":false}]}' + string: '{"hasPrevPage":false,"hasNextPage":true,"total":1331,"totalPages":50,"data":[{"id":120568,"name":"WETH-10k","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1698882,"link":"https://api.coindix.com/vault/120568/redirect","is_new":false,"watched":false},{"id":113873,"name":"Azuki-WETH","icon":"https://api.coindix.com/icons/Azuki-WETH.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1180607,"link":"https://api.coindix.com/vault/113873/redirect","is_new":false,"watched":false},{"id":111282,"name":"WETH-RYOSHI","icon":"https://api.coindix.com/icons/WETH-RYOSHI.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1569332,"link":"https://api.coindix.com/vault/111282/redirect","is_new":false,"watched":false},{"id":110372,"name":"Hasbro-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1025188,"link":"https://api.coindix.com/vault/110372/redirect","is_new":false,"watched":false},{"id":118073,"name":"WETH-GENIE","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1770296,"link":"https://api.coindix.com/vault/118073/redirect","is_new":false,"watched":false},{"id":165735,"name":"WETH-PRAG","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1359190,"link":"https://api.coindix.com/vault/165735/redirect","is_new":false,"watched":false},{"id":113531,"name":"APELAND-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1216107,"link":"https://api.coindix.com/vault/113531/redirect","is_new":false,"watched":false},{"id":108126,"name":"Line-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":2065257,"link":"https://api.coindix.com/vault/108126/redirect","is_new":false,"watched":false},{"id":167534,"name":"USDC-CRV","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1721977,"link":"https://api.coindix.com/vault/167534/redirect","is_new":false,"watched":false},{"id":121969,"name":"USDD-USDT + (0.01%)","icon":"https://api.coindix.com/icons/USDD-USDT.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":3925917,"link":"https://api.coindix.com/vault/121969/redirect","is_new":false,"watched":false},{"id":97162,"name":"WETH-DOODLE","icon":"https://api.coindix.com/icons/WETH-DOODLE.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":2886965,"link":"https://api.coindix.com/vault/97162/redirect","is_new":false,"watched":false},{"id":112952,"name":"HOOT-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1474099,"link":"https://api.coindix.com/vault/112952/redirect","is_new":false,"watched":false},{"id":95445,"name":"Firefox-WETH","icon":"https://api.coindix.com/icons/Firefox-WETH.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1963426,"link":"https://api.coindix.com/vault/95445/redirect","is_new":false,"watched":false},{"id":178382,"name":"WBTC-BBTC + (0.05%)","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":4200389,"link":"https://api.coindix.com/vault/178382/redirect","is_new":true,"watched":false},{"id":104732,"name":"WETH-Richemont","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1630815,"link":"https://api.coindix.com/vault/104732/redirect","is_new":false,"watched":false},{"id":119426,"name":"WETH-OP","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1664803,"link":"https://api.coindix.com/vault/119426/redirect","is_new":false,"watched":false},{"id":50508,"name":"GRAPE-MIM","icon":"https://api.coindix.com/icons/GRAPE-MIM.png","chain":"Avalanche","protocol":"Beefy","base":7.47626288,"reward":0,"rewards":{},"apy":7.47626288,"tvl":1056770,"link":"https://api.coindix.com/vault/50508/redirect","is_new":false,"watched":false},{"id":150035,"name":"WBTC-cxBTC","icon":"https://api.coindix.com/default_icon.png","chain":"Polygon","protocol":"Beefy","base":3.85182283,"reward":0,"rewards":{},"apy":3.85182283,"tvl":1542565,"link":"https://api.coindix.com/vault/150035/redirect","is_new":false,"watched":false},{"id":72936,"name":"ETH-cxETH","icon":"https://api.coindix.com/icons/ETH-cxETH.png","chain":"Polygon","protocol":"Beefy","base":3.76929371,"reward":0,"rewards":{},"apy":3.76929371,"tvl":1547500,"link":"https://api.coindix.com/vault/72936/redirect","is_new":false,"watched":false},{"id":162981,"name":"SHIT-WETH + (1%)","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":3.65199141,"reward":0,"rewards":{},"apy":3.65199141,"tvl":2179266,"link":"https://api.coindix.com/vault/162981/redirect","is_new":false,"watched":false}]}' headers: Access-Control-Allow-Origin: - '*' Connection: - keep-alive Content-Length: - - '32707' + - '5576' Content-Type: - application/json; charset=utf-8 Date: - - Fri, 28 Jan 2022 18:50:15 GMT + - Fri, 17 Jun 2022 11:05:53 GMT ETag: - - W/"7fc3-6d815FTsb0fRj8JQXzD9h991Vso" + - W/"15c8-U7oBaaf65q92UwgeoTPkw3i+bn0" Server: - nginx/1.18.0 (Ubuntu) X-Powered-By: diff --git a/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_view/test_display_defi_vaults.yaml b/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_view/test_display_defi_vaults.yaml index a60619a4c8ab..4bfde1445018 100644 --- a/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_view/test_display_defi_vaults.yaml +++ b/tests/openbb_terminal/cryptocurrency/defi/cassettes/test_coindix_view/test_display_defi_vaults.yaml @@ -9,25 +9,28 @@ interactions: Connection: - keep-alive User-Agent: - - python-requests/2.27.1 + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:86.0) Gecko/20100101 Firefox/86.0 method: GET uri: https://apiv2.coindix.com/search?sort=-apy&tvl=1m&kind=all response: body: - string: '{"hasPrevPage":false,"hasNextPage":true,"total":1581,"totalPages":50,"data":[{"id":96613,"name":"ESHARE-BNB","icon":"https://api.coindix.com/icons/ESHARE-BNB.png","chain":"BNB Chain","protocol":"Beefy","base":30.42511882,"reward":0,"rewards":{},"apy":30.42511882,"tvl":1592553,"link":"https://api.coindix.com/vault/96613/redirect","is_new":false,"watched":false},{"id":77959,"name":"ust-wormholeUST-3Crv","icon":"https://api.coindix.com/icons/ust-wormholeUST+3Crv.png","chain":"Ethereum","protocol":"Convex","base":0.0898,"reward":14.8516,"rewards":{"CRV":8.125599999999999,"CVX":6.726},"apy":14.9414,"tvl":2600000,"link":"https://api.coindix.com/vault/77959/redirect","is_new":false,"watched":false},{"id":50508,"name":"GRAPE-MIM","icon":"https://api.coindix.com/icons/GRAPE-MIM.png","chain":"Avalanche","protocol":"Beefy","base":12.53196591,"reward":0,"rewards":{},"apy":12.53196591,"tvl":1109040,"link":"https://api.coindix.com/vault/50508/redirect","is_new":false,"watched":false},{"id":75836,"name":"BSHARE-FTM","icon":"https://api.coindix.com/icons/BSHARE-FTM.png","chain":"Fantom","protocol":"Beefy","base":11.58813773,"reward":0,"rewards":{},"apy":11.58813773,"tvl":1648934,"link":"https://api.coindix.com/vault/75836/redirect","is_new":false,"watched":false},{"id":75835,"name":"BASED-TOMB","icon":"https://api.coindix.com/icons/BASED-TOMB.png","chain":"Fantom","protocol":"Beefy","base":5.27602349,"reward":0,"rewards":{},"apy":5.27602349,"tvl":1135801,"link":"https://api.coindix.com/vault/75835/redirect","is_new":false,"watched":false},{"id":96612,"name":"EMP-ETH","icon":"https://api.coindix.com/icons/EMP-ETH.png","chain":"BNB Chain","protocol":"Beefy","base":3.64525182,"reward":0,"rewards":{},"apy":3.64525182,"tvl":1258560,"link":"https://api.coindix.com/vault/96612/redirect","is_new":false,"watched":false},{"id":103379,"name":"BADGER-WBTC","icon":"https://api.coindix.com/icons/BADGER-WBTC-NEW.png","chain":"Ethereum","protocol":"Balancer","base":0.023,"reward":3.3817,"rewards":{"Max BAL":2.4155,"Min BAL":0.9662000000000001},"apy":3.4047,"tvl":15240604,"link":"https://api.coindix.com/vault/103379/redirect","is_new":false,"watched":false},{"id":120475,"name":"BSW-BNB","icon":"https://api.coindix.com/icons/BSW-BNB.png","chain":"BNB Chain","protocol":"Alpaca","base":0.19856523,"reward":3.03549494,"rewards":{"ALPACA":0.010639233528841602},"apy":2.80859948,"tvl":1873050,"link":"https://api.coindix.com/vault/120475/redirect","is_new":false,"watched":false},{"id":143897,"name":"WBTC-OSMO","icon":"https://api.coindix.com/default_icon.png","chain":"Osmosis","protocol":"Osmosis","base":2.312,"reward":0,"rewards":{},"apy":2.312,"tvl":4730492,"link":"https://api.coindix.com/vault/143897/redirect","is_new":true,"watched":false},{"id":59324,"name":"ROWAN-OSMO","icon":"https://api.coindix.com/icons/ROWAN-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":2.2872,"reward":0,"rewards":{},"apy":2.2872,"tvl":1834223,"link":"https://api.coindix.com/vault/59324/redirect","is_new":false,"watched":false},{"id":35035,"name":"CAKE-BUSD","icon":"https://api.coindix.com/icons/CAKE-BUSD.png","chain":"BNB Chain","protocol":"Alpaca","base":0.78121807,"reward":1.05165023,"rewards":{"ALPACA":0.03465277361996981},"apy":2.04617026,"tvl":4480007,"link":"https://api.coindix.com/vault/35035/redirect","is_new":false,"watched":false},{"id":135902,"name":"DAI-OSMO","icon":"https://api.coindix.com/icons/DAI-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":1.6725,"reward":0,"rewards":{},"apy":1.6725,"tvl":4371544,"link":"https://api.coindix.com/vault/135902/redirect","is_new":false,"watched":false},{"id":134578,"name":"USDC-OSMO","icon":"https://api.coindix.com/icons/USDC-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":1.403,"reward":0,"rewards":{},"apy":1.403,"tvl":25314311,"link":"https://api.coindix.com/vault/134578/redirect","is_new":false,"watched":false},{"id":16709,"name":"VVS-CRO","icon":"https://api.coindix.com/icons/VVS-CRO.png","chain":"Cronos","protocol":"Beefy","base":1.3365707,"reward":0,"rewards":{},"apy":1.3365707,"tvl":1011871,"link":"https://api.coindix.com/vault/16709/redirect","is_new":false,"watched":false},{"id":29984,"name":"ZERO-WETH","icon":"https://api.coindix.com/icons/ZERO-WETH.png","chain":"Ethereum","protocol":"Uniswap","base":1.31960048,"reward":0,"rewards":{},"apy":1.31960048,"tvl":1559733,"link":"https://api.coindix.com/vault/29984/redirect","is_new":false,"watched":false},{"id":105317,"name":"PTP","icon":"https://api.coindix.com/icons/PTP.png","chain":"Avalanche","protocol":"Vector","base":0,"reward":1.28748507,"rewards":{"PTP":0.2565863183878838,"VTX":1.0308987475572733},"apy":1.28748507,"tvl":1503929,"link":"https://api.coindix.com/vault/105317/redirect","is_new":false,"watched":false},{"id":35019,"name":"CAKE-USDT","icon":"https://api.coindix.com/icons/CAKE-USDT.png","chain":"BNB Chain","protocol":"Alpaca","base":0.22087476,"reward":1.0938928,"rewards":{"ALPACA":0.005928218519989986},"apy":1.2138105,"tvl":1027282,"link":"https://api.coindix.com/vault/35019/redirect","is_new":false,"watched":false},{"id":40917,"name":"VVS-WCRO","icon":"https://api.coindix.com/icons/CRO-VVS.png","chain":"Cronos","protocol":"VVS","base":0.0079,"reward":1.19399809,"rewards":{},"apy":1.20189809,"tvl":47140000,"link":"https://api.coindix.com/vault/40917/redirect","is_new":false,"watched":false},{"id":135903,"name":"WETH-OSMO","icon":"https://api.coindix.com/icons/WETH-OSMO.png","chain":"Osmosis","protocol":"Osmosis","base":1.1909,"reward":0,"rewards":{},"apy":1.1909,"tvl":9242039,"link":"https://api.coindix.com/vault/135903/redirect","is_new":false,"watched":false},{"id":40922,"name":"VVS-USDT","icon":"https://api.coindix.com/icons/VVS-USDT.png","chain":"Cronos","protocol":"VVS","base":0.0265,"reward":1.14577941,"rewards":{},"apy":1.17227941,"tvl":3730000,"link":"https://api.coindix.com/vault/40922/redirect","is_new":false,"watched":false}]}' + string: '{"hasPrevPage":false,"hasNextPage":true,"total":1331,"totalPages":50,"data":[{"id":120568,"name":"WETH-10k","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1698882,"link":"https://api.coindix.com/vault/120568/redirect","is_new":false,"watched":false},{"id":113873,"name":"Azuki-WETH","icon":"https://api.coindix.com/icons/Azuki-WETH.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1180607,"link":"https://api.coindix.com/vault/113873/redirect","is_new":false,"watched":false},{"id":111282,"name":"WETH-RYOSHI","icon":"https://api.coindix.com/icons/WETH-RYOSHI.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1569332,"link":"https://api.coindix.com/vault/111282/redirect","is_new":false,"watched":false},{"id":110372,"name":"Hasbro-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1025188,"link":"https://api.coindix.com/vault/110372/redirect","is_new":false,"watched":false},{"id":118073,"name":"WETH-GENIE","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1770296,"link":"https://api.coindix.com/vault/118073/redirect","is_new":false,"watched":false},{"id":165735,"name":"WETH-PRAG","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1359190,"link":"https://api.coindix.com/vault/165735/redirect","is_new":false,"watched":false},{"id":113531,"name":"APELAND-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1216107,"link":"https://api.coindix.com/vault/113531/redirect","is_new":false,"watched":false},{"id":108126,"name":"Line-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":2065257,"link":"https://api.coindix.com/vault/108126/redirect","is_new":false,"watched":false},{"id":167534,"name":"USDC-CRV","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1721977,"link":"https://api.coindix.com/vault/167534/redirect","is_new":false,"watched":false},{"id":121969,"name":"USDD-USDT + (0.01%)","icon":"https://api.coindix.com/icons/USDD-USDT.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":3925917,"link":"https://api.coindix.com/vault/121969/redirect","is_new":false,"watched":false},{"id":97162,"name":"WETH-DOODLE","icon":"https://api.coindix.com/icons/WETH-DOODLE.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":2886965,"link":"https://api.coindix.com/vault/97162/redirect","is_new":false,"watched":false},{"id":112952,"name":"HOOT-WETH","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1474099,"link":"https://api.coindix.com/vault/112952/redirect","is_new":false,"watched":false},{"id":95445,"name":"Firefox-WETH","icon":"https://api.coindix.com/icons/Firefox-WETH.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1963426,"link":"https://api.coindix.com/vault/95445/redirect","is_new":false,"watched":false},{"id":178382,"name":"WBTC-BBTC + (0.05%)","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":4200389,"link":"https://api.coindix.com/vault/178382/redirect","is_new":true,"watched":false},{"id":104732,"name":"WETH-Richemont","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1630815,"link":"https://api.coindix.com/vault/104732/redirect","is_new":false,"watched":false},{"id":119426,"name":"WETH-OP","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":null,"reward":0,"rewards":{},"apy":null,"tvl":1664803,"link":"https://api.coindix.com/vault/119426/redirect","is_new":false,"watched":false},{"id":50508,"name":"GRAPE-MIM","icon":"https://api.coindix.com/icons/GRAPE-MIM.png","chain":"Avalanche","protocol":"Beefy","base":7.47626288,"reward":0,"rewards":{},"apy":7.47626288,"tvl":1056770,"link":"https://api.coindix.com/vault/50508/redirect","is_new":false,"watched":false},{"id":150035,"name":"WBTC-cxBTC","icon":"https://api.coindix.com/default_icon.png","chain":"Polygon","protocol":"Beefy","base":3.85182283,"reward":0,"rewards":{},"apy":3.85182283,"tvl":1542565,"link":"https://api.coindix.com/vault/150035/redirect","is_new":false,"watched":false},{"id":72936,"name":"ETH-cxETH","icon":"https://api.coindix.com/icons/ETH-cxETH.png","chain":"Polygon","protocol":"Beefy","base":3.76929371,"reward":0,"rewards":{},"apy":3.76929371,"tvl":1547500,"link":"https://api.coindix.com/vault/72936/redirect","is_new":false,"watched":false},{"id":162981,"name":"SHIT-WETH + (1%)","icon":"https://api.coindix.com/default_icon.png","chain":"Ethereum","protocol":"Uniswap","base":3.65199141,"reward":0,"rewards":{},"apy":3.65199141,"tvl":2179266,"link":"https://api.coindix.com/vault/162981/redirect","is_new":false,"watched":false}]}' headers: Access-Control-Allow-Origin: - '*' Connection: - keep-alive Content-Length: - - '32717' + - '5576' Content-Type: - application/json; charset=utf-8 Date: - - Fri, 28 Jan 2022 19:07:06 GMT + - Fri, 17 Jun 2022 11:05:35 GMT ETag: - - W/"7fcd-2we152EccSc3YhHqTwGcsUGDJxw" + - W/"15c8-U7oBaaf65q92UwgeoTPkw3i+bn0" Server: - nginx/1.18.0 (Ubuntu) X-Powered-By: diff --git a/tests/openbb_terminal/cryptocurrency/defi/csv/test_coindix_model/test_get_defi_vaults.csv b/tests/openbb_terminal/cryptocurrency/defi/csv/test_coindix_model/test_get_defi_vaults.csv index 402297c3fbec..24b52b9147d1 100644 --- a/tests/openbb_terminal/cryptocurrency/defi/csv/test_coindix_model/test_get_defi_vaults.csv +++ b/tests/openbb_terminal/cryptocurrency/defi/csv/test_coindix_model/test_get_defi_vaults.csv @@ -1,21 +1,21 @@ ,name,chain,protocol,apy,tvl,link -0,ESHARE-BNB,BNB Chain,Beefy,30.42511882,1592553,https://api.coindix.com/vault/96613/redirect -1,ust-wormholeUST-3Crv,Ethereum,Convex,14.9414,2600000,https://api.coindix.com/vault/77959/redirect -2,GRAPE-MIM,Avalanche,Beefy,12.53196591,1109040,https://api.coindix.com/vault/50508/redirect -3,BSHARE-FTM,Fantom,Beefy,11.58813773,1648934,https://api.coindix.com/vault/75836/redirect -4,BASED-TOMB,Fantom,Beefy,5.27602349,1135801,https://api.coindix.com/vault/75835/redirect -5,EMP-ETH,BNB Chain,Beefy,3.64525182,1258560,https://api.coindix.com/vault/96612/redirect -6,BADGER-WBTC,Ethereum,Balancer,3.4047,15240604,https://api.coindix.com/vault/103379/redirect -7,BSW-BNB,BNB Chain,Alpaca,2.80859948,1873050,https://api.coindix.com/vault/120475/redirect -8,WBTC-OSMO,Osmosis,Osmosis,2.312,4730492,https://api.coindix.com/vault/143897/redirect -9,ROWAN-OSMO,Osmosis,Osmosis,2.2872,1834223,https://api.coindix.com/vault/59324/redirect -10,CAKE-BUSD,BNB Chain,Alpaca,2.04617026,4480007,https://api.coindix.com/vault/35035/redirect -11,DAI-OSMO,Osmosis,Osmosis,1.6725,4371544,https://api.coindix.com/vault/135902/redirect -12,USDC-OSMO,Osmosis,Osmosis,1.403,25314311,https://api.coindix.com/vault/134578/redirect -13,VVS-CRO,Cronos,Beefy,1.3365707,1011871,https://api.coindix.com/vault/16709/redirect -14,ZERO-WETH,Ethereum,Uniswap,1.31960048,1559733,https://api.coindix.com/vault/29984/redirect -15,PTP,Avalanche,Vector,1.28748507,1503929,https://api.coindix.com/vault/105317/redirect -16,CAKE-USDT,BNB Chain,Alpaca,1.2138105,1027282,https://api.coindix.com/vault/35019/redirect -17,VVS-WCRO,Cronos,VVS,1.20189809,47140000,https://api.coindix.com/vault/40917/redirect -18,WETH-OSMO,Osmosis,Osmosis,1.1909,9242039,https://api.coindix.com/vault/135903/redirect -19,VVS-USDT,Cronos,VVS,1.17227941,3730000,https://api.coindix.com/vault/40922/redirect +0,WETH-10k,Ethereum,Uniswap,,1698882,https://api.coindix.com/vault/120568/redirect +1,Azuki-WETH,Ethereum,Uniswap,,1180607,https://api.coindix.com/vault/113873/redirect +2,WETH-RYOSHI,Ethereum,Uniswap,,1569332,https://api.coindix.com/vault/111282/redirect +3,Hasbro-WETH,Ethereum,Uniswap,,1025188,https://api.coindix.com/vault/110372/redirect +4,WETH-GENIE,Ethereum,Uniswap,,1770296,https://api.coindix.com/vault/118073/redirect +5,WETH-PRAG,Ethereum,Uniswap,,1359190,https://api.coindix.com/vault/165735/redirect +6,APELAND-WETH,Ethereum,Uniswap,,1216107,https://api.coindix.com/vault/113531/redirect +7,Line-WETH,Ethereum,Uniswap,,2065257,https://api.coindix.com/vault/108126/redirect +8,USDC-CRV,Ethereum,Uniswap,,1721977,https://api.coindix.com/vault/167534/redirect +9,USDD-USDT (0.01%),Ethereum,Uniswap,,3925917,https://api.coindix.com/vault/121969/redirect +10,WETH-DOODLE,Ethereum,Uniswap,,2886965,https://api.coindix.com/vault/97162/redirect +11,HOOT-WETH,Ethereum,Uniswap,,1474099,https://api.coindix.com/vault/112952/redirect +12,Firefox-WETH,Ethereum,Uniswap,,1963426,https://api.coindix.com/vault/95445/redirect +13,WBTC-BBTC (0.05%),Ethereum,Uniswap,,4200389,https://api.coindix.com/vault/178382/redirect +14,WETH-Richemont,Ethereum,Uniswap,,1630815,https://api.coindix.com/vault/104732/redirect +15,WETH-OP,Ethereum,Uniswap,,1664803,https://api.coindix.com/vault/119426/redirect +16,GRAPE-MIM,Avalanche,Beefy,7.47626288,1056770,https://api.coindix.com/vault/50508/redirect +17,WBTC-cxBTC,Polygon,Beefy,3.85182283,1542565,https://api.coindix.com/vault/150035/redirect +18,ETH-cxETH,Polygon,Beefy,3.76929371,1547500,https://api.coindix.com/vault/72936/redirect +19,SHIT-WETH (1%),Ethereum,Uniswap,3.65199141,2179266,https://api.coindix.com/vault/162981/redirect diff --git a/tests/openbb_terminal/cryptocurrency/defi/txt/test_coindix_view/test_display_defi_vaults.txt b/tests/openbb_terminal/cryptocurrency/defi/txt/test_coindix_view/test_display_defi_vaults.txt index 50c46414fb11..963d23389308 100644 --- a/tests/openbb_terminal/cryptocurrency/defi/txt/test_coindix_view/test_display_defi_vaults.txt +++ b/tests/openbb_terminal/cryptocurrency/defi/txt/test_coindix_view/test_display_defi_vaults.txt @@ -1,21 +1,21 @@ - Name Chain Protocol APY (%) TVL ($) -0 ESHARE-BNB BNB Chain Beefy 3042.51 % 1.593 M -1 ust-wormholeUST-3Crv Ethereum Convex 1494.14 % 2.600 M -2 GRAPE-MIM Avalanche Beefy 1253.2 % 1.109 M -3 BSHARE-FTM Fantom Beefy 1158.81 % 1.649 M -4 BASED-TOMB Fantom Beefy 527.6 % 1.136 M -5 EMP-ETH BNB Chain Beefy 364.53 % 1.259 M -6 BADGER-WBTC Ethereum Balancer 340.47 % 15.241 M -7 BSW-BNB BNB Chain Alpaca 280.86 % 1.873 M -8 WBTC-OSMO Osmosis Osmosis 231.2 % 4.730 M -9 ROWAN-OSMO Osmosis Osmosis 228.72 % 1.834 M -10 CAKE-BUSD BNB Chain Alpaca 204.62 % 4.480 M -11 DAI-OSMO Osmosis Osmosis 167.25 % 4.372 M -12 USDC-OSMO Osmosis Osmosis 140.3 % 25.314 M -13 VVS-CRO Cronos Beefy 133.66 % 1.012 M -14 ZERO-WETH Ethereum Uniswap 131.96 % 1.560 M -15 PTP Avalanche Vector 128.75 % 1.504 M -16 CAKE-USDT BNB Chain Alpaca 121.38 % 1.027 M -17 VVS-WCRO Cronos VVS 120.19 % 47.140 M -18 WETH-OSMO Osmosis Osmosis 119.09 % 9.242 M -19 VVS-USDT Cronos VVS 117.23 % 3.730 M + Name Chain Protocol APY (%) TVL ($) +16 GRAPE-MIM Avalanche Beefy 747.63 % 1.057 M +17 WBTC-cxBTC Polygon Beefy 385.18 % 1.543 M +18 ETH-cxETH Polygon Beefy 376.93 % 1.548 M +19 SHIT-WETH (1%) Ethereum Uniswap 365.2 % 2.179 M +0 WETH-10k Ethereum Uniswap NA 1.699 M +1 Azuki-WETH Ethereum Uniswap NA 1.181 M +2 WETH-RYOSHI Ethereum Uniswap NA 1.569 M +3 Hasbro-WETH Ethereum Uniswap NA 1.025 M +4 WETH-GENIE Ethereum Uniswap NA 1.770 M +5 WETH-PRAG Ethereum Uniswap NA 1.359 M +6 APELAND-WETH Ethereum Uniswap NA 1.216 M +7 Line-WETH Ethereum Uniswap NA 2.065 M +8 USDC-CRV Ethereum Uniswap NA 1.722 M +9 USDD-USDT (0.01%) Ethereum Uniswap NA 3.926 M +10 WETH-DOODLE Ethereum Uniswap NA 2.887 M +11 HOOT-WETH Ethereum Uniswap NA 1.474 M +12 Firefox-WETH Ethereum Uniswap NA 1.963 M +13 WBTC-BBTC (0.05%) Ethereum Uniswap NA 4.200 M +14 WETH-Richemont Ethereum Uniswap NA 1.631 M +15 WETH-OP Ethereum Uniswap NA 1.665 M