Crypto Options Traders Turn Bearish as $2.5B Expiry Event Looms

Around 26,000 Bitcoin options contracts will expire on Friday, April 4, and they have a notional value of roughly $2.1 billion. This week’s event is more modest than average and much smaller than last week’s massive end-of-month and end-of-quarter expiry event. The impact on spot markets is likely to be minimal as spot traders are still reeling from the Trump administration’s wide-sweeping global tariff announcement on Wednesday. Bitcoin Options Expiry This week’s batch of Bitcoin options contracts has a put/call ratio of 1.27, meaning that there are more put (short) contracts expiring than calls (longs). There is also a max pain point of $85,000, which is where most losses will be made. Moreover, open interest (OI), or the value or number of BTC options contracts yet to expire, is falling at higher prices, with around $850 million at $90,000 and $100,000 strike prices, according to Deribit. There is also more than $900 million in OI at the lower $80,000 strike price and over $700 million at $70,000 as derivatives traders lose confidence in higher prices and turn bearish on the longer time frames. Options Expiry Alert! Last week’s quarterly expiry brought the heat, this week’s setup is quieter, but positioning still matters. At 08:00 UTC tomorrow, ~$2.5B in crypto options are set to expire. $BTC : $2.16B notional | Put/Call: 1.27 | Max Pain: $85K $ETH : $371M… pic.twitter.com/zPezzcVn1B — Deribit (@DeribitOfficial) April 3, 2025 Crypto derivatives provider Greeks Live said the group was “predominantly bearish, expecting continued choppy price action” in an options market update this week. “Traders are positioning for more blood and four more years of chop with many selling calls, particularly at the $87k and $90k to $94k levels for April 4th expiry,” it stated. Greeks noted the diminishing bullish sentiment, stating “There’s skepticism about upward movement with one trader noting nobody is ready to ‘bullieve’ anymore.” In addition to today’s tranche of Bitcoin options, there are around 204,000 Ethereum contracts that are also expiring today, with a notional value of $372 million, a max pain point of $1,850, and a put/call ratio of 1.32. This brings Friday’s combined crypto options expiry notional value to around $2.5 billion. Crypto Market Outlook Spot markets have continued to retreat this week with a 6.5% decline in total capitalization since this time last Friday, dropping it to $2.75 trillion at the time of writing. Bitcoin remains weakened , having fallen below $81,500 in an intraday low before a minor recovery. It reclaimed $83,000 but fell below it again during Friday morning trading in Asia, suggesting that further downside pressure remains. Ethereum is at bear market lows, having dumped below $1,800 again and trading at levels last seen in October 2023. Meanwhile, altcoins across the board continue to weaken as market sentiment turns bearish. The post Crypto Options Traders Turn Bearish as $2.5B Expiry Event Looms appeared first on CryptoPotato .

Read more

How Soon Can Pi Network Coin Price Bounce Back?

