Browse Source

Fix ETHO CoinGecko API ID

main
def 1 week ago
parent
commit
298291e332
  1. 9
      oracle/fetch_prices.js
  2. 32
      oracle/price_cache.json

9
oracle/fetch_prices.js

@ -21,7 +21,7 @@ async function fetchCoinGeckoSimplePrice() {
const ids = [ const ids = [
'usd-coin', 'usd-coin',
'ethereum', 'ethereum',
'etho-protocol', 'ether-1',
'etica' 'etica'
].join(','); ].join(',');
@ -55,10 +55,10 @@ async function main() {
}); });
} }
if (data['etho-protocol']) { if (data['ether-1']) {
updateCachedPrice('ETHO_ETHO', { updateCachedPrice('ETHO_ETHO', {
price_usd: data['etho-protocol'].usd ?? null, price_usd: data['ether-1'].usd ?? null,
price_cad: data['etho-protocol'].cad ?? null, price_cad: data['ether-1'].cad ?? null,
source: 'coingecko', source: 'coingecko',
source_status: 'primary', source_status: 'primary',
updated_at: now updated_at: now
@ -81,7 +81,6 @@ async function main() {
updated_pairs: ['USDC_ARB', 'ETH_ETH', 'ETHO_ETHO', 'ETI_ETICA'] updated_pairs: ['USDC_ARB', 'ETH_ETH', 'ETHO_ETHO', 'ETI_ETICA']
}, null, 2)); }, null, 2));
} }
main().catch(err => { main().catch(err => {
console.error(`fetch_prices.js failed: ${err.message}`); console.error(`fetch_prices.js failed: ${err.message}`);
process.exit(1); process.exit(1);

32
oracle/price_cache.json

@ -1,40 +1,40 @@
{ {
"version": "0.1", "version": "0.1",
"updated_at": "2026-03-15T00:06:52.407Z", "updated_at": "2026-03-15T00:11:11.634Z",
"status": "fresh", "status": "fresh",
"assets": { "assets": {
"USDC_ARB": { "USDC_ARB": {
"symbol": "USDC", "symbol": "USDC",
"chain": "arbitrum", "chain": "arbitrum",
"price_usd": 1, "price_usd": 0.999987,
"price_cad": 1.38, "price_cad": 1.38,
"source": "coingecko", "source": "coingecko",
"source_status": "primary", "source_status": "primary",
"updated_at": "2026-03-15T00:06:52.404Z", "updated_at": "2026-03-15T00:11:11.630Z",
"age_seconds": 0, "age_seconds": 0,
"stale": false "stale": false
}, },
"ETH_ETH": { "ETH_ETH": {
"symbol": "ETH", "symbol": "ETH",
"chain": "ethereum", "chain": "ethereum",
"price_usd": 2095.26, "price_usd": 2092.73,
"price_cad": 2893.66, "price_cad": 2890.16,
"source": "coingecko", "source": "coingecko",
"source_status": "primary", "source_status": "primary",
"updated_at": "2026-03-15T00:06:52.404Z", "updated_at": "2026-03-15T00:11:11.630Z",
"age_seconds": 0, "age_seconds": 0,
"stale": false "stale": false
}, },
"ETHO_ETHO": { "ETHO_ETHO": {
"symbol": "ETHO", "symbol": "ETHO",
"chain": "etho", "chain": "etho",
"price_usd": null, "price_usd": 0.00525255,
"price_cad": null, "price_cad": 0.00714931,
"source": null, "source": "coingecko",
"source_status": null, "source_status": "primary",
"updated_at": null, "updated_at": "2026-03-15T00:11:11.630Z",
"age_seconds": null, "age_seconds": 0,
"stale": true "stale": false
}, },
"EGAZ_ETICA": { "EGAZ_ETICA": {
"symbol": "EGAZ", "symbol": "EGAZ",
@ -50,11 +50,11 @@
"ETI_ETICA": { "ETI_ETICA": {
"symbol": "ETI", "symbol": "ETI",
"chain": "etica", "chain": "etica",
"price_usd": 0.050224, "price_usd": 0.050226,
"price_cad": 0.069362, "price_cad": 0.069365,
"source": "coingecko", "source": "coingecko",
"source_status": "primary", "source_status": "primary",
"updated_at": "2026-03-15T00:06:52.404Z", "updated_at": "2026-03-15T00:11:11.630Z",
"age_seconds": 0, "age_seconds": 0,
"stale": false "stale": false
} }

Loading…
Cancel
Save