    `;

            // Store the calculated values for use in placeBets function
            shareCalculationsElement.dataset.outcome1 = outcome1;
            shareCalculationsElement.dataset.outcome2 = outcome2;
            shareCalculationsElement.dataset.cost1 = betAmount.toFixed(2);
            shareCalculationsElement.dataset.cost2 = costMarket2.toFixed(2);
        }

        async function placeBets() {
            const apiKey = document.getElementById('apiKey').value;
            const shareCalculat