Pi Network’s token (PI) price has been on a downward trend, hitting a new monthly low of $0.5376 on April 4, down 69%. This continues a sharp PI price decline from the March peak, sparking concerns among investors. However, technical indicators suggest a potential rebound in the short term, although broader challenges may limit any significant recovery. Will Pi Network Coin Price Bounce Back? The Relative Strength Index (RSI) for Pi Network’s coin has dropped below 20, signaling oversold conditions on the hourly chart. Typically, when the RSI falls into this region, a short-term price rebound may follow. Historical trends in the market show that such oversold conditions often lead to temporary recoveries. Source: TradingView Any rebound in PI price is expected to face strong resistance near the $0.6817 to $0.6915 range. This level was once support but has now turned into resistance due to the price’s recent downturn. A break above this resistance would likely trigger a stronger rally, although the broader market environment might still limit the scope of any recovery. In addition to the RSI, the Chaikin Money Flow (CMF) is currently at -0.23, indicating negative money flow. This suggests that selling pressure remains dominant, and there is more capital flowing out of the token than entering. Broader Market Factors Could Limit Rebound Potential Although the technical analysis shows that Pi Network is highly likely to bounce from the current levels, factors in the broader market may halt a recovery for Pi Network. Currently, investors’ risk appetite is relatively low to moderate and most of them prefer to invest in less-risky assets than investing in other cryptocurrencies including the Pi currency. Moreover, the protracted trade dispute between the United States and the rest of the world as well as the general macroeconomic instability also contributed to the pressure on the crypto market. From within, Pi Network still suffers with a number of problems such as slow feature releases and doubts about its preparedness for the mainnet release. Some of the critics of the Pi Core Team include that the leadership cannot handle the increasing challenge of the project that has been expanding over the years since 2019. PiDaoSwap has voiced frustration over the delayed and dragged-out KYB process, even though their platform is already fully developed. This painful slowdown isn’t just affecting pioneers (with KYC approvals and mainnet migration)—it’s hitting the very ecosystems trying to build on… pic.twitter.com/tqPeLQ8oX6 — Pi Network – Open Mainnet (@Pi81Mall) April 4, 2025 The internal factors coupled with other market conditions might hinder Pi Network full recovery in the short run. Despite the positive outlook given by Craig Steven Wright and others, the community constantly complains about the lack of transparency, slow pace of the KYC integration, and the restricted access for third-party developers. Until these issues are fixed, even if the prices have recovered, it may only be a temporary phenomenon. Will Exchange Listings Boost Pi Network Coin Price? The overall market activity of Pi Network has been steadily rising and has now taken a promising turn. Trading volume has risen to $478 million, an increase of than 76% compared to its previous level. This is a clear indication that many are investing in the current downward trend waiting for better indicators of improve market performance. However, there is one disadvantage that may have an impact on the increase in optimism – the fact that Pi Network has not been included in the Binance Vote to List . Currently, in the second stage of voting, Binance is allowing only projects related to BNB coin to vote. Without a listing on major platforms like Binance or Coinbase, Pi Network could continue to face challenges in attracting new investors. This absence from large exchanges suggests that PI price may struggle to maintain upward momentum in the coming weeks unless it secures new listings or makes significant progress with its platform. Leadership and Community Concerns The members of the Pi Core Team are under pressure from the Pi Network community. Most people think that the leadership is out of touch with happenings within the network. Although over 125,000 sellers took part in the PiFest event some members of the community feel that the Core Team fails to respond to some profound issues such as mainnet delays, slow KYC, or the absence of listings. One of its critics has been claiming that the Pi Core Team should start with the transparent disclosure of information, as the monthly updates now look artificial and do not reflect the key issues the communities face. Some of the recommendations that have been made regarding the project include decentralizing the decision-making process to enhance accountability. The post How Soon Can Pi Network Coin Price Bounce Back? appeared first on CoinGape .

Read more

Altcoins Ready to Surge Before 2026—MAGACOINFINANCE Leads the Race

As the countdown to 2026 begins, attention across crypto communities is turning toward altcoins with serious upside potential. Projects like Polygon, Ethereum, Aptos, and Injective continue to build—but it’s MAGACOINFINANCE that is stepping into a leadership position among early movers. With structure, speed, and strategic momentum on its side, MAGACOINFINANCE is becoming the token that traders and long-term investors alike are watching more closely than ever. PRE-SALE SELLING OUT – CLICK HERE TO SECURE A SPOT NOW Strong Fundamentals Position MAGACOINFINANCE Ahead of the Curve With over $4.8 million raised and the sale nearing completion, MAGACOINFINANCE is entering its final phase with a current price of $0.000245 and a projected listing price of $0.007. This price gap has sparked a surge in wallet activity from both individual buyers and large investor groups. What’s driving this attention? It starts with a 100 billion token cap, a public-first release strategy, and a clean, fair rollout. The project is not only avoiding insider advantages—it’s empowering early supporters by offering true positioning before public exposure. The ecosystem is built on blockchain integrity, and its entry window is now narrowing rapidly as interest accelerates across multiple trading communities. LIMITED TIME OFFER-GET 50% EXTRA BONUS WITH CODE MAGA50X MAGA50X Code – Final Bonus Offer Still Active Those who join now can still take advantage of the MAGA50X promo code, which adds a 50% bonus to every token purchase. As allocation tightens and listing prep moves forward, this limited-time bonus is providing added incentive to secure volume early. Price Watch: MATIC, ETH, APT, INJ Polygon (MATIC) – Trading at $0.62, MATIC continues to lead Ethereum scaling and infrastructure tools. Ethereum (ETH) – ETH remains steady at $1,860.00, with institutional adoption and smart contract dominance. Aptos (APT) – APT is priced at $9.18, delivering high-throughput blockchain architecture. Injective (INJ) – Currently at $8.63, INJ powers cross-chain trading infrastructure and fast execution environments. CLICK HERE TO JOIN THE NEXT BIG BILLION DOLLAR PROJECT Conclusion As altcoins gear up for a major move ahead of 2026, MAGACOINFINANCE is showing every sign of leading the charge. With a fixed supply, rapidly expanding support, and a live 50% bonus, this token is offering something few projects can match. While MATIC, ETH, APT, and INJ maintain strong relevance, MAGACOINFINANCE is claiming its position out front. For more information on MAGACOINFINANCE and to participate in the pre-sale, visit: Website: magacoinfinance.com Twitter/X: https://x.com/magacoinfinance Continue Reading: Altcoins Ready to Surge Before 2026—MAGACOINFINANCE Leads the Race

