Lending protocols and short/long leverage data#
Load lending market data for a specific chain (Polygon in this example) and diplay status of the lending market.
In this specific example we download interest rates and prices for all assets on Aave v3 on Polygon.
As this notebook always uses latest data, it does not cache any downloaded datasets and may be slow to run depending on the speed of your Internet.
TODO: Some adjustments to this notebook are needed later, as the server-side data format will be switched from percents to raw floating points.
Set up client and API keys to download dataset#
import datetime import pandas as pd from tradingstrategy.client import Client # You will be interactively prompted to register an API key if you do not have one yet client = Client.create_jupyter_client()
Started Trading Strategy in Jupyter notebook environment, configuration is stored in /Users/moo/.tradingstrategy
We set the notebook output to static image mode, so anyone can view this notetbook results directly on Github link.
Set back to interactive mode if you want to have draggable and zoomable charts in your notebook.
from tradeexecutor.utils.notebook import OutputMode, setup_charting_and_output setup_charting_and_output(OutputMode.static)