Skip to content

Commit

Permalink
Merge pull request #809 from tellor-io/sources
Browse files Browse the repository at this point in the history
Sources
  • Loading branch information
0xSpuddy authored Sep 26, 2024
2 parents 4e4f10c + e9fd5ee commit 473b3f7
Show file tree
Hide file tree
Showing 55 changed files with 620 additions and 30 deletions.
5 changes: 5 additions & 0 deletions src/telliot_feeds/feeds/badger_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

badger_usd_median_feed = DataFeed(
query=SpotPrice(asset="BADGER", currency="USD"),
source=PriceAggregator(
asset="badger",
currency="usd",
algorithm="median",
sources=[
# BinanceSpotPriceSource(asset="badger", currency="usd"),
CoinGeckoSpotPriceSource(asset="badger", currency="usd"),
KrakenSpotPriceSource(asset="badger", currency="usd"),
OKXSpotPriceSource(asset="badger", currency="usdt"),
],
),
)
5 changes: 5 additions & 0 deletions src/telliot_feeds/feeds/bch_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

bch_usd_median_feed = DataFeed(
query=SpotPrice(asset="BCH", currency="USD"),
source=PriceAggregator(
asset="bch",
currency="usd",
algorithm="median",
sources=[
# BinanceSpotPriceSource(asset="bch", currency="usd"),
CoinGeckoSpotPriceSource(asset="bch", currency="usd"),
KrakenSpotPriceSource(asset="bch", currency="usd"),
OKXSpotPriceSource(asset="bch", currency="usdt"),
],
),
)
7 changes: 5 additions & 2 deletions src/telliot_feeds/feeds/btc_usd_feed.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

btc_usd_median_feed = DataFeed(
query=SpotPrice(asset="BTC", currency="USD"),
source=PriceAggregator(
asset="btc",
currency="usd",
algorithm="median",
sources=[
# BinanceSpotPriceSource(asset="btc", currency="usdt"),
CoinGeckoSpotPriceSource(asset="btc", currency="usd"),
BinanceSpotPriceSource(asset="btc", currency="usdt"),
GeminiSpotPriceSource(asset="btc", currency="usd"),
KrakenSpotPriceSource(asset="xbt", currency="usd"),
OKXSpotPriceSource(asset="btc", currency="usdt"),
],
),
)
5 changes: 5 additions & 0 deletions src/telliot_feeds/feeds/comp_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

comp_usd_median_feed = DataFeed(
query=SpotPrice(asset="COMP", currency="USD"),
source=PriceAggregator(
asset="comp",
currency="usd",
algorithm="median",
sources=[
# BinanceSpotPriceSource(asset="comp", currency="usd"),
CoinGeckoSpotPriceSource(asset="comp", currency="usd"),
GeminiSpotPriceSource(asset="comp", currency="usd"),
OKXSpotPriceSource(asset="comp", currency="usdt"),
],
),
)
5 changes: 5 additions & 0 deletions src/telliot_feeds/feeds/crv_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

crv_usd_median_feed = DataFeed(
query=SpotPrice(asset="CRV", currency="USD"),
source=PriceAggregator(
asset="crv",
currency="usd",
algorithm="median",
sources=[
# BinanceSpotPriceSource(asset="crv", currency="usd"),
CoinGeckoSpotPriceSource(asset="crv", currency="usd"),
KrakenSpotPriceSource(asset="crv", currency="usd"),
OKXSpotPriceSource(asset="crv", currency="usdt"),
],
),
)
5 changes: 3 additions & 2 deletions src/telliot_feeds/feeds/dai_usd_feed.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.uniswapV3 import UniswapV3PriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

dai_usd_median_feed = DataFeed(
query=SpotPrice(asset="DAI", currency="USD"),
source=PriceAggregator(
Expand All @@ -14,7 +15,7 @@
algorithm="median",
sources=[
CoinGeckoSpotPriceSource(asset="dai", currency="usd"),
BinanceSpotPriceSource(asset="dai", currency="usdt"),
# BinanceSpotPriceSource(asset="dai", currency="usdt"),
GeminiSpotPriceSource(asset="dai", currency="usd"),
UniswapV3PriceSource(asset="dai", currency="usd"),
],
Expand Down
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/doge_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

doge_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="doge", currency="usd"),
GeminiSpotPriceSource(asset="doge", currency="usd"),
OKXSpotPriceSource(asset="doge", currency="usdt"),
],
),
)
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/dot_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

dot_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="dot", currency="usd"),
GeminiSpotPriceSource(asset="dot", currency="usd"),
OKXSpotPriceSource(asset="dot", currency="usdt"),
],
),
)
7 changes: 5 additions & 2 deletions src/telliot_feeds/feeds/eth_btc_feed.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

eth_btc_median_feed = DataFeed(
query=SpotPrice(asset="ETH", currency="BTC"),
source=PriceAggregator(
Expand All @@ -13,8 +15,9 @@
algorithm="median",
sources=[
CoinGeckoSpotPriceSource(asset="eth", currency="btc"),
BinanceSpotPriceSource(asset="eth", currency="btc"),
# BinanceSpotPriceSource(asset="eth", currency="btc"),
GeminiSpotPriceSource(asset="eth", currency="btc"),
OKXSpotPriceSource(asset="eth", currency="btc"),
],
),
)
5 changes: 5 additions & 0 deletions src/telliot_feeds/feeds/eth_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

