<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");
This Pen doesn't use any external CSS resources.