<div id="response"></div>
body {
background-color: #000;
}
// Set the auth token
var token = "demo-token";
// Set the chart inputs
var chartInputs = {
"symbol": "AAPL",
"exchange": "NSQ",
"realTime": false,
"cultureCode": "en-US",
"fontColor": "#999999",
"fontSize": 12,
"upperPanelHeight": 300,
"lowerPanelHeight": 75,
"numDays": 365,
"priceLineColor": "#ffa500",
"priceLineWidth": 3,
"showVolume": true,
"volumeColor": "#ffa500",
"width": 600,
"xGridLineColor": "#333333",
"xGridLineWidth": 1,
"yGridLineColor": "#333333",
"yGridLineWidth": 1
};
// 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/price?inputs=" + encoded + "&access_token=" + token;
// Append to our target
$("<img />").attr("src", url).appendTo("#response");
This Pen doesn't use any external CSS resources.