Skip to content

Commit

Permalink
feat: add brother support + remove propeller fetcher (#227)
Browse files Browse the repository at this point in the history
* feat: add brother support + remove propeller fetcher

* chore: price pusher configs
  • Loading branch information
EvolveArt authored Nov 22, 2024
1 parent 2779b57 commit 8c44027
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 222 deletions.
1 change: 1 addition & 0 deletions infra/price-pusher/config/config.mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- ZEND/USD
- NSTR/USD
- EKUBO/USD
- BROTHER/USD
time_difference: 600
price_deviation: 0.025

Expand Down
1 change: 1 addition & 0 deletions infra/price-pusher/config/config.sepolia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- ZEND/USD
- NSTR/USD
- EKUBO/USD
- BROTHER/USD
- LUSD/USD
time_difference: 120
price_deviation: 0.005
Expand Down
2 changes: 1 addition & 1 deletion pragma-sdk/docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ An API key is currently needed to interact with the off-chain API. You can get o
)
# Get 1min OHLC data
entries = await poc.get_ohlc(
entries = await pac.get_ohlc(
'BTC/USD',
None,
Interval.ONE_MINUTE,
Expand Down
2 changes: 0 additions & 2 deletions pragma-sdk/pragma_sdk/common/fetchers/fetchers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pragma_sdk.common.fetchers.fetchers.indexcoop import IndexCoopFetcher
from pragma_sdk.common.fetchers.fetchers.kucoin import KucoinFetcher
from pragma_sdk.common.fetchers.fetchers.okx import OkxFetcher
from pragma_sdk.common.fetchers.fetchers.propeller import PropellerFetcher
from pragma_sdk.common.fetchers.fetchers.ekubo import EkuboFetcher
from pragma_sdk.common.fetchers.fetchers.mexc import MEXCFetcher
from pragma_sdk.common.fetchers.fetchers.gateio import GateioFetcher
Expand All @@ -25,7 +24,6 @@
"IndexCoopFetcher",
"KucoinFetcher",
"OkxFetcher",
"PropellerFetcher",
"EkuboFetcher",
"MEXCFetcher",
"GateioFetcher",
Expand Down
4 changes: 4 additions & 0 deletions pragma-sdk/pragma_sdk/common/fetchers/fetchers/gecko.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
"DPI": ("eth", "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b"),
"MVI": ("eth", "0x72e364f2abdc788b7e918bc238b21f109cd634d7"),
"NSTR": ("eth", "0x610dbd98a28ebba525e9926b6aaf88f9159edbfd"),
"BROTHER": (
"starknet-alpha",
"0x3b405a98c9e795d427fe82cdeeeed803f221b52471e3a757574a2b4180793ee",
),
}


Expand Down
145 changes: 0 additions & 145 deletions pragma-sdk/pragma_sdk/common/fetchers/fetchers/propeller.py

This file was deleted.

6 changes: 6 additions & 0 deletions pragma-sdk/pragma_sdk/supported_assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,9 @@
decimals: 18
ticker: 'ONDO'
coingecko_id: 'ondo'

- name: 'STARKNET BROTHER'
decimals: 18
ticker: 'BROTHER'
coingecko_id: 'starknet-brother'
starknet_address: '0x3b405a98c9e795d427fe82cdeeeed803f221b52471e3a757574a2b4180793ee'
13 changes: 0 additions & 13 deletions pragma-sdk/tests/integration/fetchers/fetcher_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
CoinbaseFetcher,
OkxFetcher,
EkuboFetcher,
PropellerFetcher,
GeckoTerminalFetcher,
DexscreenerFetcher,
)
Expand Down Expand Up @@ -121,18 +120,6 @@
PUBLISHER_NAME,
),
},
"PropellerFetcher": {
"mock_file": MOCK_DIR / "responses" / "propeller.json",
"fetcher_class": PropellerFetcher,
"name": "PROPELLER",
"expected_result": SpotEntry(
"INDEXNAME1",
int(4891252302700 * 0.5 + 0.5 * 262209039700),
12345,
"PROPELLER",
PUBLISHER_NAME,
),
},
}

FUTURE_FETCHER_CONFIGS = {
Expand Down
58 changes: 0 additions & 58 deletions pragma-sdk/tests/integration/mock/responses/propeller.json

This file was deleted.

3 changes: 0 additions & 3 deletions price-pusher/price_pusher/configs/fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
KucoinFetcher,
OkxFetcher,
BinanceFetcher,
PropellerFetcher,
EkuboFetcher,
DexscreenerFetcher,
)
Expand All @@ -32,7 +31,6 @@
KucoinFetcher,
BybitFetcher,
BinanceFetcher,
PropellerFetcher,
EkuboFetcher,
DexscreenerFetcher,
]
Expand All @@ -56,7 +54,6 @@ class FetcherWithApiKeyConfig:

# Configuration for fetchers that may require API keys.
FETCHERS_WITH_API_KEY: Dict[FetcherInterfaceT, FetcherWithApiKeyConfig] = {
PropellerFetcher: FetcherWithApiKeyConfig(env_api_key="PROPELLER_API_KEY"),
DefillamaFetcher: FetcherWithApiKeyConfig(
env_api_key="DEFI_LLAMA_API_KEY", optional=True
),
Expand Down

0 comments on commit 8c44027

Please sign in to comment.