{"title":"API Doc","user":{"uid":-1,"username":"[[global:guest]]","displayname":"[[global:guest]]","userslug":"","fullname":"[[global:guest]]","email":"","icon:text":"?","icon:bgColor":"#aaa","groupTitle":"","groupTitleArray":[],"status":"offline","reputation":0,"email:confirmed":0},"loggedIn":false,"loggedInUser":{"uid":-1,"username":"[[global:guest]]","picture":"","icon:text":"?","icon:bgColor":"#aaa"},"relative_path":"","template":{"name":"api-doc","api-doc":true},"url":"-doc","bodyClass":"page-doc template-api-doc page-status-200 theme-harmony user-guest","_header":{"tags":{"meta":[{"property":"og:image","content":"https://www.ccstars.io/assets/uploads/system/og-image.png?v=1794831712601"},{"property":"og:image:url","content":"https://www.ccstars.io/assets/uploads/system/og-image.png?v=1794831712601"},{"property":"og:image:width","content":"1200"},{"property":"og:image:height","content":"630"},{"content":"Crypto Currencies Stars Forum","property":"og:title"},{"content":"https://www.ccstars.io/api-doc","property":"og:url"}],"link":[]}},"widgets":{"sidebar-footer":[{"html":"<footer id=\"footer\" class=\"container footer d-flex flex-column align-items-center gap-1 mb-2\">\r\n\t<span></span>\r\n\t<span></span>\r\n</footer>"},{"html":"<div class=\"d-flex forum-stats flex-wrap mb-3 gap-4\">\n<div class=\"d-flex flex-1 gap-4\">\n<div class=\"flex-1\">\n<div class=\"stats-card text-center \">\n<h4 class=\"stats\" title=\"0\">0</h4>\n<span class=\"text-secondary\">Online</span>\n</div>\n</div>\n<div class=\"flex-1\">\n<div class=\"stats-card text-center \">\n<h4 class=\"stats\" title=\"13\">13</h4>\n<span class=\"text-secondary\">Users</span>\n</div>\n</div>\n</div>\n<div class=\"d-flex flex-1 gap-4\">\n<div class=\"flex-1\">\n<div class=\"stats-card text-center \">\n<h4 class=\"stats\" title=\"77\">77</h4>\n<span class=\"text-secondary\">Topics</span>\n</div>\n</div>\n<div class=\"flex-1\">\n<div class=\"stats-card text-center \">\n<h4 class=\"stats\" title=\"323\">323</h4>\n<span class=\"text-secondary\">Posts</span>\n</div>\n</div>\n</div>\n</div>"}],"brand-header":[{"html":"<div class=\"crypto-ticker-wrap\">\r\n  <!-- Ticker row (single, dynamic) -->\r\n  <div class=\"crypto-ticker js-ticker-rows\">\r\n\r\n    <!-- Top line: selector (symbol + chevron) + percentage -->\r\n    <div class=\"crypto-ticker-top\">\r\n      <div class=\"crypto-ticker-symbol-wrap\">\r\n        <button type=\"button\"\r\n                class=\"crypto-ticker-selector js-ticker-selector\"\r\n                aria-haspopup=\"listbox\"\r\n                aria-expanded=\"false\"\r\n                aria-label=\"Choose ticker\">\r\n          <span class=\"crypto-ticker-symbol fw-semibold js-ticker-selected-symbol\">BTC</span>\r\n          <svg class=\"crypto-ticker-chevron\" width=\"10\" height=\"6\" viewBox=\"0 0 10 6\" aria-hidden=\"true\">\r\n            <path d=\"M1 1l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"/>\r\n          </svg>\r\n        </button>\r\n\r\n        <!-- Popup list — order matches SYMBOLS in /opt/ticker.py -->\r\n        <ul class=\"crypto-ticker-menu js-ticker-menu d-none\"\r\n            role=\"listbox\"\r\n            aria-label=\"Choose ticker\">\r\n          <li role=\"option\" data-symbol=\"BTCUSDT\"    aria-selected=\"true\">BTC</li>\r\n          <li role=\"option\" data-symbol=\"ETHUSDT\"    aria-selected=\"false\">ETH</li>\r\n          <li role=\"option\" data-symbol=\"SOLUSDT\"    aria-selected=\"false\">SOL</li>\r\n          <li role=\"option\" data-symbol=\"XRPUSDT\"    aria-selected=\"false\">XRP</li>\r\n          <li role=\"option\" data-symbol=\"ZECUSDT\"    aria-selected=\"false\">ZEC</li>\r\n          <li role=\"option\" data-symbol=\"ADAUSDT\"    aria-selected=\"false\">ADA</li>\r\n          <li role=\"option\" data-symbol=\"XLMUSDT\"    aria-selected=\"false\">XLM</li>\r\n          <li role=\"option\" data-symbol=\"LINKUSDT\"   aria-selected=\"false\">LINK</li>\r\n          <li role=\"option\" data-symbol=\"FETUSDT\"    aria-selected=\"false\">FET</li>\r\n          <li role=\"option\" data-symbol=\"DOGEUSDT\"   aria-selected=\"false\">DOGE</li>\r\n          <li role=\"option\" data-symbol=\"HBARUSDT\"   aria-selected=\"false\">HBAR</li>\r\n          <li role=\"option\" data-symbol=\"LTCUSDT\"    aria-selected=\"false\">LTC</li>\r\n          <li role=\"option\" data-symbol=\"STXUSDT\"    aria-selected=\"false\">STX</li>\r\n          <li role=\"option\" data-symbol=\"BCHUSDT\"    aria-selected=\"false\">BCH</li>\r\n          <li role=\"option\" data-symbol=\"MKRUSDT\"    aria-selected=\"false\">MKR</li>\r\n          <li role=\"option\" data-symbol=\"CRVUSDT\"    aria-selected=\"false\">CRV</li>\r\n          <li role=\"option\" data-symbol=\"DOTUSDT\"    aria-selected=\"false\">DOT</li>\r\n          <li role=\"option\" data-symbol=\"BNBUSDT\"    aria-selected=\"false\">BNB</li>\r\n          <li role=\"option\" data-symbol=\"UNIUSDT\"    aria-selected=\"false\">UNI</li>\r\n          <li role=\"option\" data-symbol=\"AVAXUSDT\"   aria-selected=\"false\">AVAX</li>\r\n          <li role=\"option\" data-symbol=\"AAVEUSDT\"   aria-selected=\"false\">AAVE</li>\r\n          <li role=\"option\" data-symbol=\"NEARUSDT\"   aria-selected=\"false\">NEAR</li>\r\n          <li role=\"option\" data-symbol=\"INJUSDT\"    aria-selected=\"false\">INJ</li>\r\n          <li role=\"option\" data-symbol=\"GRTUSDT\"    aria-selected=\"false\">GRT</li>\r\n          <li role=\"option\" data-symbol=\"SHIBUSDT\"   aria-selected=\"false\">SHIB</li>\r\n          <li role=\"option\" data-symbol=\"LDOUSDT\"    aria-selected=\"false\">LDO</li>\r\n          <li role=\"option\" data-symbol=\"OPUSDT\"     aria-selected=\"false\">OP</li>\r\n          <li role=\"option\" data-symbol=\"APTUSDT\"    aria-selected=\"false\">APT</li>\r\n          <li role=\"option\" data-symbol=\"ARBUSDT\"    aria-selected=\"false\">ARB</li>\r\n          <li role=\"option\" data-symbol=\"SUIUSDT\"    aria-selected=\"false\">SUI</li>\r\n          <li role=\"option\" data-symbol=\"PEPEUSDT\"   aria-selected=\"false\">PEPE</li>\r\n          <li role=\"option\" data-symbol=\"FLOKIUSDT\"  aria-selected=\"false\">FLOKI</li>\r\n          <li role=\"option\" data-symbol=\"ARKMUSDT\"   aria-selected=\"false\">ARKM</li>\r\n          <li role=\"option\" data-symbol=\"WLDUSDT\"    aria-selected=\"false\">WLD</li>\r\n          <li role=\"option\" data-symbol=\"SEIUSDT\"    aria-selected=\"false\">SEI</li>\r\n          <li role=\"option\" data-symbol=\"TIAUSDT\"    aria-selected=\"false\">TIA</li>\r\n          <li role=\"option\" data-symbol=\"BONKUSDT\"   aria-selected=\"false\">BONK</li>\r\n          <li role=\"option\" data-symbol=\"AIUSDT\"     aria-selected=\"false\">AI</li>\r\n          <li role=\"option\" data-symbol=\"JUPUSDT\"    aria-selected=\"false\">JUP</li>\r\n          <li role=\"option\" data-symbol=\"PYTHUSDT\"   aria-selected=\"false\">PYTH</li>\r\n          <li role=\"option\" data-symbol=\"WIFUSDT\"    aria-selected=\"false\">WIF</li>\r\n          <li role=\"option\" data-symbol=\"BOMEUSDT\"   aria-selected=\"false\">BOME</li>\r\n          <li role=\"option\" data-symbol=\"TAOUSDT\"    aria-selected=\"false\">TAO</li>\r\n          <li role=\"option\" data-symbol=\"IOUSDT\"     aria-selected=\"false\">IO</li>\r\n          <li role=\"option\" data-symbol=\"RENDERUSDT\" aria-selected=\"false\">RENDER</li>\r\n          <li role=\"option\" data-symbol=\"TONUSDT\"    aria-selected=\"false\">TON</li>\r\n          <li role=\"option\" data-symbol=\"PENGUUSDT\"  aria-selected=\"false\">PENGU</li>\r\n          <li role=\"option\" data-symbol=\"TRUMPUSDT\"  aria-selected=\"false\">TRUMP</li>\r\n        </ul>\r\n      </div>\r\n\r\n      <span class=\"js-tick-change fw-semibold\"></span>\r\n    </div>\r\n\r\n    <!-- Bottom line: large price -->\r\n    <a class=\"crypto-ticker-row text-reset text-decoration-none js-tick\"\r\n       data-symbol=\"BTCUSDT\"\r\n       href=\"https://www.coingecko.com/en/coins/bitcoin\"\r\n       target=\"_blank\" rel=\"noopener\"\r\n       title=\"Bitcoin price (USD) — click for chart\">\r\n      <span class=\"js-tick-price fw-semibold\">—</span>\r\n    </a>\r\n  </div>\r\n</div>\r\n\r\n<style>\r\n  /* ---------- Container ---------- */\r\n  .crypto-ticker-wrap {\r\n    position: relative;\r\n    display: inline-block;\r\n    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\r\n                 \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif,\r\n                 \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\r\n  }\r\n\r\n  .crypto-ticker {\r\n    display: inline-flex;\r\n    flex-direction: column;\r\n    align-items: stretch;\r\n    width: 100%;\r\n  }\r\n\r\n  /* ---------- Top line ---------- */\r\n  .crypto-ticker-top {\r\n    display: flex;\r\n    align-items: center;\r\n    gap: .55rem;\r\n    margin-bottom: .25rem;\r\n    width: 100%;\r\n  }\r\n\r\n  /* Push the percentage to the far right */\r\n  .crypto-ticker-top .js-tick-change {\r\n    margin-left: auto;\r\n    text-align: right;\r\n  }\r\n\r\n  /* ---------- Selector (symbol IS the trigger) ---------- */\r\n  .crypto-ticker-symbol-wrap {\r\n    position: relative;\r\n  }\r\n\r\n  .crypto-ticker-selector {\r\n    display: inline-flex;\r\n    align-items: center;\r\n    gap: .35rem;\r\n    padding: 0;\r\n    background: transparent;\r\n    border: 0;\r\n    color: #c6c6c6;\r\n    cursor: pointer;\r\n    line-height: 1;\r\n    transition: color .15s ease;\r\n  }\r\n  .crypto-ticker-selector:hover {\r\n    color: #fff;\r\n  }\r\n  .crypto-ticker-selector:focus-visible {\r\n    outline: 2px solid rgba(96, 255, 0, .6);\r\n    outline-offset: 3px;\r\n    border-radius: 2px;\r\n  }\r\n\r\n  .crypto-ticker-symbol {\r\n    font-size: 1.1rem;\r\n    line-height: 1;\r\n  }\r\n\r\n  .crypto-ticker-chevron {\r\n    transition: transform .15s ease;\r\n    opacity: .7;\r\n  }\r\n  .crypto-ticker-selector:hover .crypto-ticker-chevron {\r\n    opacity: 1;\r\n  }\r\n  .crypto-ticker-selector[aria-expanded=\"true\"] .crypto-ticker-chevron {\r\n    transform: rotate(180deg);\r\n  }\r\n\r\n  /* ---------- Popup menu (scrollable) ---------- */\r\n  .crypto-ticker-menu {\r\n    position: absolute;\r\n    top: calc(100% + 6px);\r\n    left: 0;\r\n    z-index: 1050;\r\n    min-width: 6rem;\r\n    max-height: 16rem;            /* ~10 visible items before scrolling */\r\n    overflow-y: auto;             /* enable vertical scrollbar */\r\n    overscroll-behavior: contain; /* stop page scroll when menu hits bottom */\r\n    margin: 0;\r\n    padding: .25rem 0;\r\n    list-style: none;\r\n    background: #1e1e1e;\r\n    border: 1px solid rgba(255, 255, 255, .15);\r\n    border-radius: .375rem;\r\n    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);\r\n\r\n    /* Dark scrollbar (cosmetic) */\r\n    scrollbar-width: thin;\r\n    scrollbar-color: rgba(255,255,255,.25) transparent;\r\n  }\r\n  .crypto-ticker-menu::-webkit-scrollbar {\r\n    width: 8px;\r\n  }\r\n  .crypto-ticker-menu::-webkit-scrollbar-thumb {\r\n    background: rgba(255,255,255,.25);\r\n    border-radius: 4px;\r\n  }\r\n  .crypto-ticker-menu::-webkit-scrollbar-track {\r\n    background: transparent;\r\n  }\r\n\r\n  .crypto-ticker-menu li {\r\n    padding: .35rem .75rem;\r\n    font-size: .9rem;\r\n    font-weight: 600;\r\n    cursor: pointer;\r\n    color: #c6c6c6;\r\n    user-select: none;\r\n  }\r\n  .crypto-ticker-menu li:hover,\r\n  .crypto-ticker-menu li:focus {\r\n    background: rgba(255, 255, 255, .06);\r\n    color: #fff;\r\n    outline: none;\r\n  }\r\n  .crypto-ticker-menu li[aria-selected=\"true\"] {\r\n    color: #68cc00;\r\n  }\r\n\r\n  /* ---------- Price row ---------- */\r\n  .crypto-ticker-row {\r\n    display: inline-block;\r\n  }\r\n\r\n  .crypto-ticker .js-tick-price {\r\n    font-weight: 800;\r\n    font-variant-numeric: tabular-nums;\r\n    letter-spacing: -0.02em;\r\n    font-size: 2.2rem;\r\n    line-height: 1;\r\n    display: inline-block;\r\n  }\r\n\r\n  .crypto-ticker .js-tick-change {\r\n    font-weight: 600;\r\n    font-variant-numeric: tabular-nums;\r\n    font-size: 1.1rem;\r\n    line-height: 1;\r\n  }\r\n</style>\r\n\r\n<script>\r\n(function () {\r\n  'use strict';\r\n\r\n  var URL = '/api/ticker';\r\n  var REFRESH_MS = 1000;\r\n  var DEFAULT_SYMBOL = 'BTCUSDT';\r\n  var STORAGE_KEY = 'crypto-ticker:selected';\r\n\r\n  // Per-symbol metadata (label, link, decimals) — matches SYMBOLS in /opt/ticker.py\r\n  // decimals: 2 for everything, except the sub-cent coins where 4 matters.\r\n  var META = {\r\n    BTCUSDT:    { label: 'BTC',    href: 'https://www.coingecko.com/en/coins/bitcoin',              name: 'Bitcoin',           decimals: 2 },\r\n    ETHUSDT:    { label: 'ETH',    href: 'https://www.coingecko.com/en/coins/ethereum',             name: 'Ethereum',          decimals: 2 },\r\n    SOLUSDT:    { label: 'SOL',    href: 'https://www.coingecko.com/en/coins/solana',               name: 'Solana',            decimals: 2 },\r\n    XRPUSDT:    { label: 'XRP',    href: 'https://www.coingecko.com/en/coins/xrp',                  name: 'XRP',               decimals: 4 },\r\n    ZECUSDT:    { label: 'ZEC',    href: 'https://www.coingecko.com/en/coins/zcash',                name: 'Zcash',             decimals: 2 },\r\n    ADAUSDT:    { label: 'ADA',    href: 'https://www.coingecko.com/en/coins/cardano',              name: 'Cardano',           decimals: 4 },\r\n    XLMUSDT:    { label: 'XLM',    href: 'https://www.coingecko.com/en/coins/stellar',              name: 'Stellar',           decimals: 4 },\r\n    LINKUSDT:   { label: 'LINK',   href: 'https://www.coingecko.com/en/coins/chainlink',            name: 'Chainlink',         decimals: 2 },\r\n    FETUSDT:    { label: 'FET',    href: 'https://www.coingecko.com/en/coins/fetch-ai',             name: 'Fetch.ai',          decimals: 4 },\r\n    DOGEUSDT:   { label: 'DOGE',   href: 'https://www.coingecko.com/en/coins/dogecoin',             name: 'Dogecoin',          decimals: 4 },\r\n    HBARUSDT:   { label: 'HBAR',   href: 'https://www.coingecko.com/en/coins/hedera-hashgraph',     name: 'Hedera',            decimals: 4 },\r\n    LTCUSDT:    { label: 'LTC',    href: 'https://www.coingecko.com/en/coins/litecoin',             name: 'Litecoin',          decimals: 2 },\r\n    STXUSDT:    { label: 'STX',    href: 'https://www.coingecko.com/en/coins/stacks',               name: 'Stacks',            decimals: 4 },\r\n    BCHUSDT:    { label: 'BCH',    href: 'https://www.coingecko.com/en/coins/bitcoin-cash',         name: 'Bitcoin Cash',      decimals: 2 },\r\n    MKRUSDT:    { label: 'MKR',    href: 'https://www.coingecko.com/en/coins/maker',                name: 'Maker',             decimals: 2 },\r\n    CRVUSDT:    { label: 'CRV',    href: 'https://www.coingecko.com/en/coins/curve-dao-token',      name: 'Curve DAO',         decimals: 4 },\r\n    DOTUSDT:    { label: 'DOT',    href: 'https://www.coingecko.com/en/coins/polkadot',             name: 'Polkadot',          decimals: 2 },\r\n    BNBUSDT:    { label: 'BNB',    href: 'https://www.coingecko.com/en/coins/binancecoin',          name: 'BNB',               decimals: 2 },\r\n    UNIUSDT:    { label: 'UNI',    href: 'https://www.coingecko.com/en/coins/uniswap',              name: 'Uniswap',           decimals: 2 },\r\n    AVAXUSDT:   { label: 'AVAX',   href: 'https://www.coingecko.com/en/coins/avalanche-2',          name: 'Avalanche',         decimals: 2 },\r\n    AAVEUSDT:   { label: 'AAVE',   href: 'https://www.coingecko.com/en/coins/aave',                 name: 'Aave',              decimals: 2 },\r\n    NEARUSDT:   { label: 'NEAR',   href: 'https://www.coingecko.com/en/coins/near',                 name: 'NEAR Protocol',     decimals: 4 },\r\n    INJUSDT:    { label: 'INJ',    href: 'https://www.coingecko.com/en/coins/injective-protocol',   name: 'Injective',         decimals: 2 },\r\n    GRTUSDT:    { label: 'GRT',    href: 'https://www.coingecko.com/en/coins/the-graph',            name: 'The Graph',         decimals: 4 },\r\n    SHIBUSDT:   { label: 'SHIB',   href: 'https://www.coingecko.com/en/coins/shiba-inu',            name: 'Shiba Inu',         decimals: 6 },\r\n    LDOUSDT:    { label: 'LDO',    href: 'https://www.coingecko.com/en/coins/lido-dao',             name: 'Lido DAO',          decimals: 4 },\r\n    OPUSDT:     { label: 'OP',     href: 'https://www.coingecko.com/en/coins/optimism',             name: 'Optimism',          decimals: 4 },\r\n    APTUSDT:    { label: 'APT',    href: 'https://www.coingecko.com/en/coins/aptos',                name: 'Aptos',             decimals: 2 },\r\n    ARBUSDT:    { label: 'ARB',    href: 'https://www.coingecko.com/en/coins/arbitrum',             name: 'Arbitrum',          decimals: 4 },\r\n    SUIUSDT:    { label: 'SUI',    href: 'https://www.coingecko.com/en/coins/sui',                  name: 'Sui',               decimals: 4 },\r\n    PEPEUSDT:   { label: 'PEPE',   href: 'https://www.coingecko.com/en/coins/pepe',                 name: 'Pepe',              decimals: 8 },\r\n    FLOKIUSDT:  { label: 'FLOKI',  href: 'https://www.coingecko.com/en/coins/floki',                name: 'Floki',             decimals: 8 },\r\n    ARKMUSDT:   { label: 'ARKM',   href: 'https://www.coingecko.com/en/coins/arkham',               name: 'Arkham',            decimals: 4 },\r\n    WLDUSDT:    { label: 'WLD',    href: 'https://www.coingecko.com/en/coins/worldcoin-wld',        name: 'Worldcoin',         decimals: 4 },\r\n    SEIUSDT:    { label: 'SEI',    href: 'https://www.coingecko.com/en/coins/sei-network',          name: 'Sei',               decimals: 4 },\r\n    TIAUSDT:    { label: 'TIA',    href: 'https://www.coingecko.com/en/coins/celestia',             name: 'Celestia',          decimals: 2 },\r\n    BONKUSDT:   { label: 'BONK',   href: 'https://www.coingecko.com/en/coins/bonk',                 name: 'Bonk',              decimals: 8 },\r\n    AIUSDT:     { label: 'AI',     href: 'https://www.coingecko.com/en/coins/sleepless-ai',         name: 'Sleepless AI',      decimals: 4 },\r\n    JUPUSDT:    { label: 'JUP',    href: 'https://www.coingecko.com/en/coins/jupiter-exchange-solana', name: 'Jupiter',        decimals: 4 },\r\n    PYTHUSDT:   { label: 'PYTH',   href: 'https://www.coingecko.com/en/coins/pyth-network',         name: 'Pyth Network',      decimals: 4 },\r\n    WIFUSDT:    { label: 'WIF',    href: 'https://www.coingecko.com/en/coins/dogwifcoin',           name: 'dogwifhat',         decimals: 4 },\r\n    BOMEUSDT:   { label: 'BOME',   href: 'https://www.coingecko.com/en/coins/book-of-meme',         name: 'Book of Meme',      decimals: 6 },\r\n    TAOUSDT:    { label: 'TAO',    href: 'https://www.coingecko.com/en/coins/bittensor',            name: 'Bittensor',         decimals: 2 },\r\n    IOUSDT:     { label: 'IO',     href: 'https://www.coingecko.com/en/coins/io-net',               name: 'io.net',            decimals: 4 },\r\n    RENDERUSDT: { label: 'RENDER', href: 'https://www.coingecko.com/en/coins/render-token',         name: 'Render',            decimals: 2 },\r\n    TONUSDT:    { label: 'TON',    href: 'https://www.coingecko.com/en/coins/the-open-network',     name: 'Toncoin',           decimals: 2 },\r\n    PENGUUSDT:  { label: 'PENGU',  href: 'https://www.coingecko.com/en/coins/pudgy-penguins',       name: 'Pudgy Penguins',    decimals: 5 },\r\n    TRUMPUSDT:  { label: 'TRUMP',  href: 'https://www.coingecko.com/en/coins/official-trump',       name: 'Official Trump',    decimals: 2 }\r\n  };\r\n\r\n  var timer = null;\r\n  var state = {};          // per-symbol: { lastTs, prevPrice }\r\n  var lastData = {};       // last payload per symbol (so we can re-render on switch)\r\n  var currentSymbol = DEFAULT_SYMBOL;\r\n\r\n  /* ---------- Formatting ---------- */\r\n  function fmtPrice(n, symbol) {\r\n    var decimals = (META[symbol] && META[symbol].decimals != null)\r\n      ? META[symbol].decimals\r\n      : (n < 10 ? 4 : 2);\r\n    return '$' + n.toLocaleString('en-US', {\r\n      minimumFractionDigits: decimals,\r\n      maximumFractionDigits: decimals\r\n    });\r\n  }\r\n\r\n  function fmtPct(pct) {\r\n    var sign = pct >= 0 ? '+' : '';\r\n    return sign + pct.toFixed(2) + '%';\r\n  }\r\n\r\n  /* ---------- Render the ONE visible row ---------- */\r\n  function paintCurrent() {\r\n    var d = lastData[currentSymbol];\r\n    if (!d) return;\r\n\r\n    var row      = document.querySelector('.js-tick');\r\n    var priceEl  = row && row.querySelector('.js-tick-price');\r\n    var changeEl = document.querySelector('.crypto-ticker-top .js-tick-change');\r\n    if (!row || !priceEl || !changeEl) return;\r\n\r\n    var price = parseFloat(d.last);\r\n    var pct   = parseFloat(d.pct);\r\n    var high  = parseFloat(d.high);\r\n    var low   = parseFloat(d.low);\r\n    var bid   = parseFloat(d.bid);\r\n    var ask   = parseFloat(d.ask);\r\n\r\n    if (!isFinite(price) || !isFinite(pct)) return;\r\n\r\n    var meta = META[currentSymbol] || { label: currentSymbol, name: currentSymbol };\r\n\r\n    // Link + title follow the selected coin\r\n    row.dataset.symbol = currentSymbol;\r\n    row.href = meta.href || '#';\r\n    row.title = meta.name + ' ' + fmtPrice(price, currentSymbol)\r\n              + '\\n24h: ' + fmtPct(pct).trim()\r\n              + '\\nHigh: ' + fmtPrice(high, currentSymbol)\r\n              + '\\nLow:  ' + fmtPrice(low, currentSymbol)\r\n              + '\\nBid:  ' + fmtPrice(bid, currentSymbol)\r\n              + '\\nAsk:  ' + fmtPrice(ask, currentSymbol)\r\n              + '\\nUpdated: ' + new Date(d.ts).toLocaleTimeString();\r\n\r\n    // Price (with direction color vs last render for THIS symbol)\r\n    var s = state[currentSymbol] || (state[currentSymbol] = { lastTs: null, prevPrice: null });\r\n    priceEl.textContent = fmtPrice(price, currentSymbol);\r\n    if (s.prevPrice !== null) {\r\n      if (price > s.prevPrice)      priceEl.style.color = '#68cc00';\r\n      else if (price < s.prevPrice) priceEl.style.color = '#f04438';\r\n    }\r\n    s.prevPrice = price;\r\n\r\n    // 24h %\r\n    changeEl.textContent = fmtPct(pct);\r\n    changeEl.style.color = pct >= 0 ? '#68cc00' : '#f04438';\r\n  }\r\n\r\n  /* ---------- Absorb new payload ---------- */\r\n  function render(data) {\r\n    Object.keys(data).forEach(function (symbol) {\r\n      lastData[symbol] = data[symbol];\r\n    });\r\n    paintCurrent();\r\n  }\r\n\r\n  /* ---------- Fetch loop ---------- */\r\n  function fetchTicker() {\r\n    fetch(URL, { cache: 'no-store' })\r\n      .then(function (r) {\r\n        if (!r.ok) throw new Error('HTTP ' + r.status);\r\n        return r.json();\r\n      })\r\n      .then(render)\r\n      .catch(function (e) { console.error('[tick]', e); });\r\n  }\r\n\r\n  function startTicker() {\r\n    if (!document.querySelector('.js-tick')) return;\r\n\r\n    if (document.body.dataset.tickRunning === '1') {\r\n      fetchTicker();\r\n      return;\r\n    }\r\n    document.body.dataset.tickRunning = '1';\r\n\r\n    fetchTicker();\r\n    if (timer) clearInterval(timer);\r\n    timer = setInterval(fetchTicker, REFRESH_MS);\r\n  }\r\n\r\n  /* ---------- Selector ---------- */\r\n  function safeGet() {\r\n    try { return localStorage.getItem(STORAGE_KEY); } catch (e) { return null; }\r\n  }\r\n  function safeSet(v) {\r\n    try { localStorage.setItem(STORAGE_KEY, v); } catch (e) {}\r\n  }\r\n\r\n  function applySelection(symbol) {\r\n    if (!META[symbol]) symbol = DEFAULT_SYMBOL;\r\n    currentSymbol = symbol;\r\n\r\n    // Update trigger label\r\n    var labelEl = document.querySelector('.js-ticker-selected-symbol');\r\n    if (labelEl && META[symbol]) labelEl.textContent = META[symbol].label;\r\n\r\n    // Update aria-selected in the menu\r\n    document.querySelectorAll('.js-ticker-menu li').forEach(function (li) {\r\n      li.setAttribute('aria-selected', li.dataset.symbol === symbol ? 'true' : 'false');\r\n    });\r\n\r\n    // Repaint immediately with cached data (no flicker, no refetch)\r\n    paintCurrent();\r\n\r\n    safeSet(symbol);\r\n  }\r\n\r\n  function initSelector() {\r\n    var trigger = document.querySelector('.js-ticker-selector');\r\n    var menu    = document.querySelector('.js-ticker-menu');\r\n    if (!trigger || !menu) return;\r\n    if (trigger.dataset.bound === '1') return;\r\n    trigger.dataset.bound = '1';\r\n\r\n    var saved = safeGet();\r\n    var valid = menu.querySelector('li[data-symbol=\"' + saved + '\"]') ? saved : DEFAULT_SYMBOL;\r\n    applySelection(valid);\r\n\r\n    trigger.addEventListener('click', function (e) {\r\n      e.stopPropagation();\r\n      var isOpen = !menu.classList.contains('d-none');\r\n      menu.classList.toggle('d-none', isOpen);\r\n      trigger.setAttribute('aria-expanded', String(!isOpen));\r\n\r\n      // When opening, scroll the selected item into view\r\n      if (!isOpen) {\r\n        var sel = menu.querySelector('li[aria-selected=\"true\"]');\r\n        if (sel) sel.scrollIntoView({ block: 'nearest' });\r\n      }\r\n    });\r\n\r\n    menu.addEventListener('click', function (e) {\r\n      var li = e.target.closest('li[data-symbol]');\r\n      if (!li) return;\r\n      applySelection(li.dataset.symbol);\r\n      menu.classList.add('d-none');\r\n      trigger.setAttribute('aria-expanded', 'false');\r\n      trigger.focus();\r\n    });\r\n\r\n    menu.addEventListener('keydown', function (e) {\r\n      if (e.key === 'Enter' || e.key === ' ') {\r\n        var li = e.target.closest('li[data-symbol]');\r\n        if (li) { e.preventDefault(); li.click(); }\r\n      }\r\n    });\r\n\r\n    document.addEventListener('click', function (e) {\r\n      if (!menu.contains(e.target) && !trigger.contains(e.target)) {\r\n        menu.classList.add('d-none');\r\n        trigger.setAttribute('aria-expanded', 'false');\r\n      }\r\n    });\r\n\r\n    document.addEventListener('keydown', function (e) {\r\n      if (e.key === 'Escape') {\r\n        menu.classList.add('d-none');\r\n        trigger.setAttribute('aria-expanded', 'false');\r\n      }\r\n    });\r\n  }\r\n\r\n  /* ---------- Boot ---------- */\r\n  function boot() {\r\n    initSelector();\r\n    startTicker();\r\n  }\r\n\r\n  if (window.require) {\r\n    require(['hooks'], function (hooks) {\r\n      hooks.on('action:ajaxify.end', boot);\r\n    });\r\n  }\r\n  boot();\r\n})();\r\n</script>"}],"footer":[{"html":"<style>\r\n.custom-footer {\r\n  padding: 20px 20px 24px;\r\n  margin-top: 0px;\r\n  margin-bottom: 20px;\r\n  font-size: 14px;\r\n  color: inherit;\r\n}\r\n\r\n.cf-container {\r\n  max-width: 1200px;\r\n  margin: 0 auto;\r\n  display: grid;\r\n  grid-template-columns: repeat(3, 1fr);\r\n  gap: 40px;\r\n}\r\n\r\n.cf-col h4 {\r\n  font-size: 15px;\r\n  font-weight: 600;\r\n  margin: 0 0 16px;\r\n  letter-spacing: .3px;\r\n  text-transform: uppercase;\r\n  color: inherit;\r\n}\r\n\r\n.cf-col ul {\r\n  list-style: none;\r\n  padding: 0;\r\n  margin: 0;\r\n}\r\n.cf-col ul li { margin-bottom: 10px; }\r\n\r\n.cf-col ul li a {\r\n  color: inherit;\r\n  text-decoration: none;\r\n  opacity: .85;\r\n  transition: opacity .2s ease;\r\n}\r\n.cf-col ul li a:hover {\r\n  opacity: 1;\r\n  text-decoration: underline;\r\n}\r\n\r\n/* Social icons */\r\n.cf-social {\r\n  display: flex;\r\n  gap: 12px;\r\n  margin-bottom: 20px;\r\n}\r\n.cf-social a {\r\n  display: inline-flex;\r\n  align-items: center;\r\n  justify-content: center;\r\n  width: 40px;\r\n  height: 40px;\r\n  border-radius: 50%;\r\n  background: rgba(128,128,128,.12);\r\n  color: inherit;\r\n  transition: transform .2s ease, background .2s ease, color .2s ease;\r\n}\r\n.cf-social a:hover {\r\n  transform: translateY(-3px);\r\n  background: #68cc00;\r\n  color: #fff;\r\n}\r\n\r\n.cf-copy {\r\n  font-size: 13px;\r\n  opacity: .7;\r\n  margin: 0;\r\n}\r\n\r\n@media (max-width: 768px) {\r\n  .cf-container {\r\n    grid-template-columns: 1fr;\r\n    gap: 32px;\r\n    text-align: center;\r\n  }\r\n  .cf-social { justify-content: center; }\r\n}\r\n</style>\r\n\r\n<div class=\"custom-footer\">\r\n  <div class=\"cf-container\">\r\n    <div class=\"cf-col\">\r\n      <h4>Crypto Currencies Stars</h4>\r\n      <ul>\r\n        <li><a href=\"/terms\">Terms &amp; Conditions</a></li>\r\n        <li><a href=\"/privacy\">Privacy Policy</a></li>\r\n        <li><a href=\"/help\">FAQ &amp; Support</a></li>\r\n      </ul>\r\n    </div>\r\n\r\n    <div class=\"cf-col\">\r\n      <h4>Resources</h4>\r\n      <ul>\r\n        <li><a href=\"/tech-dev\">Tech &amp; Dev</a></li>\r\n        <li><a href=\"/api-doc\">API Access</a></li>\r\n        <li><a href=\"/open-source\">Open Source</a></li>\r\n      </ul>\r\n    </div>\r\n\r\n    <div class=\"cf-col cf-social-col\">\r\n      <h4>Follow us</h4>\r\n      <div class=\"cf-social\">\r\n        <a href=\"https://github.com/ccstars-io\" target=\"_blank\" rel=\"noopener\" aria-label=\"GitHub\">\r\n          <svg viewBox=\"0 0 24 24\" width=\"22\" height=\"22\" fill=\"currentColor\">\r\n            <path d=\"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56\r\n              0-.28-.01-1.02-.02-2-3.2.7-3.88-1.54-3.88-1.54-.52-1.33-1.28-1.68-1.28-1.68-1.05-.72.08-.71.08-.71\r\n              1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.23-1.28-5.23-5.7\r\n              0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.8 0\r\n              c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1\r\n              0 4.43-2.69 5.41-5.25 5.69.41.36.78 1.06.78 2.14 0 1.55-.01 2.8-.01 3.18\r\n              0 .31.21.68.8.56A11.5 11.5 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5z\"/>\r\n          </svg>\r\n        </a>\r\n        <a href=\"https://x.com/ccstars_io\" target=\"_blank\" rel=\"noopener\" aria-label=\"X (Twitter)\">\r\n          <svg viewBox=\"0 0 24 24\" width=\"20\" height=\"20\" fill=\"currentColor\">\r\n            <path d=\"M18.9 2H22l-6.77 7.74L23.2 22h-6.29l-4.93-6.44L6.4 22H3.28l7.24-8.28L2.8 2h6.45l4.46 5.9L18.9 2zm-1.1 18.13h1.73L8.29 3.77H6.43l11.37 16.36z\"/>\r\n          </svg>\r\n        </a>\r\n      </div>\r\n      <p class=\"cf-copy\">\r\n        &copy; <span id=\"cf-year\"></span> Crypto Currencies Stars. All rights reserved.\r\n      </p>\r\n    </div>\r\n  </div>\r\n</div>\r\n\r\n<script>\r\n  document.getElementById('cf-year').textContent = new Date().getFullYear();\r\n</script>"}],"content":[{"html":"<div style=\"\r\n  display: flex;\r\n  flex-direction: column;\r\n  align-items: center;\r\n  justify-content: center;\r\n  min-height: 60vh;\r\n  padding: 3rem 1.5rem;\r\n  text-align: center;\r\n  color: inherit;\r\n  font-family: inherit;\r\n\">\r\n\r\n  <!-- Title -->\r\n  <h1 style=\"\r\n    font-size: clamp(2rem, 5vw, 3rem);\r\n    font-weight: 700;\r\n    margin: 0 0 1rem;\r\n    letter-spacing: -0.02em;\r\n    line-height: 1.1;\r\n    color: inherit;\r\n  \">\r\n    Coming Soon<span style=\"opacity: 0.5;\">...</span>\r\n  </h1>\r\n\r\n  <!-- Subtitle -->\r\n  <p style=\"\r\n    font-size: clamp(1rem, 2vw, 1.25rem);\r\n    max-width: 520px;\r\n    margin: 0 0 2.5rem;\r\n    line-height: 1.6;\r\n    opacity: 0.7;\r\n    color: inherit;\r\n  \">\r\n    We're working behind the scenes to bring something awesome to this page.\r\n    Check back soon - good things are on the way.\r\n  </p>\r\n\r\n  <!-- Animated dots -->\r\n  <div style=\"\r\n    display: flex;\r\n    gap: 0.6rem;\r\n    margin-bottom: 2.5rem;\r\n  \">\r\n    <span style=\"\r\n      width: 12px; height: 12px;\r\n      border-radius: 50%;\r\n      background: currentColor;\r\n      animation: cs-pulse 1.4s ease-in-out infinite;\r\n    \"></span>\r\n    <span style=\"\r\n      width: 12px; height: 12px;\r\n      border-radius: 50%;\r\n      background: currentColor;\r\n      animation: cs-pulse 1.4s ease-in-out 0.2s infinite;\r\n    \"></span>\r\n    <span style=\"\r\n      width: 12px; height: 12px;\r\n      border-radius: 50%;\r\n      background: currentColor;\r\n      animation: cs-pulse 1.4s ease-in-out 0.4s infinite;\r\n    \"></span>\r\n  </div>\r\n\r\n  <!-- Button -->\r\n  <a href=\"/\" style=\"\r\n    display: inline-block;\r\n    padding: 0.85rem 1.75rem;\r\n    border-radius: 999px;\r\n    border: 2px solid currentColor;\r\n    color: inherit;\r\n    text-decoration: none;\r\n    font-weight: 600;\r\n    font-size: 1rem;\r\n    transition: all 0.25s ease;\r\n    opacity: 0.9;\r\n  \"\r\n  onmouseover=\"this.style.background='currentColor'; this.style.color='var(--bs-body-bg, #fff)'; this.style.opacity='1'; this.style.transform='translateY(-2px)';\"\r\n  onmouseout=\"this.style.background='transparent'; this.style.color='inherit'; this.style.opacity='0.9'; this.style.transform='translateY(0)';\"\r\n  >\r\n    ← Back to Home\r\n  </a>\r\n\r\n  <!-- Footer note -->\r\n  <p style=\"\r\n    margin-top: 3rem;\r\n    font-size: 0.85rem;\r\n    opacity: 0.4;\r\n    color: inherit;\r\n  \">\r\n    Thanks for your patience ✌️\r\n  </p>\r\n</div>\r\n\r\n<style>\r\n  @keyframes cs-spin {\r\n    to { transform: rotate(360deg); }\r\n  }\r\n  @keyframes cs-pulse {\r\n    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }\r\n    40% { opacity: 1; transform: scale(1); }\r\n  }\r\n</style>"}]}}