Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refact osmo #99

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions config/default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var DefaultPriceServerConfig = Config{
Port: 8532,
MetricsPort: 8533,
Sentry: "",
ProviderPriority: []string{"astroport", "binance", "huobi", "coingecko", "kucoin", "bitfinex", "kraken", "okx", "osmosis" /*"bitstamp", */, "bybit" /*"bittrex",*/, "exchangerate", "frankfurter", "fer"},
ProviderPriority: []string{"astroport", "binance", "huobi", "kucoin", "bitfinex", "kraken", "okx", "coingecko", "osmosis", "bitstamp", "bybit" /*"bittrex",*/, "exchangerate", "frankfurter", "fer"},
Providers: map[string]ProviderConfig{
"astroport": {
Interval: 30,
Expand Down Expand Up @@ -1189,9 +1189,10 @@ var DefaultPriceServerConfig = Config{
},
},
"coingecko": {
Interval: 6,
Interval: 30,
Timeout: 10,
Symbols: []string{
"osmosis",
"bitcoin",
"ethereum",
"binancecoin",
Expand All @@ -1211,26 +1212,28 @@ var DefaultPriceServerConfig = Config{
"stargaze",
"akash-network",
"white-whale",
"eris-amplified-whale",
"switcheo",
"stafi-staked-swth",
"stride-staked-luna",
},
},
"osmosis": {
Interval: 6,
Interval: 30,
Symbols: []string{
"ATOM/USDC",
"AKT/USDC",
"JUNO/USDC",
"SCRT/USDC",
"STARS/USDC",
"ATOM/OSMO",
"AKT/OSMO",
"JUNO/OSMO",
"SCRT/OSMO",
"STARS/OSMO",
"USDC/OSMO",
"INJ/OSMO",
"LUNA/OSMO",
"KAVA/OSMO",
"LINK/OSMO",
"LUNC/OSMO",
"ASH/USDC",
"OSMO/USDC",
"INJ/USDC",
"LUNA/USDC",
"KAVA/USDC",
"LINK/USDC",
"DOT/USDC",
"LUNC/USDC",
},
},
"coinbase": {
Expand Down
46 changes: 24 additions & 22 deletions internal/parser/internal/coingecko/coingecko.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,30 @@ import (

// symbol to base coin mapping
var COIN_GECKO_MAPPING = map[string]string{
"bitcoin": "BTC",
"ethereum": "ETH",
"binancecoin": "BNB",
"tether": "USDT",
"usd-coin": "USDC",
"binance-usd": "BUSD",
"dai": "DAI",
"okb": "OKB",
"solana": "SOL",
"cosmos": "ATOM",
"terra-luna-2": "LUNA",
"terra-luna": "LUNC",
"terrausd": "USTC",
"injective-protocol": "INJ",
"secret": "SCRT",
"juno-network": "JUNO",
"stargaze": "STARS",
"akash-network": "AKT",
"white-whale": "WHALE", // White Whale chain
"switcheo": "SWTH", // Carbon chain
"stafi-staked-swth": "rSWTH", // stafi-staked-swth
"stride-staked-luna": "STLUNA", // Stride chain
"bitcoin": "BTC",
"ethereum": "ETH",
"binancecoin": "BNB",
"tether": "USDT",
"usd-coin": "USDC",
"binance-usd": "BUSD",
"dai": "DAI",
"okb": "OKB",
"solana": "SOL",
"cosmos": "ATOM",
"terra-luna-2": "LUNA",
"terra-luna": "LUNC",
"terrausd": "USTC",
"injective-protocol": "INJ",
"eris-amplified-whale": "AMPWHALE",
"secret": "SCRT",
"juno-network": "JUNO",
"stargaze": "STARS",
"akash-network": "AKT",
"white-whale": "WHALE", // White Whale chain
"switcheo": "SWTH", // Carbon chain
"stride-staked-luna": "STLUNA", // Stride chain
"stafi-staked-swth": "rSWTH", // stafi-staked-swth
"osmosis": "OSMO",
}

func ParseSymbol(symbol string) (string, string, error) {
Expand Down
Loading
Loading