Read more

Coinbase files to launch XRP futures contract, calls XRP ‘one of the most liquid digital assets’

Coinbase's move to offer XRP futures could boost market liquidity and pave the way for broader institutional adoption of crypto derivatives. The post Coinbase files to launch XRP futures contract, calls XRP ‘one of the most liquid digital assets’ appeared first on Crypto Briefing .

Read more

Fidelity crypto IRAs make their debut – All you need to know!

Will Fidelity flip BlackRock's crypto dominance anytime soon?

Read more

Altcoins are set for one last big rally, but just a few will benefit — Analyst

Altcoins may have just one last rally this cycle, but only those with real utility and strong network activity will see price gains, according to an analyst. “I think there will be one more breadth thrust from altcoins. The question is, is it a sustained rally that we will see for six to twelve months,” Real Vision chief crypto analyst Jamie Coutts told Real Vision co-founder Raoul Pal on an April 3 X livestream . Network activity will be the ‘north star’ for how to trade crypto “At this stage, I am not too sure, but I do believe that quality altcoins where activity returns, activity drives prices …we will definitely see a recovery in some of these more high-quality names,” Coutts said. Cointelegraph reported in January that there were over 36 million altcoins in existence . However, Ethereum still holds the majority share of total value locked (TVL) with 55.56%, followed by Solana (6.89%), Bitcoin (5.77%), BNB Smart Chain (5.68%), and Tron (5.54%), according to CoinGecko data. Coutts said traders should watch where the network activity “is gravitating” and use that as their “north star” for how to trade in crypto, adding he sees an altcoin market upswing within the next two months. “I’m expecting by June to see altcoins really start to pick up again. Predicated on the fact that Bitcoin is back at all-time highs by that point.” On March 28, Coutts told Cointelegraph that Bitcoin could reach all-time highs before the end of Q2 regardless of whether there is more clarity on US President Donald Trump's tariffs and potential recession concerns. The total crypto market cap is down around 8% over the past 30 days. Source: CoinMarketCap Blockchain network activity across the board has recently experienced sharp declines amid a broader crypto market downturn. On Feb. 21, Cointelegraph reported that the number of active addresses on the Solana ( SOL ) network fell to a weekly average of 9.5 million in February, down nearly 40% from the 15.6 million active addresses in November 2024. Altcoin indicators are flashing red Meanwhile, several key indicators the crypto industry uses to determine an incoming altcoin season suggest it's still nowhere in sight. Capriole Investments’ Altcoin Speculation Index has dropped to 12%, down 53% since Dec. 25, the same period during which Ether fell 49% from $3,490, according to CoinMarketCap data. Related: When will altseason arrive? Experts reveal what's holding back altcoins CoinMarketCap’s Altcoin Season Index , which measures the top 100 cryptocurrencies against Bitcoin’s performance over the past 90 days, is reading a score of 14 out of 100, leaning toward a more Bitcoin-dominated market, referring to it as “Bitcoin Season.” The Altcoin Season Index Chart is sitting at 14 at the time of publication. Source: CoinMarketCap However, while Bitcoin dominance — a level often watched for retracements that signal an altcoin season — sits at 62.84%, some analysts argue it’s no longer as relevant as a signal for altcoin season. CryptoQuant CEO Ki Young Yu recently said that Bitcoin Dominance “no longer defines altseason — trading volume does.” Magazine: New 'MemeStrategy' Bitcoin firm by 9GAG, jailed CEO's $3.5M bonus: Asia Express This article does not contain investment advice or recommendations. Every investment and trading move involves risk, and readers should conduct their own research when making a decision.

