<div id="response"></div>
// Set the auth token
var token = "demo-token";

// Set the chart inputs
var chartInputs = {
  "symbol": "AAPL",
  "exchange": "NSQ"
};

// Stringify & Encode Inputs
var encoded = encodeURIComponent(JSON.stringify(chartInputs, null));

// Create API call
var url = "https://api.markitondemand.com/apiman-gateway/MOD/chartworks-image/1.0/Chart/sparkLine?inputs=" + encoded + "&access_token=" + token;

// Append to our target
$("<img />").attr("src", url).appendTo("#response");

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js