Simplify financial decision-making

Machinary offers a modular and customizable solution that provides advanced financial news and statistical analysis. Our platform goes beyond traditional quantitative analysis, offering users a comprehensive understanding of real-time market dynamics, event detection, and risk analysis.

 

Know the Market. Stay Ahead.

Market Insights & Analytics.

Gain access to a comprehensive retail platform with real-time updates on the stock market and critical financial metrics. Leverage advanced tools for better decision-making:

  • Overview of stock market data:Stay updated with the latest market trends and performance.
  • Monitor AI-based predictions:Access detailed company analytics.
  • Sentiment Analysis:Understand market emotions with AI-driven sentiment insights.
  • Relevance Score:Prioritize information that matters most.
  • Chatbot Integration:Get instant answers and insights through smart AI.
  • Customizable Widgets:Add or remove widgets to tailor your dashboard.
Sign up for early access

Stay Informed. Act Strategically.

Real-Time News Portal.

Unlock actionable insights with categorized, real-time news updates tailored to your needs. Stay ahead in the market with a reliable flow of information:

  • People:Explore updates about key influencers and market leaders.
  • Public Companies:Stay informed on listed corporations and their market activities.
  • Non-Public Companies:Gain insights into the operations of private enterprises.
  • Countries:Understand regional economic shifts and geopolitical trends.
  • Commodities:Monitor pricing and trends for critical commodities like oil, gold, and more.
  • Currencies:Keep track of currency fluctuations and forex market developments.
Sign up for early access

Modular Power. Limitless Potential.

Machinary empowered by MachinaCore

MachinaCore is a highly modular and scalable system that allows users to build custom widgets and tools tailored to their specific financial data needs, while seamlessly integrating with other MachinaLabs products, like Machinary, MachinaAI Modules and MachinaTrader.

Reaching new heights together.

Stay tuned for what’s coming next.

Exciting innovations are on the horizon! Stay tuned as we unveil new advancements designed to empower smarter decisions and greater success in the fast-paced world of finance.

Sign up for early access

Explore tailored enterprise solutions - that make an impact.

Exciting innovations are on the horizon! Stay tuned as we unveil new advancements designed to empower smarter decisions and greater success in the fast-paced world of finance.

Get in touch

Machinary offers a groundbreaking, modular, and customizable solution that provides advanced financial news and statistical analysis. Our platform goes beyond traditional quantitative analysis, offering users a comprehensive understanding of real-time market dynamics, event detection, and risk analysis.

Address

Newsletter

© 2025 by Machinary.com - Version: 1.0.0.0. All rights reserved

Layout

Color mode

Predefined Themes

Layout settings

Choose the font family that fits your app.

Choose the gray shade for your app.

Choose the border radius factor for your app.

  1. Home
  2. Docs
  3. Knowledge Base
  4. Main Dashboard
  5. Widget Example JavaScript

Widget Example JavaScript

This guide will walk you through the process of creating a custom dashboard widget in MachinaTrader using JavaScript ES5 client-side code to integrate external data from APIs. In this example, we’ll create a cryptocurrency price tracker widget using data from the Coingecko API.

Prerequisites:

  • Basic knowledge of HTML, CSS, and JavaScript.
  • Access to a MachinaTrader account.

Step 1: Create a New Dashboard Widget

1. Log in to your MachinaTrader account.

2. In the MachinaTrader interface, navigate to the “Dashboards” section.

3. Create a new dashboard widget or select an existing one where you want to add your custom widget.

Step 3: Configure the HTML Element

1. In the configuration panel, provide a name and description for your element (e.g., “Crypto Price Tracker”).

2. In the “Content” section, paste the following code from the example below:

<style>
  #crypto-widget {
    border: 1px solid #ccc;
    padding: 20px;
    background-color: #f7f7f7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
  }

  #crypto-widget h2 {
    font-size: 1.5rem;
    color: #333;
  }

  #crypto-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
  }

  #crypto-list li {
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  }

  #crypto-list li:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #fff;
  }

  #crypto-list span {
    font-weight: bold;
    margin-right: 10px;
    color: #333;
  }

  #crypto-list span.price {
    color: #007bff;
  }
</style>
<div id="crypto-widget">
  <h2>Crypto Price Tracker</h2>
  <ul id="crypto-list"></ul>
</div>
<script>
  // Function to fetch and display cryptocurrency prices
  function fetchAndDisplayCryptoPrices() {
    var cryptoList = document.getElementById('crypto-list');

    // Array of cryptocurrency symbols to track
    var cryptoSymbols = ['bitcoin', 'ethereum', 'litecoin', 'ripple'];

    // Make an AJAX request to the CoinGecko API
    var xhr = new XMLHttpRequest();
    xhr.onreadystatechange = function() {
      if (xhr.readyState === 4 && xhr.status === 200) {
        var cryptoData = JSON.parse(xhr.responseText);

        // Loop through the cryptocurrency data and display prices
        cryptoSymbols.forEach(function(symbol) {
          var listItem = document.createElement('li');
          var cryptoInfo = document.createElement('span');
          cryptoInfo.textContent = symbol.toUpperCase() + ': ';
          var priceSpan = document.createElement('span');
          priceSpan.textContent = '$' + cryptoData[symbol].usd;
          priceSpan.classList.add('price');
          cryptoInfo.appendChild(priceSpan);
          listItem.appendChild(cryptoInfo);
          cryptoList.appendChild(listItem);
        });
      }
    };
    xhr.open('GET', 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,litecoin,ripple&vs_currencies=usd', true);
    xhr.send();
  }

  // Add an event listener for when the DOM is ready
  document.addEventListener('DOMContentLoaded', function() {
    fetchAndDisplayCryptoPrices();
  });
</script>

4. Replace the CSS and JavaScript code in the provided template with your custom code as needed. Ensure that your JavaScript code fetches and displays the external data you want to integrate.

Step 4: Save and Preview

1. Save the configuration of the dashboard widget.

2. Reload the Dashboard to view your custom widget within the MachinaTrader dashboard. Ensure that it displays the external data correctly.

Step 5: Publish

1. Once you are satisfied with your custom widget and it displays the external data as expected, save the changes to your dashboard.

2. Optionally, you can share the dashboard with other MachinaTrader users by publishing it.

How can we help?