Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove defirate scraping #2113

Merged
merged 3 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,6 @@ en:
crypto/onchain/tx: ethereum blockchain transaction info
crypto/defi/newsletter: recent DeFi related newsletters
crypto/defi/dpi: DeFi protocols listed on DefiPulse
crypto/defi/funding: funding rates - current or last 30 days average
crypto/defi/borrow: DeFi borrow rates - current or last 30 days average
crypto/defi/lending: DeFi ending rates - current or last 30 days average
crypto/defi/vaults: top DeFi Vaults on different blockchains
crypto/defi/tokens: tokens trade-able on Uniswap
crypto/defi/stats: base statistics about Uniswap
Expand Down
3 changes: 0 additions & 3 deletions openbb_terminal/cryptocurrency/defi/defi_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
from .llama_view import display_historical_tvl as dtvl
from .llama_view import display_defi_protocols as ldapps
from .llama_view import display_defi_tvl as stvl
from .defirate_view import display_funding_rates as funding
from .defirate_view import display_borrow_rates as borrow
from .defirate_view import display_lending_rates as lending
from .substack_view import display_newsletters as newsletter
from .graph_view import display_uni_tokens as tokens
from .graph_view import display_uni_stats as stats
Expand Down
124 changes: 0 additions & 124 deletions openbb_terminal/cryptocurrency/defi/defi_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
coindix_view,
cryptosaurio_view,
defipulse_view,
defirate_view,
graph_model,
graph_view,
llama_model,
Expand Down Expand Up @@ -46,9 +45,6 @@ class DefiController(BaseController):

CHOICES_COMMANDS = [
"dpi",
"funding",
"lending",
"borrow",
"ldapps",
"gdapps",
"stvl",
Expand Down Expand Up @@ -103,9 +99,6 @@ def print_help(self):
mt = MenuText("crypto/defi/")
mt.add_cmd("newsletter", "Substack")
mt.add_cmd("dpi", "Defipulse")
mt.add_cmd("funding", "Defirate")
mt.add_cmd("borrow", "Defirate")
mt.add_cmd("lending", "Defirate")
mt.add_cmd("vaults", "Coindix")
mt.add_cmd("tokens", "The Graph")
mt.add_cmd("stats", "The Graph")
Expand Down Expand Up @@ -640,123 +633,6 @@ def call_stvl(self, other_args: List[str]):
if ns_parser:
llama_view.display_defi_tvl(top=ns_parser.limit, export=ns_parser.export)

@log_start_end(log=logger)
def call_funding(self, other_args: List[str]):
"""Process funding command"""
parser = argparse.ArgumentParser(
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="funding",
description="""
Display Funding rates.
[Source: https://defirate.com/]
""",
)

parser.add_argument(
"-l",
"--limit",
dest="limit",
type=check_positive,
help="Number of records to display",
default=10,
)

parser.add_argument(
"--current",
action="store_false",
default=True,
dest="current",
help="Show Current Funding Rates or Last 30 Days Average",
)

ns_parser = self.parse_known_args_and_warn(
parser, other_args, EXPORT_ONLY_RAW_DATA_ALLOWED
)

if ns_parser:
defirate_view.display_funding_rates(
top=ns_parser.limit, current=ns_parser.current, export=ns_parser.export
)

@log_start_end(log=logger)
def call_borrow(self, other_args: List[str]):
"""Process borrow command"""
parser = argparse.ArgumentParser(
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="borrow",
description="""
Display DeFi borrow rates.
[Source: https://defirate.com/]
""",
)

parser.add_argument(
"-l",
"--limit",
dest="limit",
type=check_positive,
help="Number of records to display",
default=10,
)

parser.add_argument(
"--current",
action="store_false",
default=True,
dest="current",
help="Show Current Borrow Rates or Last 30 Days Average",
)

ns_parser = self.parse_known_args_and_warn(
parser, other_args, EXPORT_ONLY_RAW_DATA_ALLOWED
)

if ns_parser:
defirate_view.display_borrow_rates(
top=ns_parser.limit, current=ns_parser.current, export=ns_parser.export
)

@log_start_end(log=logger)
def call_lending(self, other_args: List[str]):
"""Process lending command"""
parser = argparse.ArgumentParser(
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="lending",
description="""
Display DeFi lending rates.
[Source: https://defirate.com/]
""",
)

parser.add_argument(
"-l",
"--limit",
dest="limit",
type=check_positive,
help="Number of records to display",
default=15,
)

parser.add_argument(
"--current",
action="store_false",
default=True,
dest="current",
help="Show Current Lending Rates or Last 30 Days Average",
)

ns_parser = self.parse_known_args_and_warn(
parser, other_args, EXPORT_ONLY_RAW_DATA_ALLOWED
)

if ns_parser:
defirate_view.display_lending_rates(
top=ns_parser.limit, current=ns_parser.current, export=ns_parser.export
)

@log_start_end(log=logger)
def call_newsletter(self, other_args: List[str]):
"""Process newsletter command"""
Expand Down
134 changes: 0 additions & 134 deletions openbb_terminal/cryptocurrency/defi/defirate_model.py

This file was deleted.

Loading