komodo_cex_market_data library
Komodo CEX market data library for fetching and managing cryptocurrency market data.
Provides support for multiple market data providers with fallback capabilities, repository selection strategies, and robust error handling.
Classes
- AssetMarketInformation
- A class for representing price information of an asset in a centralized exchange (CEX). This class includes details such as the ticker symbol, last price, last updated timestamp, price provider, 24-hour price change, and volume information. TODO: consider migrating to CoinMarketData or adding more fields from that model here.
- BinanceExchangeInfoResponse
- Represents the response from the Binance Exchange Info API.
- BinanceIdResolutionStrategy
- Binance-specific ID resolution strategy
- BinanceProvider
- A provider class for fetching data from the Binance API.
- BinanceRepository
- A repository class for interacting with the Binance API. This class provides methods to fetch legacy tickers and OHLC candle data.
- CexCoin
- Represents a coin that can be traded on the CEX exchange.
- CexDataProviderConverter
- Custom converter for CexDataProvider
- CexRepository
- An abstract class that defines the methods for fetching data from a cryptocurrency exchange. The exchange-specific repository classes should implement this class.
- CoinGeckoCexProvider
- A class for fetching data from CoinGecko API.
- CoinGeckoIdResolutionStrategy
- CoinGecko-specific ID resolution strategy
- CoinGeckoRepository
- A repository class for interacting with the CoinGecko API.
- CoinMarketChart
- CoinMarketData
- Represents the market data of a coin.
- CoinOhlc
- Represents Open-High-Low-Close (OHLC) data.
- Commodity
- Static constants and helper methods for Commodities
- Cryptocurrency
- Static constants and helper methods for Cryptocurrencies
- DefaultRepositorySelectionStrategy
- Default strategy for selecting the best repository for a given asset
- FiatCurrency
- Static constants and helper methods for Fiat currencies
- Filter
- Represents a filter applied to a symbol.
- IBinanceProvider
- ICoinGeckoProvider
- Interface for fetching data from CoinGecko API.
- IdResolutionStrategy
- Strategy for resolving platform-specific asset identifiers
- IKomodoPriceProvider
- Interface for fetching prices from Komodo API.
- KomodoIdResolutionStrategy
- Komodo-specific ID resolution strategy
- KomodoPriceProvider
- A class for fetching prices from Komodo API.
- KomodoPriceRepository
- A repository for fetching the prices of coins from the Komodo Defi API.
- MarketDataBootstrap
- Bootstrap factory for market data dependencies
- MarketDataConfig
- Configuration for market data repositories
- Ohlc
- Represents OHLC (Open-High-Low-Close) candlestick data from various sources.
- QuoteCurrency
- Base class for all currencies used in price quotations
- RateLimit
- Represents a rate limit type for an API endpoint.
- RepositoryPriorityManager
- Utility class for managing repository priorities using a map-based approach.
- RepositorySelectionStrategy
- Strategy interface for selecting repositories
- SparklineRepository
- Repository for fetching sparkline data
- Stablecoin
- Static constants and helper methods for Stablecoins
- Symbol
- Represents a symbol on the exchange.
- SymbolReduced
- A reduced version of Symbol with the bare minimum required fields. This class is used to reduce the amount of data fetched parsed from the Binance API response to reduce memory and CPU usage.
Enums
- CexDataProvider
- An enum for representing a CEX data provider.
- GraphInterval
- OhlcSource
- Source hint for parsing OHLC arrays.
- PriceRequestType
- Enum for the type of price request
- RepositoryType
- Enum representing available repository types
Mixins
- RepositoryFallbackMixin
- Mixin that provides repository fallback functionality for market data managers
Extensions
- AssetMarketInformationPatterns on AssetMarketInformation
- Adds pattern-matching-related methods to AssetMarketInformation.
- CoinMarketDataPatterns on CoinMarketData
- Adds pattern-matching-related methods to CoinMarketData.
- GraphIntervalExtension on GraphInterval
- OhlcGetters on Ohlc
- Extension providing unified accessors for Ohlc data regardless of source.
-
OhlcListToCoinOhlc
on List<
Ohlc> -
Extension for converting a list of Ohlc objects to a
CoinOhlcobject. - OhlcPatterns on Ohlc
- Adds pattern-matching-related methods to Ohlc.
- QuoteCurrencyMapping on QuoteCurrency
- Extension methods for currency mapping functionality
- QuoteCurrencyPatterns on QuoteCurrency
- Adds pattern-matching-related methods to QuoteCurrency.
- QuoteCurrencyTypeChecking on QuoteCurrency
- Extension methods for type checking and utility functions
Constants
-
graphIntervalsInSeconds
→ const Map<
GraphInterval, int> -
graphIntervalsMap
→ const Map<
GraphInterval, String> - maxCoinGeckoDays → const int
- The maximum number of days that CoinGecko API supports for historical data.
- secondsInDay → const int
- The number of seconds in a day.
Properties
-
binanceApiEndpoint
→ List<
String> -
The base URL for the Binance API.
no setter
- sparklineRepository ↔ SparklineRepository
-
getter/setter pair