williambnorton/synternet-price-consumer

By williambnorton

Updated 10 months ago

Subscribe to the synternet.price.all data stream to print 97 popular cryptocurrency token prices.

Image
Integration & delivery
Message queues
Machine learning & AI
0

530

williambnorton/synternet-price-consumer repository overview

synternet-price-consumer is recipe #1 in my 2025 Synternet AI Cookbook.

You will need the jq utility installed on your mac to process the output of the docker.

docker run --rm williambnorton/synternet-price-consumer:latest | jq -r --unbuffered '
"\u001b[2J\u001b[H\u001b[1;37;44m ⏰ " + (now|strftime("%H:%M")) + " │ REAL-TIME TOKEN PRICES \u001b[0m",
"\u001b[90m" + ("─"*50) + "\u001b[0m",
(["SYNT","BTC","ETH","SOL","AVAX","XRP","WBTC","UNI","TRUMP","TON","SUI","OSMO","LTC","KCS","INJ","DOT","DOGE","AAVE"][] as $s |
  .[$s] as $d |
  "\u001b[1;33m" + ($s+"      ")[0:6] + "\u001b[0m $\u001b[1;37m" +
  (
    ($d.price*1e4|round/1e4|tostring) as $price |
    ($price | split(".")) as $parts |
    (($parts[0] | gsub("(?<d>[0-9])(?=(?:[0-9]{3})+$)"; "\(.d),")) +
    (if $parts[1] then "." + $parts[1] else "" end))
  ) +
  "\u001b[0m " +
  (if $d.price_percent_change_24h>=0 then "\u001b[32m▲" else "\u001b[31m▼" end) +
  (($d.price_percent_change_24h*10|round/10)|tostring) + "%\u001b[0m"
)'
Yields output updated every minute:
 ⏰ 22:22 │ SYNTERNET LIVE PRICES
──────────────────────────────────────────────────
SYNT   $0.013 ▲0.9%
BTC    $117,864.3116 ▲3.3%
ETH    $4,315.6484 ▲3.6%
SOL    $219.6169 ▲4.3%
AVAX   $30.5724 ▲1.8%
XRP    $2.9342 ▲2.6%
WBTC   $117,789.5568 ▲3.1%
UNI    $8.0274 ▲4.4%
TRUMP  $7.5609 ▲1.8%
TON    $2.7827 ▲2.3%
SUI    $3.5078 ▲6.8%
OSMO   $0.1471 ▲7.4%
LTC    $112.3914 ▲5%
KCS    $15.4554 ▲0.5%
INJ    $12.5201 ▲3.8%
DOT    $4.103 ▲4.6%

There may be an active hard-coded ACCESS_KEY in the code base on purpose. The synternet.price.all delivers 24KB every minute which amount to almost 1GB per month at a cost of 5SYNT/GB or 5¢ per month. To make this code in a docker easy to use and build upon, I have allocate $5 worth or 500GB worth of credit for the community of users. In return I would like to see posted examples of uses. Specifically, I am looking for

command line tools like jq to use the output in interesting ways Replit prompts that build cool visualizations driven by the one-minute pulses of token prices n8n integrations that bring the data into the n8n ecosystem other interesting uses of the data stream

To run using my free SYNTERNET_ACCESS_KEY simply type: docker run -it --rm williambnorton/synternet-price-consumer:latest

When the tokens are used up: Fetch a SYNTERNET_ACCESS_KEY from portal.synternet.com by creating a project, escrowing some SYNT tokens of your own to a subscription to synternet.price.all, and run this docker specifying your own ACCESS KEY.

Example: % docker run --rm -it -e SYNTERNET_ACCESS_KEY=$_SYNTERNET_ACCESS_KEY_HERE williambnorton/synternet-price-consumer:latest

{
  "AAVE": {
    "price": 299.7880537196447,
    "volume_24h": 338996777.9867259,
    "volume_change_24h": 6.2575,
    "price_percent_change_24h": -2.72081222,
    "price_percent_change_30d": 1.29413399,
    "market_cap": 4566021609.184374,
    "market_cap_dominance": 0.114,
    "last_updated": 1757971920
  },
  "ADA": {
    "price": 0.863314073255147,
    "volume_24h": 1963152869.4699628,
    "volume_change_24h": 45.3006,
    "price_percent_change_24h": -3.15095747,
    "price_percent_change_30d": -6.22853932,
    "market_cap": 30889618819.81336,
    "market_cap_dominance": 0.7713,
    "last_updated": 1757971980
  },
  "AKT": {
    "price": 1.14020826644349,
    "volume_24h": 9575468.10315371,
    "volume_change_24h": 24.351,
    "price_percent_change_24h": -3.40923957,
    "price_percent_change_30d": -12.97772041,
    "market_cap": 283097515.5131239,
    "market_cap_dominance": 0.0071,
    "last_updated": 1757971980
  },
  "ALGO": {
    "price": 0.23228650367729264,
    "volume_24h": 102789570.11266167,
    "volume_change_24h": 16.973,
    "price_percent_change_24h": -3.44214825,
    "price_percent_change_30d": -11.28818015,
    "market_cap": 2038537189.0237162,
    "market_cap_dominance": 0.0509,
    "last_updated": 1757971920
  },
  "APT": {
    "price": 4.383292892117136,
    "volume_24h": 406512280.17607605,
    "volume_change_24h": 52.5342,
    "price_percent_change_24h": -3.53754083,
    "price_percent_change_30d": -7.13522482,
    "market_cap": 3072525888.658234,
    "market_cap_dominance": 0.0767,
    "last_updated": 1757971980
  },
  "ARB": {
    "price": 0.4929727056580709,
    "volume_24h": 438342852.5856427,
    "volume_change_24h": 45.8841,
    "price_percent_change_24h": -4.61599304,
    "price_percent_change_30d": -0.59603221,
    "market_cap": 2610675022.77637,
    "market_cap_dominance": 0.0652,
    "last_updated": 1757971980
  },
  "ATOM": {
    "price": 4.518237126488517,
    "volume_24h": 134528521.96000612,
    "volume_change_24h": 27.9502,
    "price_percent_change_24h": -3.18182705,
    "price_percent_change_30d": -1.03960938,
    "market_cap": 2115908519.2830782,
    "market_cap_dominance": 0.0528,
    "last_updated": 1757971920
  },
  "AVAX": {
    "price": 29.907347476346356,
    "volume_24h": 1200848485.135371,
    "volume_change_24h": 34.415,
    "price_percent_change_24h": 1.38144986,
    "price_percent_change_30d": 23.51547246,
    "market_cap": 12629133693.797691,
    "market_cap_dominance": 0.3153,
    "last_updated": 1757971980
  },
:
:
:
  "SYNT": {
    "price": 0.01283800109995528,
    "volume_24h": 2271768.87789603,
    "volume_change_24h": 54.6587,
    "price_percent_change_24h": 0.61357911,
    "price_percent_change_30d": -22.08337191,
    "market_cap": 8414238.55672291,
    "market_cap_dominance": 0,
    "last_updated": 1757971920
  }
}

Tag summary

Content type

Image

Digest

sha256:65b3e4b75

Size

106.8 MB

Last updated

10 months ago

docker pull williambnorton/synternet-price-consumer