Read more

Justin Sun takes legal action against FDUSD issuer First Digital Trust for $500M embezzlement

Tron founder Justin Sun has initiated a legal process against First Digital Trust, the issuer behind the FDUSD stablecoin, accusing it of embezzling nearly $500 million in client funds. On a Apr. 3 post in X, Sun said he had met with Hong Kong lawmaker Johnny Wu to report the case and submitted related materials to local regulators and judicial authorities. The alleged embezzlement centers on FDT’s handling of client assets, which Sun claims have been misappropriated. I met with Hong Kong Legislative Council member Johnny Wu and reported the embezzlement case involving nearly $500 million of client reserve funds by First Digital Trust (FDT). We have submitted relevant materials to the regulatory and judicial authorities. We are fully confident… https://t.co/GJe4jnwKBt — H.E. Justin Sun 🍌 (@justinsuntron) April 3, 2025 Sun described the incident as “a major international financial fraud involving traditional financial institutions and web3 platforms,” and said it was time to expose how “loopholes in the trust industry” are being exploited. On the same day, Sun hosted a live podcast to further expose what he called serious irregularities, warning that FDT was effectively insolvent and still operating under the cover of a public trust. You might also like: Coinbase CEO calls for US to allow interest on stablecoins Johnny Wu publicly addressed the case, confirming that he met with the complainants and raised the issue in the Legislative Council. “If the allegations are true, enforcement authorities will definitely take action,” he said. Ng emphasized Hong Kong’s strong legal system, stating, “International investors should not worry about a single incident.” 根據傳媒報道,今天有Web3企業申訴表示在港懷疑被信託公司非法轉移5億美元資產,我也在立法會回應了事件,並會見當時人申訴。不少行業朋友和傳媒向我查詢事件看法,我有以下幾點回應 : 1.… pic.twitter.com/Qm29sfsV1f — Johnny Ng 吴杰庄 (@Johnny_nkc) April 3, 2025 Sun’s accusations, which began on Apr. 2, had briefly caused First Digital USD ( FDUSD ) to lose its dollar peg and drop as low as $0.87. The stablecoin has since stabilized, trading at $0.99 as at press time. In response to Sun, FDT denied all claims and said FDUSD remains fully backed 1:1 by cash and U.S. Treasury bills. FDT dismissed Sun’s claims as “false information” and a “smear campaign.” The company warned it would take legal action to defend its name and accused Sun of spreading false information. Binance, which holds most of the FDUSD supply, confirmed the stablecoin’s 1:1 backing in an update. Its latest attestation showed $2.05 billion in reserves as of Mar. 1. Read more: WisdomTree launches tokenized fund platform on multiple blockchains

Read more

Cardano’s new open-source digital identity platform goes live

Cardano has launched Veridian, its open-source digital identity platform which provides a decentralized solution for both individuals and businesses. Veridian, launched on Apr. 3, gives users complete control over their data by enabling them to safely manage their digital identities. The platform tackles the problem of centralized identity systems that frequently result in data breaches. Without relying on third-party services, users can protect their digital identities through open-source protocols such as KERI decentralized identifiers and ACDC credentials. Introducing Veridian. An open-source identity wallet and platform—now live on iOS and Android. Veridian puts you in control of your digital identity with secure, verifiable credentials and privacy-preserving infrastructure. Get started: https://t.co/Ul25KeDR1L pic.twitter.com/yX6HM4jFaK — Cardano Foundation (@Cardano_CF) April 3, 2025 Veridian can operate independently using optional trust layers, which are security protocols built on the Cardano ( ADA ) blockchain. These help to ensure safe, authentic, and verifiable online interactions without the need for middlemen. Along with Veridian, the Veridian Wallet will provide a simple mobile app for securely storing digital credentials. The wallet creates a trusted experience across various industries by enabling users to manage and validate their credentials. You might also like: Alchemy Pay enables fiat on-ramp for HBAR and USDC on Hedera Cardano is moving forward in other areas in addition to the Veridian launch. Charles Hoskinson, the founder, revealed plans to integrate Bitcoin ( BTC ) into Cardano’s decentralized finance ecosystem in an Apr. 31 interview. Can Cardano Supercharge Bitcoin? @IOHK_Charles Reveals All ➡️BRAND NEW VIDEO: pic.twitter.com/FyNEnbmrXL — The Wolf Of All Streets (@scottmelker) March 31, 2025 Using the Hydra scaling solution, which improves Cardano’s transaction speed, and the Aiken programming language, which allows for smart contracts to be written on both Bitcoin and Cardano, the network aims to connect Bitcoin with DeFi. Hoskinson believes that within three years, institutional adoption of Bitcoin-based DeFi solutions will become a reality, thanks to Cardano’s infrastructure. On the price front, Cardano has recently seen massive volatility. The price fell 13% over the previous week to about $0.65. Jonathan Carter, a market analyst, noted on a Apr. 3 X post that ADA may dip further to a new support level around $0.59, but there is still potential for it to rebound and possibly reach $1. As Cardano continues to grow in areas like DeFi and digital identity, it may attract renewed investor interest and drive its price higher. Read more: Hyperliquid’s JELLY exploit could happen to other DeFi protocols, expert warns