eth_usd_median_feed = DataFeed(
query=SpotPrice(asset="ETH", currency="USD"),
source=PriceAggregator(
asset="eth",
currency="usd",
algorithm="median",
sources=[
# BinanceSpotPriceSource(asset="eth", currency="btc"),
CoinGeckoSpotPriceSource(asset="eth", currency="usd"),
GeminiSpotPriceSource(asset="eth", currency="usd"),
KrakenSpotPriceSource(asset="eth", currency="usd"),
OKXSpotPriceSource(asset="eth", currency="usdt"),
],
),
)
4 changes: 2 additions & 2 deletions src/telliot_feeds/feeds/eul_usd_feed.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.uniswapV3 import UniswapV3PriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

eul_usd_median_feed = DataFeed(
Expand All @@ -13,8 +13,8 @@
algorithm="median",
sources=[
CoinGeckoSpotPriceSource(asset="eul", currency="usd"),
GeminiSpotPriceSource(asset="eul", currency="usd"),
KrakenSpotPriceSource(asset="eul", currency="usd"),
UniswapV3PriceSource(asset="eul", currency="usd"),
],
),
)
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/fil_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

fil_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="fil", currency="usd"),
KrakenSpotPriceSource(asset="fil", currency="usd"),
OKXSpotPriceSource(asset="fil", currency="usdt"),
],
),
)
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/grt_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

grt_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="grt", currency="usd"),
GeminiSpotPriceSource(asset="grt", currency="usd"),
OKXSpotPriceSource(asset="grt", currency="usdt"),
],
),
)
2 changes: 0 additions & 2 deletions src/telliot_feeds/feeds/idle_usd_feed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.nomics import NomicsSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

idle_usd_median_feed = DataFeed(
Expand All @@ -12,7 +11,6 @@
algorithm="median",
sources=[
CoinGeckoSpotPriceSource(asset="idle", currency="usd"),
NomicsSpotPriceSource(asset="idle", currency="usd"),
],
),
)
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/link_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

link_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="link", currency="usd"),
KrakenSpotPriceSource(asset="link", currency="usd"),
OKXSpotPriceSource(asset="link", currency="usdt"),
],
),
)
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/ltc_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

ltc_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="ltc", currency="usd"),
GeminiSpotPriceSource(asset="ltc", currency="usd"),
OKXSpotPriceSource(asset="ltc", currency="usdt"),
],
),
)
5 changes: 3 additions & 2 deletions src/telliot_feeds/feeds/matic_usd_feed.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

matic_usd_median_feed = DataFeed(
query=SpotPrice(asset="MATIC", currency="USD"),
source=PriceAggregator(
Expand All @@ -14,7 +15,7 @@
algorithm="median",
sources=[
CoinGeckoSpotPriceSource(asset="matic", currency="usd"),
BinanceSpotPriceSource(asset="matic", currency="usdt"),
# BinanceSpotPriceSource(asset="matic", currency="usdt"),
GeminiSpotPriceSource(asset="matic", currency="usd"),
KrakenSpotPriceSource(asset="matic", currency="usd"),
],
Expand Down
5 changes: 3 additions & 2 deletions src/telliot_feeds/feeds/mkr_usd_feed.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from telliot_feeds.datafeed import DataFeed
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.gemini import GeminiSpotPriceSource
from telliot_feeds.sources.price.spot.kraken import KrakenSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

# from telliot_feeds.sources.price.spot.binance import BinanceSpotPriceSource

mkr_usd_median_feed = DataFeed(
query=SpotPrice(asset="MKR", currency="USD"),
source=PriceAggregator(
Expand All @@ -14,7 +15,7 @@
algorithm="median",
sources=[
CoinGeckoSpotPriceSource(asset="mkr", currency="usd"),
BinanceSpotPriceSource(asset="mkr", currency="usdt"),
# BinanceSpotPriceSource(asset="mkr", currency="usdt"),
GeminiSpotPriceSource(asset="mkr", currency="usd"),
KrakenSpotPriceSource(asset="mkr", currency="usd"),
],
Expand Down
2 changes: 2 additions & 0 deletions src/telliot_feeds/feeds/op_usd_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from telliot_feeds.queries.price.spot_price import SpotPrice
from telliot_feeds.sources.price.spot.coingecko import CoinGeckoSpotPriceSource
from telliot_feeds.sources.price.spot.coinpaprika import CoinpaprikaSpotPriceSource
from telliot_feeds.sources.price.spot.okx import OKXSpotPriceSource
from telliot_feeds.sources.price_aggregator import PriceAggregator

op_usd_median_feed = DataFeed(
Expand All @@ -13,6 +14,7 @@
sources=[
CoinGeckoSpotPriceSource(asset="op", currency="usd"),
CoinpaprikaSpotPriceSource(asset="op-optimism", currency="usd"),
OKXSpotPriceSource(asset="op", currency="usdt"),
],
),
)
Loading

0 comments on commit 473b3f7

Please sign in to comment.