fractal.loaders.thegraph package
Subpackages
- fractal.loaders.thegraph.uniswap_v2 package
- fractal.loaders.thegraph.uniswap_v3 package
- Submodules
- fractal.loaders.thegraph.uniswap_v3.uniswap_v3_arbitrum module
- fractal.loaders.thegraph.uniswap_v3.uniswap_v3_ethereum module
- fractal.loaders.thegraph.uniswap_v3.uniswap_v3_pool module
- fractal.loaders.thegraph.uniswap_v3.uniswap_v3_spot_prices module
- Module contents
Submodules
fractal.loaders.thegraph.base_graph_loader module
- class fractal.loaders.thegraph.base_graph_loader.ArbitrumGraphLoader(api_key: str, subgraph_id: str, loader_type: LoaderType)[source]
Bases:
BaseGraphLoader
Graph Loader with arbitrum gateway
- ROOT_URL = 'https://gateway-arbitrum.network.thegraph.com/api'
- loader_type: LoaderType
- class fractal.loaders.thegraph.base_graph_loader.BaseGraphLoader(root_url: str, api_key: str, subgraph_id: str, loader_type: LoaderType)[source]
Bases:
Loader
Base class for The Graph loaders.
Each graph loader should inherit from this class. It should have the following attributes: - subgraph_id: The ID of the subgraph - root_url: The root URL of the graph - api_key: The API key to access
fractal.loaders.thegraph.lido module
- class fractal.loaders.thegraph.lido.StETHLoader(api_key: str, loader_type: LoaderType)[source]
Bases:
ArbitrumGraphLoader
StETH (Lido) Loader. https://thegraph.com/explorer/subgraphs/Sxx812XgeKyzQPaBpR5YZWmGV5fZuBaPdh7DFhzSwiQ?view=Query&chain=arbitrum-one
SUBGRAPH_ID: Sxx812XgeKyzQPaBpR5YZWmGV5fZuBaPdh7DFhzSwiQ
- SUBGRAPH_ID = 'Sxx812XgeKyzQPaBpR5YZWmGV5fZuBaPdh7DFhzSwiQ'
- loader_type: LoaderType
- read(with_run: bool = False) RateHistory [source]
Module contents
- class fractal.loaders.thegraph.ArbitrumGraphLoader(api_key: str, subgraph_id: str, loader_type: LoaderType)[source]
Bases:
BaseGraphLoader
Graph Loader with arbitrum gateway
- ROOT_URL = 'https://gateway-arbitrum.network.thegraph.com/api'
- loader_type: LoaderType
- class fractal.loaders.thegraph.ArbitrumUniswapV3Loader(api_key: str, loader_type: LoaderType)[source]
Bases:
ArbitrumGraphLoader
Loader for Uniswap V3 Arbitrum. The Graph: https://thegraph.com/explorer/subgraphs/FQ6JYszEKApsBpAmiHesRsd9Ygc6mzmpNRANeVQFYoVX?view=Query&chain=arbitrum-one SUBGRAPH_ID = “FQ6JYszEKApsBpAmiHesRsd9Ygc6mzmpNRANeVQFYoVX”
- SUBGRAPH_ID = 'FQ6JYszEKApsBpAmiHesRsd9Ygc6mzmpNRANeVQFYoVX'
- class fractal.loaders.thegraph.BaseGraphLoader(root_url: str, api_key: str, subgraph_id: str, loader_type: LoaderType)[source]
Bases:
Loader
Base class for The Graph loaders.
Each graph loader should inherit from this class. It should have the following attributes: - subgraph_id: The ID of the subgraph - root_url: The root URL of the graph - api_key: The API key to access
- class fractal.loaders.thegraph.EthereumUniswapV2Loader(api_key: str, loader_type: LoaderType)[source]
Bases:
ArbitrumGraphLoader
Loader for Uniswap V2 Ethereum. The Graph: https://thegraph.com/explorer/subgraphs/EYCKATKGBKLWvSfwvBjzfCBmGwYNdVkduYXVivCsLRFu?view=Query&chain=arbitrum-one SUBGRAPH_ID = “EYCKATKGBKLWvSfwvBjzfCBmGwYNdVkduYXVivCsLRFu”
- SUBGRAPH_ID = 'EYCKATKGBKLWvSfwvBjzfCBmGwYNdVkduYXVivCsLRFu'
- class fractal.loaders.thegraph.EthereumUniswapV2PoolDataLoader(api_key: str, pool: str, fee_tier: float, loader_type: LoaderType)[source]
Bases:
EthereumUniswapV2Loader
Loader for Uniswap V2 PoolData
- read(with_run: bool = False) PoolHistory [source]
- class fractal.loaders.thegraph.EthereumUniswapV3Loader(api_key: str, loader_type: LoaderType)[source]
Bases:
ArbitrumGraphLoader
Loader for Uniswap V3 Ethereum. The Graph: https://thegraph.com/explorer/subgraphs/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV?view=Query&chain=arbitrum-one SUBGRAPH_ID = “5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV”
- SUBGRAPH_ID = '5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV'
- class fractal.loaders.thegraph.StETHLoader(api_key: str, loader_type: LoaderType)[source]
Bases:
ArbitrumGraphLoader
StETH (Lido) Loader. https://thegraph.com/explorer/subgraphs/Sxx812XgeKyzQPaBpR5YZWmGV5fZuBaPdh7DFhzSwiQ?view=Query&chain=arbitrum-one
SUBGRAPH_ID: Sxx812XgeKyzQPaBpR5YZWmGV5fZuBaPdh7DFhzSwiQ
- SUBGRAPH_ID = 'Sxx812XgeKyzQPaBpR5YZWmGV5fZuBaPdh7DFhzSwiQ'
- loader_type: LoaderType
- read(with_run: bool = False) RateHistory [source]
- class fractal.loaders.thegraph.UniswapV3ArbitrumPoolDayDataLoader(api_key: str, pool: str, loader_type: LoaderType)[source]
Bases:
ArbitrumUniswapV3Loader
- read(with_run: bool = False) PoolHistory [source]
- class fractal.loaders.thegraph.UniswapV3ArbitrumPoolHourDataLoader(api_key: str, pool: str, loader_type: LoaderType)[source]
- class fractal.loaders.thegraph.UniswapV3ArbitrumPricesLoader(api_key: str, pool: str, loader_type: LoaderType, **kwargs)[source]
Bases:
ArbitrumUniswapV3Loader
- read(with_run: bool = False) PriceHistory [source]
- class fractal.loaders.thegraph.UniswapV3EthereumPoolDayDataLoader(api_key: str, pool: str, loader_type: LoaderType)[source]
Bases:
EthereumUniswapV3Loader
- read(with_run: bool = False) PoolHistory [source]
- class fractal.loaders.thegraph.UniswapV3EthereumPoolHourDataLoader(api_key: str, pool: str, loader_type: LoaderType)[source]