Read more

Japanese Gaming Firm Enish Invests 100 Million Yen in Bitcoin

Enish, a Tokyo Stock Exchange-listed gaming company, has announced the purchase of 100 million yen ($660,000) worth of bitcoin. The investment aligns with the company’s strategy to deepen blockchain integration in game development and diversify financial assets. Enish Strengthens Blockchain Game Development With Addition of Bitcoin to Financial Strategy Japanese game developer Enish Co. has

Read more

Big News: Coinbase Files for XRP Futures, Spot ETF Approval Soon?

The post Big News: Coinbase Files for XRP Futures, Spot ETF Approval Soon? appeared first on Coinpedia Fintech News Coinbase Institutional has announced that Coinbase Derivatives has officially filed with the Commodity Futures Trading Commission (CFTC) to self-certify XRP futures. This move aims to offer a regulated, capital-efficient way for investors to gain exposure to XRP, one of the most liquid digital assets in the market. The XRP futures contracts are expected to go live on April 21, 2025, with more details on launch timelines and availability expected soon. While futures contracts are often associated with hedging or short-selling, this development carries broader implications, particularly for the approval of spot exchange-traded funds (ETFs) for XRP. The SEC’s approval of Bitcoin and Ethereum spot ETFs was largely influenced by the existence of regulated futures markets, and the introduction of XRP futures could pave the way for similar approval. XRP ETFs Attract Interest Several major XRP ETF filings, including those from Bitwise, 21Shares Core XRP Trust, Canary, ProShares, and Franklin Templeton , are adding to the excitement. They show increasing interest from institutional investors and a growing demand for regulated crypto investment options. We're excited to announce that Coinbase Derivatives has filed with the CFTC to self-certify $XRP futures – bringing a regulated, capital-efficient way to gain exposure to one of the most liquid digital assets. We anticipate the contract going live on April 21, 2025. Stay tuned… pic.twitter.com/nKUPjjnMKW — Coinbase Institutional (@CoinbaseInsto) April 3, 2025 Additionally, Grayscale’s recent filing to convert its large-cap fund into an ETF reflects a trend toward basket ETFs, which are expected to drive major investor inflows. .article-inside-link { margin-left: 0 !important; border: 1px solid #0052CC4D; border-left: 0; border-right: 0; padding: 10px 0; text-align: left; } .entry ul.article-inside-link li { font-size: 14px; line-height: 21px; font-weight: 600; list-style-type: none; margin-bottom: 0; display: inline-block; } .entry ul.article-inside-link li:last-child { display: none; } Also Read : Ripple News Today: 1 Billion XRP Unlocked Late – Here’s Why , Ripple Legal Battle Comes to an End The latest developments in the Ripple ecosystem come after the long-running legal battle between Ripple and the SEC ended . The XRP community had been waiting for legal clarity after four challenging years. CEO Brad Garlinghouse recently announced that the SEC has decided to drop its appeal in the case, but an official statement from the SEC is still awaited. .article_register_shortcode { padding: 18px 24px; border-radius: 8px; display: flex; align-items: center; margin: 6px 0 22px; border: 1px solid #0052CC4D; background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 82, 204, 0.1) 100%); } .article_register_shortcode .media-body h5 { color: #000000; font-weight: 600; font-size: 20px; line-height: 22px; text-align:left; } .article_register_shortcode .media-body h5 span { color: #0052CC; } .article_register_shortcode .media-body p { font-weight: 400; font-size: 14px; line-height: 22px; color: #171717B2; margin-top: 4px; text-align:left; } .article_register_shortcode .media-body{ padding-right: 14px; } .article_register_shortcode .media-button a { float: right; } .article_register_shortcode .primary-button img{ vertical-align: middle; width: 20px; margin: 0; display: inline-block; } @media (min-width: 581px) and (max-width: 991px) { .article_register_shortcode .media-body p { margin-bottom: 0; } } @media (max-width: 580px) { .article_register_shortcode { display: block; padding: 20px; } .article_register_shortcode img { max-width: 50px; } .article_register_shortcode .media-body h5 { font-size: 16px; } .article_register_shortcode .media-body { margin-left: 0px; } .article_register_shortcode .media-body p { font-size: 13px; line-height: 20px; margin-top: 6px; margin-bottom: 14px; } .article_register_shortcode .media-button a { float: unset; } .article_register_shortcode .secondary-button { margin-bottom: 0; } } Never Miss a Beat in the Crypto World! Stay ahead with breaking news, expert analysis, and real-time updates on the latest trends in Bitcoin, altcoins, DeFi, NFTs, and more. .subscription-options li { display: none; } .research-report-subscribe{ background-color: #0052CC; padding: 12px 20px; border-radius: 8px; color: #fff; font-weight: 500; font-size: 14px; width: 96%; } .research-report-subscribe img{ vertical-align: sub; margin-right: 2px; } Subscribe to News var templateIds = "6"; var listOfSubscribed = []; function subscribed_popupmodal(template_id) { var templateId = '6'; getAllSubscriberCategoryList([templateId]); var subcribemodal = window.parent.document.getElementById('subscribe-modal-design'); if (subcribemodal) { var modalContent = ` Never Miss a Beat in the Crypto World! Stay informed and gain the edge you need to navigate the crypto world. Select your subscription now Daily Get real-time crypto news, market insights, and blockchain updates. Weekly Stay updated with major trends, funding news, and price analysis. Monthly Receive a detailed report with market analysis and expert predictions. Subscribe Now `; subcribemodal.innerHTML = modalContent; } subscribe_unsubscribe_status(template_id); //getAllSubscriberCategoryList(template_id); } function toggleSubscription(subscription, template_id) { var subscriptionCheckbox = document.getElementById(subscription + '_' + template_id); var li = document.getElementById(subscription + 'Selected_' + template_id); if (subscriptionCheckbox.checked) { li.classList.add('active'); } else { li.classList.remove('active'); } } function getAllSubscriberCategoryList(getcategoryId) { jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'GET', data: { action: 'subscribe_api_ajax_request', apiurl: '/app/email_newsletter/list', }, success: function(response) { var result = JSON.parse(response.message); if (result.status === true) { var idstosubscribed = [] // Populate listOfSubscribed with subscribed category IDs result.message.forEach(listofcategory => { if (listofcategory.subscribe_status === 1) { if (!listOfSubscribed.includes(listofcategory._id)) { listOfSubscribed.push(listofcategory._id); } if (!idstosubscribed.includes(listofcategory.news_cp_category_row_id)) { idstosubscribed.push(listofcategory.news_cp_category_row_id); } } }); idstosubscribed.forEach(id => { var subscribeButton = document.getElementById('subscribe_' + id); var unsubscribeButton = document.getElementById('unsubscribe_' + id); if (subscribeButton && unsubscribeButton) { subscribeButton.style.display = 'none'; unsubscribeButton.style.display = 'block'; var showDownloadReport = document.getElementById('download_report'); if (showDownloadReport) { showDownloadReport.style.display = 'block'; } } }); } }, error: function(xhr, status, error) { console.error('Error:', error); } }); } function subscribe_unsubscribe_status(getcategoryId) { var elementTounsubscribe = parent.document.getElementById('unsubscribe_' + getcategoryId); var elementTosubscribe = parent.document.getElementById('subscribe_' + getcategoryId); jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: { action: 'subscribe_api_ajax_request', apiurl: '/app/email_newsletter/list?category_row_id=' + getcategoryId, }, success: function(response) { var result = JSON.parse(response.message); if (result.status === true) { parent.jQuery('.skeliton-loader-block').hide(); var hasSubscribeStatusOne = false; result.message.forEach(subscribeStatus => { if (listOfSubscribed.includes(subscribeStatus._id) && subscribeStatus.subscribe_status === 1) { hasSubscribeStatusOne = true; } if (subscribeStatus.notification_type === 3) { parent.document.getElementById('monthlySelected_' + getcategoryId).style.display = 'block'; parent.document.getElementById('monthly_' + getcategoryId).setAttribute('data-id', subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById('monthly_' + getcategoryId).checked = true; } } else if (subscribeStatus.notification_type === 2) { parent.document.getElementById('weeklySelected_' + getcategoryId).style.display = 'block'; parent.document.getElementById('weekly_' + getcategoryId).setAttribute('data-id', subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById('weekly_' + getcategoryId).checked = true; } } else if (subscribeStatus.notification_type === 1) { parent.document.getElementById('dailySelected_' + getcategoryId).style.display = 'block'; parent.document.getElementById('daily_' + getcategoryId).setAttribute('data-id', subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById('daily_' + getcategoryId).checked = true; } } if (subscribeStatus.subscribe_status === 1) { listOfSubscribed.push(subscribeStatus._id); } }); if (hasSubscribeStatusOne) { elementTosubscribe.style.display = 'none'; elementTounsubscribe.style.display = 'block'; } else { elementTosubscribe.style.display = 'block'; elementTounsubscribe.style.display = 'none'; } } }, error: function(xhr, status, error) { console.error('Error:', error); } }); } function logSelectedSubscriptions(categoryid) { var unsubscribemodal = document.querySelector('.unsubscribed-popup-modal .modal'); var subscribedmodal = document.querySelector('.subscribed-popup-modal .modal'); unsubscribemodal.innerHTML=''; subscribedmodal.innerHTML=''; var selectedSubscriptions = []; var storeCheckedId = []; var checkboxes = document.querySelectorAll('#subscription-options-' + categoryid + ' input[type="checkbox"]'); var errorMessage = document.getElementById('error-message-select'); // Use a Set to handle unique data-ids var uniqueSubscribedIds = new Set(listOfSubscribed); checkboxes.forEach(function(checkbox) { var dataId = parseInt(checkbox.getAttribute('data-id')); if (checkbox.checked) { selectedSubscriptions.push(checkbox.id); storeCheckedId.push(dataId); } else { uniqueSubscribedIds.delete(dataId); // Remove unchecked data-id } }); // Update listOfSubscribed with unique values listOfSubscribed = Array.from(uniqueSubscribedIds); var selectedSubscriptionsString = selectedSubscriptions.join(', '); var concatinateSubscribeId = [...new Set(storeCheckedId.concat(listOfSubscribed))]; var categoryData = { 'subscribed_categories': concatinateSubscribeId }; var requestSubscriberData = { action: 'handle_dynamic_api_request_with_headers', security: '306e119b27', endpoint: '/app/email_newsletter/update_categories', token: '', data: categoryData }; jQuery.ajax({ url: 'https://coinpedia.org/wp-admin/admin-ajax.php', type: 'POST', data: requestSubscriberData, beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); }, success: function(response) { try { response = response.data; if (storeCheckedId.length === 0) { var unsubcribedPopUpmodal = ` You’ve Unsubscribed Successfully We're sorry to see you go! Your subscription has been canceled. If you change your mind, you can re-subscribe anytime. Thank you for being part of our community! `; unsubscribemodal.innerHTML = unsubcribedPopUpmodal; document.querySelector('#subscribe-modal-design .modal').style.display = 'none'; unsubscribemodal.style.display = 'block'; unsubscribemodal.classList.remove('hide'); unsubscribemodal.classList.add('show'); document.getElementById('subscribe_' + categoryid).style.display = 'block'; document.getElementById('unsubscribe_' + categoryid).style.display = 'none'; var showDownloadReport = document.getElementById('download_report'); if (showDownloadReport) { showDownloadReport.style.display = 'none'; } } else { var subscribedPopupModal = ` Thank you for subscribing! Thank you for subscribing to our crypto and blockchain newsletter! You’ll now receive the latest news, insights, and updates straight to your inbox. Welcome to our community! `; let selectedSubscriptionsArray = selectedSubscriptionsString.split(','); let subscribedCategories = selectedSubscriptionsArray.map(subscription => subscription.split('_')[0]); let subscribedCategoriesString = subscribedCategories.join(', '); subscribedmodal.innerHTML = subscribedPopupModal; if (document.getElementById('selectidname')) { document.getElementById('selectidname').textContent = subscribedCategoriesString; } document.querySelector('#subscribe-modal-design .modal').style.display = 'none'; subscribedmodal.style.display = 'block'; subscribedmodal.classList.remove('hide'); subscribedmodal.classList.add('show'); document.getElementById('subscribe_' + categoryid).style.display = 'none'; document.getElementById('unsubscribe_' + categoryid).style.display = 'block'; var showDownloadReport = document.getElementById('download_report'); if (showDownloadReport) { showDownloadReport.style.display = 'block'; } } } catch (e) { console.error('Error parsing response:', e); } }, }); } function closeModal(template_id) { var modalId = template_id; var modal = document.querySelector('#' + modalId); // Using querySelector to find the modal if (modal) { modal.classList.add('hide'); modal.classList.remove('show'); setTimeout(function() { modal.style.display = 'none'; }, 500); } else { console.warn('Modal not found:', modalId); } } function closeunsubscribemodal() { var unsubscribemodal = document.querySelector('.unsubscribed-popup-modal .modal'); if (unsubscribemodal) { unsubscribemodal.classList.add('hide'); unsubscribemodal.classList.remove('show'); } setTimeout(function() { unsubscribemodal.style.display = 'none'; }, 500); } function closesubscribemodal() { var subscribedmodal = document.querySelector('.subscribed-popup-modal .modal'); setTimeout(function() { subscribedmodal.style.display = 'none'; }, 500); if (subscribedmodal) { subscribedmodal.classList.add('hide'); subscribedmodal.classList.remove('show'); } } function withoutLoginClicked(withoutlogin_id) { localStorage.setItem('subscribe_without_Login', 'true'); localStorage.setItem('subscribe_clicked_id', withoutlogin_id); } document.addEventListener('DOMContentLoaded', function() { const subscribewithoutData = localStorage.getItem('subscribe_without_Login'); const subscribe_clicked_cat_id = localStorage.getItem('subscribe_clicked_id'); // Function to get cookies function getCookie(name) { let value = "; " + document.cookie; let parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } // Get user token from cookies const userToken = getCookie('user_token'); if (subscribewithoutData === 'true' && userToken) { // Call the modal function with the category ID subscribed_popupmodal(subscribe_clicked_cat_id); // Remove the flag and category ID from localStorage localStorage.removeItem('subscribe_without_Login'); localStorage.removeItem('subscribe_clicked_id'); } }); /************************** update susbcriber content **************************** */ function initializeSubscriptionButton() { var initialListItems = document.querySelectorAll('.subscription-options input[type="checkbox"]'); initialListItems.forEach(function(item) { console.log(item.checked, 'Initial Checkbox checked status'); }); var listItems = document.querySelectorAll('.subscription-options li'); if (listItems.length === 0) return; var anyActive = false; listItems.forEach(function(item) { var checkbox = item.querySelector('input[type="checkbox"]'); if (checkbox) { if (checkbox.checked) { item.classList.add('active'); anyActive = true; // Set anyActive to true } else { item.classList.remove('active'); // Remove 'active' class if checkbox is unchecked } } }); } function updateButtonText(anyActive) { var subscribeButtonSpan = document.querySelector('.subscribe-submit .changeBtnText'); if (subscribeButtonSpan) { if (anyActive) { subscribeButtonSpan.textContent = 'Subscribe Now'; } else { subscribeButtonSpan.textContent = 'Unsubscribe'; } } } function updateSubscriptionButton() { var listItems = document.querySelectorAll('.subscription-options li'); if (listItems.length === 0) return; var anyActive = false; listItems.forEach(function(item) { var checkbox = item.querySelector('input[type="checkbox"]'); if (checkbox) { if (checkbox.checked) { item.classList.add('active'); anyActive = true; // Set anyActive to true } else { item.classList.remove('active'); // Remove 'active' class if checkbox is unchecked } } }); // Update the button text based on whether any list item has the 'active' class updateButtonText(anyActive); } document.addEventListener('click', function(event) { var clickedItem = event.target.closest('.subscription-options li'); if (clickedItem) { var checkbox = clickedItem.querySelector('input[type="checkbox"]'); if (checkbox) { checkbox.checked = !checkbox.checked; updateSubscriptionButton(); } } });

Read more