{"id":8,"date":"2026-06-28T07:08:15","date_gmt":"2026-06-28T07:08:15","guid":{"rendered":"https:\/\/koreav-index.com\/?page_id=8"},"modified":"2026-07-12T03:21:18","modified_gmt":"2026-07-12T03:21:18","slug":"elementor-8","status":"publish","type":"page","link":"https:\/\/koreav-index.com\/","title":{"rendered":"Elementor #8"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"8\" class=\"elementor elementor-8\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b5aa551 e-flex e-con-boxed e-con e-parent\" data-id=\"b5aa551\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0754bf5 elementor-widget elementor-widget-html\" data-id=\"0754bf5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div class=\"finance-dashboard\">\n    \n    <div class=\"dashboard-row top-volume-section\">\n        <div class=\"volume-col\">\n            <div class=\"section-header\">\n                <h3>\uac70\ub798\ub7c9 \uc0c1\uc704 <span class=\"sub-title\">\uc8fc\uc2dd\uc2dc\uc7a5 A<\/span><\/h3>\n                <span class=\"time-stamp\">06.28 15:30<\/span>\n            <\/div>\n            <table class=\"stock-table\">\n                <tbody>\n                    <tr class=\"up-trend\">\n                        <td class=\"rank\">1<\/td>\n                        <td class=\"name\">\ubbf8\ub798 \uc778\ub371\uc2a4 \uc778\ubc84\uc2a4 2X<\/td>\n                        <td class=\"price\">125<\/td>\n                        <td class=\"change\">\u25b2 8.42%<\/td>\n                        <td class=\"volume\">15,420,115,840<\/td>\n                    <\/tr>\n                    <tr class=\"up-trend\">\n                        <td class=\"rank\">2<\/td>\n                        <td class=\"name\">\uc54c\ud30c \ucf54\uc5b4 \ube14\ub8e8\uce69 ETF<\/td>\n                        <td class=\"price\">1,450<\/td>\n                        <td class=\"change\">\u25b2 4.15%<\/td>\n                        <td class=\"volume\">2,110,480,220<\/td>\n                    <\/tr>\n                    <tr class=\"up-trend\">\n                        <td class=\"rank\">3<\/td>\n                        <td class=\"name\">\uae00\ub85c\ubc8c \ud558\uc774\ud14c\ud06c \uc778\ubc84\uc2a4<\/td>\n                        <td class=\"price\">8,310<\/td>\n                        <td class=\"change\">\u25b2 12.60%<\/td>\n                        <td class=\"volume\">412,950,330<\/td>\n                    <\/tr>\n                    <tr class=\"down-trend\">\n                        <td class=\"rank\">4<\/td>\n                        <td class=\"name\">\uc5d0\ucf54\uc5d0\ub108\uc9c0 \ucc28\uc138\ub300 \ub808\ubc84\ub9ac\uc9c0<\/td>\n                        <td class=\"price\">28,900<\/td>\n                        <td class=\"change\">\u25bc -14.25%<\/td>\n                        <td class=\"volume\">201,360,115<\/td>\n                    <\/tr>\n                    <tr class=\"up-trend\">\n                        <td class=\"rank\">5<\/td>\n                        <td class=\"name\">\ud0c0\uc774\ud0c4 \uad6d\ucc44\uc120\ubb3c \uc778\ubc84\uc2a4 2X<\/td>\n                        <td class=\"price\">95<\/td>\n                        <td class=\"change\">\u25b2 7.85%<\/td>\n                        <td class=\"volume\">145,210,670<\/td>\n                    <\/tr>\n                <\/tbody>\n            <\/table>\n        <\/div>\n\n        <div class=\"volume-col\">\n            <div class=\"section-header\">\n                <h3><span class=\"sub-title\">\uc8fc\uc2dd\uc2dc\uc7a5 B<\/span><\/h3>\n                <span class=\"time-stamp\">06.28 15:30<\/span>\n            <\/div>\n            <table class=\"stock-table\">\n                <tbody>\n                    <tr class=\"down-trend\">\n                        <td class=\"rank\">1<\/td>\n                        <td class=\"name\">\uc81c\ub2c8\uc2a4 \ubc14\uc774\uc624\ud14d<\/td>\n                        <td class=\"price\">2,150<\/td>\n                        <td class=\"change\">\u25bc -15.40%<\/td>\n                        <td class=\"volume\">52,140,880<\/td>\n                    <\/tr>\n                    <tr class=\"down-trend\">\n                        <td class=\"rank\">2<\/td>\n                        <td class=\"name\">\uc11c\uad11\ub124\ud2b8\uc6cd\uc2a4<\/td>\n                        <td class=\"price\">4,820<\/td>\n                        <td class=\"change\">\u25bc -3.05%<\/td>\n                        <td class=\"volume\">42,610,730<\/td>\n                    <\/tr>\n                    <tr class=\"up-trend\">\n                        <td class=\"rank\">3<\/td>\n                        <td class=\"name\">\uc5d0\uc774\uce58\uc54c \ubaa8\ube4c\ub9ac\ud2f0<\/td>\n                        <td class=\"price\">7,240<\/td>\n                        <td class=\"change\">\u25b2 6.12%<\/td>\n                        <td class=\"volume\">28,450,190<\/td>\n                    <\/tr>\n                    <tr class=\"down-trend\">\n                        <td class=\"rank\">4<\/td>\n                        <td class=\"name\">\ud14c\ud06c\ub178 \ud30c\ud2b8\ub108\uc2a4<\/td>\n                        <td class=\"price\">920<\/td>\n                        <td class=\"change\">\u25bc -5.20%<\/td>\n                        <td class=\"volume\">18,120,440<\/td>\n                    <\/tr>\n                    <tr class=\"up-trend\">\n                        <td class=\"rank\">5<\/td>\n                        <td class=\"name\">\uc2dc\uadf8\ub9c8 \ub514\uc2a4\ud50c\ub808\uc774<\/td>\n                        <td class=\"price\">1,120<\/td>\n                        <td class=\"change\">\u25b2 5.54%<\/td>\n                        <td class=\"volume\">15,310,960<\/td>\n                    <\/tr>\n                <\/tbody>\n            <\/table>\n        <\/div>\n    <\/div>\n\n    <div class=\"main-split-layout\">\n        \n        <div class=\"left-content-area\">\n            \n            <div class=\"featured-news-banner\">\n                <div class=\"featured-image\">\n                    <div class=\"image-placeholder\">Future Eco Energy Image<\/div>\n                <\/div>\n                <div class=\"featured-text\">\n                    <h2>\uce5c\ud658\uacbd \ubbf8\ub798 \uc5d0\ub108\uc9c0 \uc778\ud504\ub77c \ud22c\uc790 \uac00\uc18d\ud654\u2026\uc2dc\uc7a5 \ud328\ub7ec\ub2e4\uc784 \uc804\ud658 \uc608\uace0<\/h2>\n                    <p>\uae00\ub85c\ubc8c \uacf5\uae09\ub9dd \uc7ac\ud3b8\uacfc \ud601\uc2e0 \uae30\uc220 \ub3c4\uc785\uc774 \ub9de\ubb3c\ub9ac\uba70 \uc2e0\uc7ac\uc0dd \uc5d0\ub108\uc9c0 \uad00\ub828 \uae30\uc5c5\ub4e4\uc758 \uac00\uce58\uac00 \uc7ac\ud3c9\uac00\ubc1b\uace0 \uc788\ub2e4. \ud22c\uc790 \uc804\ubb38\uac00\ub4e4\uc740 \ub2e8\uae30\uc801 \ubcc0\ub3d9\uc131\uc5d0 \uc720\uc758\ud558\uba70 \uc7a5\uae30 \uc131\uc7a5 \uc7a0\uc7ac\ub825\uc5d0 \uc9d1\uc911\ud560 \uac83\uc744 \uad8c\uace0\ud588\ub2e4.<\/p>\n                <\/div>\n            <\/div>\n\n            <div class=\"sub-sections-grid\">\n                <div class=\"sub-section-box\">\n                    <div class=\"section-title-bar\">\n                        <h3>\uc99d\uad8c\uc815\ucc45 \u00b7 \uc2dc\ud669<\/h3>\n                    <\/div>\n                    <ul class=\"news-list-simple\">\n                        <li><a href=\"#\">\ub514\uc9c0\ud138 \uc790\uc0b0 \uaddc\uc81c \ud504\ub808\uc784\uc6cc\ud06c \ub9c8\ub828\u2026\uc2dc\uc7a5 \uc548\uc815\uc131 \uac15\ud654 \uae30\ub300<\/a><\/li>\n                        <li><a href=\"#\">\uc81c\uc870\uc5c5 \uc790\ub3d9\ud654 \uc194\ub8e8\uc158 \ub3c4\uc785 \uae30\uc5c5, \uc0dd\uc0b0\uc131 \ud5a5\uc0c1\uc73c\ub85c \uc2e4\uc801 \uac1c\uc120<\/a><\/li>\n                        <li><a href=\"#\">\ud574\uc678 \uc2e0\ud765 \uc2dc\uc7a5 \uc9c4\ucd9c \uad6d\ub0b4 \uae30\uc5c5\ub4e4, \ud558\ubc18\uae30 \ub9e4\ucd9c \ub2e4\ubcc0\ud654 \uccad\uc2e0\ud638<\/a><\/li>\n                        <li><a href=\"#\">\uc6d0\uc790\uc7ac \uac00\uaca9 \uc548\uc815\ud654\uc5d0 \ub530\ub978 \uc8fc\uc694 \uc0b0\uc5c5\ubcc4 \uc218\uc775\uc131 \ud68c\ubcf5 \uc804\ub9dd<\/a><\/li>\n                        <li><a href=\"#\">\uc2a4\ud0c0\ud2b8\uc5c5 \ud22c\uc790 \uc0dd\ud0dc\uacc4 \ud65c\uc131\ud654\u2026\uc815\ubd80 \uc9c0\uc6d0 \uc815\ucc45 \ud655\ub300 \uacc4\ud68d \ubc1c\ud45c<\/a><\/li>\n                    <\/ul>\n                <\/div>\n\n                <div class=\"sub-section-box\">\n                    <div class=\"section-title-bar tabs-header\">\n                        <h3>\uc0c1\uc2b9\ub960 \uc0c1\uc704<\/h3>\n                        <div class=\"tab-buttons\">\n                            <span class=\"tab active\">\uc2dc\uc7a5 A<\/span>\n                            <span class=\"tab\">\uc2dc\uc7a5 B<\/span>\n                        <\/div>\n                    <\/div>\n                    <table class=\"gainer-table\">\n                        <tbody>\n                            <tr>\n                                <td class=\"rank\">1<\/td>\n                                <td class=\"name\">\ud55c\uac15\uc885\ud569\uac74\uc124<\/td>\n                                <td class=\"price\">5,200<\/td>\n                                <td class=\"percent-up\">30.00%<\/td>\n                            <\/tr>\n                            <tr>\n                                <td class=\"rank\">2<\/td>\n                                <td class=\"name\">\uc601\uc9c4\uc804\uc790<\/td>\n                                <td class=\"price\">910<\/td>\n                                <td class=\"percent-up\">29.95%<\/td>\n                            <\/tr>\n                            <tr>\n                                <td class=\"rank\">3<\/td>\n                                <td class=\"name\">\ub300\uc131\uc720\ud1b5<\/td>\n                                <td class=\"price\">41,200<\/td>\n                                <td class=\"percent-up\">29.88%<\/td>\n                            <\/tr>\n                            <tr>\n                                <td class=\"rank\">4<\/td>\n                                <td class=\"name\">\ud55c\uac15\uc885\ud569\uac74\uc124\uc6b0<\/td>\n                                <td class=\"price\">15,800<\/td>\n                                <td class=\"percent-up\">28.40%<\/td>\n                            <\/tr>\n                            <tr>\n                                <td class=\"rank\">5<\/td>\n                                <td class=\"name\">\ucf00\uc774\uc5e0 \ud14d<\/td>\n                                <td class=\"price\">1,240<\/td>\n                                <td class=\"percent-up\">24.15%<\/td>\n                            <\/tr>\n                        <\/tbody>\n                    <\/table>\n                    <div class=\"more-link-container\">\n                        <span class=\"time-stamp-inline\">06.28 15:30<\/span>\n                        <a href=\"#\" class=\"more-link\">\ub354\ubcf4\uae30 &gt;<\/a>\n                    <\/div>\n                <\/div>\n            <\/div>\n\n        <\/div>\n\n        <div class=\"sidebar-area\">\n            <div class=\"section-title-bar\">\n                <h3>\uc99d\uad8c \ub9ce\uc774 \ubcf8 \ub274\uc2a4<\/h3>\n            <\/div>\n            <ol class=\"most-viewed-list\">\n                <li>\n                    <span class=\"num\">1<\/span>\n                    <a href=\"#\">\ud558\ubc18\uae30 \uc8fc\ubaa9\ud574\uc57c \ud560 5\ub300 \ud575\uc2ec \uae30\uc220 \ud2b8\ub80c\ub4dc\uc640 \uad00\ub828\uc8fc \ubd84\uc11d<\/a>\n                <\/li>\n                <li>\n                    <span class=\"num\">2<\/span>\n                    <a href=\"#\">\uac1c\uc778 \ud22c\uc790\uc790\ub97c \uc704\ud55c \uc790\uc0b0 \ubc30\ubd84 \uac00\uc774\ub4dc: \uc704\ud5d8 \uad00\ub9ac\uc758 \uccab\uac78\uc74c<\/a>\n                <\/li>\n                <li>\n                    <span class=\"num\">3<\/span>\n                    <a href=\"#\">\uc804\uae30\ucc28 \ubc30\ud130\ub9ac \uc2dc\uc7a5\uc758 \uc0c8\ub85c\uc6b4 \ud601\uc2e0 \uae30\uc220\uacfc \ud5a5\ud6c4 \uc804\ub9dd<\/a>\n                <\/li>\n                <li>\n                    <span class=\"num\">4<\/span>\n                    <a href=\"#\">\uae00\ub85c\ubc8c \uae08\ub9ac \ubcc0\ub3d9\uc5d0 \ub530\ub978 \uc790\uc0b0 \uc2dc\uc7a5 \uc601\ud5a5\uacfc \ub300\uc751 \uc804\ub7b5<\/a>\n                <\/li>\n                <li>\n                    <span class=\"num\">5<\/span>\n                    <a href=\"#\">\uc720\ud1b5 \uc5c5\uacc4\uc758 \ub514\uc9c0\ud138 \uc804\ud658 \uc18d\ub3c4\uc804\u2026\uc18c\ube44 \ud328\ud134 \ubcc0\ud654\uc5d0 \ub9de\ucd98 \uc804\ub7b5<\/a>\n                <\/li>\n                <li>\n                    <span class=\"num\">6<\/span>\n                    <a href=\"#\">\uc2a4\ub9c8\ud2b8 \ud329\ud1a0\ub9ac \ub3c4\uc785\uc73c\ub85c \uc81c\uc870 \ud601\uc2e0 \uc774\ub8ec \uc911\uc18c\uae30\uc5c5 \uc131\uacf5 \uc0ac\ub840<\/a>\n                <\/li>\n                <li>\n                    <span class=\"num\">7<\/span>\n                    <a href=\"#\">\uce5c\ud658\uacbd \ud328\ud0a4\uc9d5 \uc758\ubb34\ud654 \uac00\uc18d\u2026\ud328\ub7ec\ub2e4\uc784 \ubcc0\ud654\uc5d0 \uc9c1\uba74\ud55c \uc0b0\uc5c5\uacc4<\/a>\n                <\/li>\n            <\/ol>\n        <\/div>\n\n    <\/div>\n<\/div>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75bb283 elementor-widget elementor-widget-html\" data-id=\"75bb283\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js\"><\/script>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/moment@2.29.1\/moment.min.js\"><\/script>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chartjs-adapter-moment@1.0.0\"><\/script>\n\n<div class=\"dax-main-content\">\n    <div class=\"dax-header-row\">\n        <div class=\"dax-section-title\">\nKorea V Exchange<\/div>\n    <\/div>\n    \n    <div class=\"dax-price-info\">\n        <div class=\"dax-current-price-section\">\n            <div class=\"dax-current-price\" id=\"current-price\">0.00<\/div>\n            <div class=\"dax-change-data\">(<span id=\"change-value\">0.00<\/span> \/ <span id=\"change-percent-value\">0.00 %<\/span>)<\/div>\n        <\/div>\n        <div class=\"dax-data-status\">\n            23:17:41 - Real-time Data. Currency in MYR (<span style=\"color: #4a4a4a; text-decoration: underline;\">Disclaimer<\/span>)\n        <\/div>\n    <\/div>\n\n    <div class=\"dax-chart-wrapper\">\n        <div class=\"dax-chart-controls\">\n            <button class=\"time-active\">1<\/button> \n            <button>5<\/button>\n            <button>15<\/button>\n            <button>30<\/button>\n            <button>1H<\/button>\n            <button>5H<\/button>\n            <button>1D<\/button>\n            <button>1W<\/button>\n            <button>1M<\/button>\n        <\/div>\n        \n        <div id=\"chart-container\" class=\"dax-chart-area\"> <canvas id=\"myChart\"><\/canvas> <\/div>\n        \n        <div class=\"dax-info-table-bottom\">\n            <div class=\"dax-info-row dax-row-header\">\n                <div class=\"dax-info-label\">Volume<\/div> \n                <div class=\"dax-info-value\" id=\"volume-value\">0<\/div>\n                <div class=\"dax-info-label-right\">Open<\/div>\n                <div class=\"dax-info-value-right\" id=\"open-value\">0.00<\/div>\n            <\/div>\n            <div class=\"dax-info-row\">\n                <div class=\"dax-info-label\">Open<\/div> \n                <div class=\"dax-info-value\" id=\"last-value\">0.00<\/div>\n                <div class=\"dax-info-label-right\">Day's Range<\/div>\n                <div class=\"dax-info-value-right\" id=\"range-value\"><span id=\"high-value\">0.00<\/span> - <span id=\"low-value\">0.00<\/span><\/div> \n            <\/div>\n            <div class=\"dax-info-row\">\n                <div class=\"dax-info-label\">1-Year Change<\/div> \n                <div class=\"dax-info-value\">282.57%<\/div> \n                <div class=\"dax-info-label-right\">52 wk Range<\/div>\n                <div class=\"dax-info-value-right\" id=\"wk-range-value\"><span id=\"prev-close-value\">0.00<\/span> - <span id=\"amount-value\">0.00<\/span><\/div>\n            <\/div>\n        <\/div>\n\n        <div class=\"dax-custom-table-wrapper\">\n            <div class=\"dax-custom-cell dax-custom-label\">closed<\/div>\n            <div class=\"dax-custom-cell dax-custom-label\">top<\/div>\n            <div class=\"dax-custom-cell dax-custom-value\" id=\"custom-top\">-<\/div> \n            <div class=\"dax-custom-cell dax-custom-label\">bottom<\/div>\n            <div class=\"dax-custom-cell dax-custom-value\" id=\"custom-bottom\">-<\/div> \n        <\/div>\n\n        <div class=\"dax-bottom-data-row\">\n            As at <span id=\"custom-date\">0000-00-00<\/span> 22:15 PM\n        <\/div>\n    <\/div>\n<\/div>\n<script>\n   \n    const sheetID = '1ICDULxJpjo_mKIitExFguInty1EGGc-OzMExPtUDEvE';\n    const sheetGID = '0';\n    const csvURL = `https:\/\/docs.google.com\/spreadsheets\/d\/${sheetID}\/export?format=csv&gid=${sheetGID}`;\n    \n    \n    const apiBaseURL = \"https:\/\/synapse-hub.net\/public_api\/stock\/get_live_result.php\";\n    \n    \n    const lottoCode = \"stock_korea_v\"; \n    let myChart;\n    let lastFetchedTop = null;\n    let lastFetchedBottom = null;\n\n    const domElements = {\n        currentPrice: document.getElementById('current-price'),\n        change: document.getElementById('change-value'),\n        changePercent: document.getElementById('change-percent-value'),\n        prevClose: document.getElementById('prev-close-value'),\n        open: document.getElementById('open-value'),\n        last: document.getElementById('last-value'),\n        high: document.getElementById('high-value'),\n        low: document.getElementById('low-value'),\n        volume: document.getElementById('volume-value'),\n        amount: document.getElementById('amount-value'),\n        customTop: document.getElementById('custom-top'), \n        customBottom: document.getElementById('custom-bottom'), \n        customDate: document.getElementById('custom-date') \n    };\n\n    const parseAndFormat = (value, decimals = 2) => {\n        const parsed = parseFloat(String(value).replace(\/,\/g, ''));\n        return isNaN(parsed) ? '0.00' : parsed.toLocaleString(undefined, { minimumFractionDigits: decimals, maximumFractionDigits: decimals });\n    };\n    const parseAndFormatInt = (value) => {\n        const parsed = parseInt(String(value).replace(\/,\/g, ''));\n        return isNaN(parsed) ? '0' : parsed.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 0 });\n    };\n    function formatDateToLocal(time) {\n        const localDate = new Date(time);\n        const year = localDate.getFullYear();\n        const month = String(localDate.getMonth() + 1).padStart(2, '0');\n        const day = String(localDate.getDate()).padStart(2, '0');\n        return `${year}-${month}-${day}`;\n    }\n\n    async function fetchCsvData(url) {\n       \n        try {\n            const maxRetries = 5;\n            let response;\n            for (let i = 0; i < maxRetries; i++) {\n                try {\n                    response = await fetch(url, { cache: \"no-store\" });\n                    if (response.ok) break; \n                } catch (error) {\n                    console.warn(`Fetch attempt ${i + 1} failed:`, error.message);\n                }\n                if (i < maxRetries - 1) {\n                    const delay = Math.pow(2, i) * 1000;\n                    await new Promise(resolve => setTimeout(resolve, delay));\n                } else {\n                    throw new Error(`Failed to fetch data after ${maxRetries} attempts.`);\n                }\n            }\n            if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); }\n            const csvText = await response.text();\n            return csvText.trim().split('\\n').map(line => line.split(','));\n        } catch (error) {\n            console.error(\"Error fetching CSV data:\", error);\n            return [];\n        }\n    }\n\n    async function fetchLaoLottoData() {\n        const finalApiURL = `${apiBaseURL}?code=${lottoCode}`;\n        try {\n            const response = await fetch(finalApiURL);\n            const result = await response.json();\n            \n            const now = new Date();\n            domElements.customDate.textContent = formatDateToLocal(now);\n\n          \n            if (result.success && result.top3 && result.bottom2) {\n                const newTop = result.top3;\n                const newBottom = result.bottom2;\n\n                if (newTop !== lastFetchedTop || newBottom !== lastFetchedBottom) {\n                    domElements.customTop.textContent = newTop;\n                    domElements.customBottom.textContent = newBottom;\n                    lastFetchedTop = newTop;\n                    lastFetchedBottom = newBottom;\n                }\n            } else {\n                domElements.customTop.textContent = \"-\";\n                domElements.customBottom.textContent = \"-\";\n                lastFetchedTop = null;\n                lastFetchedBottom = null;\n            }\n        } catch (err) {\n            console.error(\"\u274c Error fetching API:\", err);\n            domElements.customTop.textContent = \"-\";\n            domElements.customBottom.textContent = \"-\";\n            lastFetchedTop = null;\n            lastFetchedBottom = null;\n        }\n    }\n   \n    async function updateAllData() {\n      \n        const now = new Date();\n        const hour = now.getHours();\n        const minute = now.getMinutes();\n\n        domElements.customDate.textContent = formatDateToLocal(now);\n\n       \n        if ((hour === 13 && minute >= 00) || (hour > 12 && hour < 24)) {\n            fetchLaoLottoData(); \n        } else {\n            domElements.customTop.textContent = \"-\";\n            domElements.customBottom.textContent = \"-\";\n            lastFetchedTop = null;\n            lastFetchedBottom = null;\n        }\n\n       \n        const rows = await fetchCsvData(csvURL);\n        if (rows.length < 2) { console.warn(\"No data in CSV.\"); return; }\n        \n        const startHour = 9, startMinute = 0;\n        const endHour = 13, endMinute = 00;\n        const currentTime = moment();\n        \n        let sessionStartMoment = currentTime.clone().hour(startHour).minute(startMinute).second(0);\n        let sessionEndMoment = currentTime.clone().hour(endHour).minute(endMinute).second(0);\n        \n        if (sessionEndMoment.isBefore(sessionStartMoment)) {\n             if (currentTime.isBefore(sessionStartMoment) && currentTime.hour() < startHour) {\n                 sessionStartMoment.subtract(1, 'days');\n             } else {\n                 sessionEndMoment.add(1, 'days');\n             }\n        }\n        \n       \n        let chartData = rows.slice(1).map(row => {\n            if (!row[0] || !row[1]) return null;\n            let parsedMoment = moment(row[0], [\"HH:mm:ss\", \"HH:mm\"]);\n            if (!parsedMoment.isValid()) return null;\n            \n            if (parsedMoment.hour() < startHour) {\n                parsedMoment.year(sessionEndMoment.year()).month(sessionEndMoment.month()).date(sessionEndMoment.date());\n            } else {\n                parsedMoment.year(sessionStartMoment.year()).month(sessionStartMoment.month()).date(sessionStartMoment.date());\n            }\n\n            const price = parseFloat(row[1].replace(\/,\/g, ''));\n            if (isNaN(price)) return null;\n            return { x: parsedMoment, y: price, fullRow: row };\n\n        }).filter(point => point !== null)\n          .filter(point => point.x.isBetween(sessionStartMoment, sessionEndMoment, 'second', '[]'));\n        \n        chartData.sort((a, b) => a.x.valueOf() - b.x.valueOf());\n        \n        const isMarketOpen = currentTime.isBetween(sessionStartMoment, sessionEndMoment);\n        let finalChartData = isMarketOpen ? chartData.filter(p => p.x.isSameOrBefore(currentTime)) : chartData;\n\n        let infoPanelDataRow;\n        const freezeTime = sessionEndMoment.clone(); \n\n        if (!isMarketOpen || currentTime.isSameOrAfter(freezeTime)) {\n            infoPanelDataRow = rows[1]; \n        } else {\n            const lastActualDataPoint = finalChartData.length > 0 ? finalChartData[finalChartData.length - 1] : null;\n            infoPanelDataRow = lastActualDataPoint ? lastActualDataPoint.fullRow : null;\n        }\n        \n        if (!infoPanelDataRow) { \n            if(rows.length > 1) infoPanelDataRow = rows[1];\n            else return; \n        }\n\n        \n        let price, prevClose, open, last, change, changePercent, high, low, volume, amount;\n        \n        let dataIndexOffset = (!isMarketOpen || currentTime.isSameOrAfter(freezeTime)) ? 14 : 1;\n\n        price         = parseFloat(String(infoPanelDataRow[dataIndexOffset + 0] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        prevClose     = parseFloat(String(infoPanelDataRow[dataIndexOffset + 1] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        open          = parseFloat(String(infoPanelDataRow[dataIndexOffset + 3] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        last          = parseFloat(String(infoPanelDataRow[dataIndexOffset + 2] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        change        = parseFloat(String(infoPanelDataRow[dataIndexOffset + 4] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        changePercent = parseFloat(String(infoPanelDataRow[dataIndexOffset + 5] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        high          = parseFloat(String(infoPanelDataRow[dataIndexOffset + 6] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        low           = parseFloat(String(infoPanelDataRow[dataIndexOffset + 7] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        volume        = parseFloat(String(infoPanelDataRow[dataIndexOffset + 8] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        amount        = parseFloat(String(infoPanelDataRow[dataIndexOffset + 9] || 0).replace(\/,\/g, '').replace(\/['\"%]\/g, ''));\n        \n        domElements.currentPrice.textContent = parseAndFormat(price);\n        domElements.prevClose.textContent = parseAndFormat(prevClose);\n        domElements.open.textContent = parseAndFormat(open);\n        domElements.last.textContent = parseAndFormat(last);\n        domElements.change.textContent = parseAndFormat(change);\n        domElements.changePercent.textContent = parseAndFormat(changePercent) + ' %';\n        domElements.high.textContent = parseAndFormat(high);\n        domElements.low.textContent = parseAndFormat(low);\n        domElements.volume.textContent = parseAndFormatInt(volume);\n        domElements.amount.textContent = parseAndFormatInt(amount);\n\n        let displayColor = !isNaN(change) ? (change > 0 ? '#10b981' : (change < 0 ? '#ef4444' : '#333')) : '#333';\n        domElements.currentPrice.style.color = displayColor;\n        domElements.change.style.color = displayColor;\n        domElements.changePercent.style.color = displayColor;\n\n     \n        const chartLineColor = '#14aaac'; \n        const chartFillColor = 'rgba(20, 170, 172, 0.2)';\n\n        const chartOptions = {\n            responsive: true, \n            maintainAspectRatio: false,\n            scales: {\n                x: { \n                    type: 'time', \n                    time: { unit: 'hour', displayFormats: { hour: 'HH:mm' } }, \n                    min: sessionStartMoment.toISOString(), \n                    max: sessionEndMoment.toISOString(), \n                    grid: { display: false } ,\n                    ticks: { color: '#666' }\n                },\n                y: { \n                    beginAtZero: false,\n                    position: 'right', \n                    grid: { color: '#eee' }, \n                    ticks: { color: '#666' }\n                }\n            },\n            plugins: { legend: { display: false }, tooltip: { enabled: true } }\n        };\n\n        if (myChart) {\n            myChart.data.datasets[0].data = finalChartData;\n            myChart.data.datasets[0].borderColor = chartLineColor;\n            myChart.data.datasets[0].backgroundColor = chartFillColor;\n            myChart.update('none');\n        } else {\n            const ctx = document.getElementById('myChart').getContext('2d');\n            myChart = new Chart(ctx, {\n                type: 'line',\n                data: { datasets: [{ \n                    data: finalChartData, \n                    borderColor: chartLineColor,\n                    backgroundColor: chartFillColor,\n                    fill: true, \n                    borderWidth: 1, \n                    pointRadius: 0 \n                }] },\n                options: chartOptions\n            });\n        }\n    }\n\n    updateAllData();\n  \n    setInterval(updateAllData, 30 * 1000); \n<\/script>\n\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6a85186 elementor-widget elementor-widget-html\" data-id=\"6a85186\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<h5 class=\"sgx-history-title\">Result Number History<\/h5>\n\n<table id=\"sgxHistoryTable\" class=\"sgx-history-table\">\n    <thead>\n        <tr>\n            <th>Date<\/th>\n            <th>Afternoon Top<\/th>\n            <th>Afternoon Bottom<\/th>\n        <\/tr>\n    <\/thead>\n    <tbody>\n        <tr><td colspan=\"3\">Loading data...<\/td><\/tr>\n    <\/tbody>\n<\/table>\n\n<script>\n    const tableID = '#sgxHistoryTable';\n    const apiHistoryBaseURL = \"https:\/\/synapse-hub.net\/public_api\/stock\/get_history_result.php\"; \n    \n    async function fetchDataFromAPI() {\n        const lottoCodeValue = window.lottoCode || \"stock_korea_v\"; \n        const apiHistoryURL = `${apiHistoryBaseURL}?code=${lottoCodeValue}`;\n        const tableBody = document.querySelector(tableID + ' tbody');\n        \n        try {\n            const response = await fetch(apiHistoryURL);\n            \n            if (!response.ok) {\n                throw new Error(`HTTP status ${response.status}`);\n            }\n\n            let data = await response.json();\n\n         \n            if (!Array.isArray(data)) {\n                 if (data && Array.isArray(data.data)) {\n                     data = data.data;\n                 } else {\n                     tableBody.innerHTML = '<tr><td colspan=\"3\">\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e44\u0e14\u0e49: API \u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e32\u0e23\u0e4c\u0e40\u0e23\u0e22\u0e4c<\/td><\/tr>';\n                     return;\n                 }\n            }\n\n            tableBody.innerHTML = ''; \n            \n           \n            if (data.length === 0) {\n                tableBody.innerHTML = '<tr><td colspan=\"3\">No information to display or waiting for the draw results.<\/td><\/tr>';\n                return;\n            }\n\n     \n            data.forEach(row => {\n                const apiDate = (row.entry_date || row.lotto_date || '').slice(0, 10); \n                const prize5d = row.prize_5d || '';\n                \n               \n                const first3 = prize5d.substring(0, 3); \n                const last2 = prize5d.substring(3, 5); \n\n                const tr = document.createElement('tr');\n                tr.appendChild(createCell(apiDate));\n                tr.appendChild(createCell(first3));\n                tr.appendChild(createCell(last2));\n                tableBody.appendChild(tr);\n            });\n\n        } catch (err) {\n            console.error(\"\u274c \u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14\u0e43\u0e19\u0e01\u0e32\u0e23\u0e42\u0e2b\u0e25\u0e14\u0e1b\u0e23\u0e30\u0e27\u0e31\u0e15\u0e34:\", err);\n            tableBody.innerHTML = '<tr><td colspan=\"3\">\u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14\u0e43\u0e19\u0e01\u0e32\u0e23\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25<\/td><\/tr>';\n        }\n    }\n\n    function createCell(text) {\n        const td = document.createElement('td');\n        td.textContent = text || \"-\";\n        return td;\n    }\n\n   \n    document.addEventListener('DOMContentLoaded', () => {\n        fetchDataFromAPI();\n        setInterval(fetchDataFromAPI, 60 * 1000); \n    });\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\uac70\ub798\ub7c9 \uc0c1\uc704 \uc8fc\uc2dd\uc2dc\uc7a5 A 06.28 15:30 1 \ubbf8\ub798 \uc778\ub371\uc2a4 \uc778\ubc84\uc2a4 2X 125 \u25b2 8.42% 15,420,115,840 2 \uc54c\ud30c \ucf54\uc5b4 \ube14\ub8e8\uce69 ETF [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-8","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/pages\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":31,"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/pages\/8\/revisions"}],"predecessor-version":[{"id":62,"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/pages\/8\/revisions\/62"}],"wp:attachment":[{"href":"https:\/\/koreav-index.com\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}