A market depth chart built from the live ETH/BTC order book on Binance and reloaded every 30 seconds: buy orders in green, sell orders in red.
Each line is a running total: the green one adds up buy orders from the best bid outward, the red one sell orders from the best ask outward. Steep walls are large orders that could hold the price back, the gap in the middle is the spread, and the faint columns show the volume at each single price.
Built with amCharts 5, a JavaScript library. The JavaScript includes your theme and renderer (canvas or SVG); the JSON also follows the changes you make with the controls.
npm install @amcharts/amcharts5. See Getting started.
The same chart as a JSON config. Chart Maker reads and writes this format, the library's JSON parser turns it into a chart, and the <am5-chart> element puts it on a page with no code."type" is the class to create and "settings" what you would pass to its new() in code; "properties" fill in its parts, lists such as series and axes or templates such as columns.template; "refs" holds objects used in more than one place ("#series-0" stands for the one named series-0); a string starting with "@" takes a value from another object, such as "@series.get('fill')".
A complete page. Save it as an .html file and open it in a browser.
Paste this into an AI coding assistant to build the chart from scratch. More in amCharts & AI.
// Create root element
// https://www.amcharts.com/docs/v5/getting-started/#Root_element
var root = am5.Root.new("chartdiv");
// Set themes
// https://www.amcharts.com/docs/v5/concepts/themes/
root.setThemes([
am5themes_Animated.new(root),
am5themes_Responsive.new(root)
]);
// Create chart
// https://www.amcharts.com/docs/v5/charts/xy-chart/
var chart = root.container.children.push(
am5xy.XYChart.new(root, {
focusable: true, // the chart can be reached with the Tab key
panX: false, // no dragging to pan, sideways...
panY: false, // ...or up and down...
wheelX: "none", // ...and the mouse wheel...
wheelY: "none" // ...does nothing: the whole order book stays in view
})
);
// Add scrollbar, hidden at first
// https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/
chart.set("scrollbarX", am5.Scrollbar.new(root, { orientation: "horizontal", forceHidden: true }));
// Create axes
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
var xAxis = chart.xAxes.push(am5xy.CategoryAxis.new(root, {
categoryField: "value",
renderer: am5xy.AxisRendererX.new(root, {
minGridDistance: 70 // at least 70px between labels; on narrow screens some are skipped
}),
tooltip: am5.Tooltip.new(root, {}) // a price label follows the cursor along the axis
}));
// Prices come in as text: show them as numbers with five decimals
xAxis.get("renderer").labels.template.adapters.add("text", function(text, target) {
if (target.dataItem) {
return root.numberFormatter.format(Number(target.dataItem.get("category")), "#.00000");
}
return text;
});
// Axis title
xAxis.children.push(am5.Label.new(root, {
text: "Price (BTC per ETH)",
x: am5.p50, // in the middle of the axis...
centerX: am5.p50 // ...anchored by its center
}));
var yAxis = chart.yAxes.push(
am5xy.ValueAxis.new(root, {
maxDeviation: 0.1,
renderer: am5xy.AxisRendererY.new(root, {})
})
);
// Axis title
// unshift makes the title the axis's first child, so it sits left of the labels
yAxis.children.unshift(am5.Label.new(root, {
text: "Volume (ETH)",
rotation: -90, // reads bottom to top
y: am5.p50, // halfway up the axis...
centerX: am5.p50 // ...centered on that point (the label is turned)
}));
// Add series
// https://www.amcharts.com/docs/v5/charts/xy-chart/series/
var bidsTotalVolume = chart.series.push(am5xy.StepLineSeries.new(root, {
minBulletDistance: 10,
xAxis: xAxis,
yAxis: yAxis,
valueYField: "bidstotalvolume",
categoryXField: "value",
stroke: root.interfaceColors.get("positive"), // the theme's color for positive values, green by default
fill: root.interfaceColors.get("positive"), // the area below the steps in the same color
tooltip: am5.Tooltip.new(root, {
pointerOrientation: "horizontal", // the tooltip sits beside the cursor point, not above it
// [width: 120px] gives each caption the same width, so the values line up
labelText: "[width: 120px]Bid:[/][bold]{categoryX}[/]\n[width: 120px]Total volume:[/][bold]{valueY}[/]\n[width: 120px]Volume:[/][bold]{bidsvolume}[/]"
})
}));
bidsTotalVolume.strokes.template.set("strokeWidth", 2) // a 2px line
bidsTotalVolume.fills.template.setAll({
visible: true, // fill the area under the steps...
fillOpacity: 0.2 // ...faintly
});
var asksTotalVolume = chart.series.push(am5xy.StepLineSeries.new(root, {
minBulletDistance: 10,
xAxis: xAxis,
yAxis: yAxis,
valueYField: "askstotalvolume",
categoryXField: "value",
stroke: root.interfaceColors.get("negative"), // the theme's color for negative values, red by default
fill: root.interfaceColors.get("negative"), // the area below the steps in the same color
tooltip: am5.Tooltip.new(root, {
pointerOrientation: "horizontal", // the tooltip sits beside the cursor point, not above it
labelText: "[width: 120px]Ask:[/][bold]{categoryX}[/]\n[width: 120px]Total volume:[/][bold]{valueY}[/]\n[width: 120px]Volume:[/][bold]{asksvolume}[/]"
})
}));
asksTotalVolume.strokes.template.set("strokeWidth", 2) // a 2px line
asksTotalVolume.fills.template.setAll({
visible: true, // fill the area under the steps...
fillOpacity: 0.2 // ...faintly
});
// Volume at each price. The fill is the theme's contrast color (black, or white in
// dark mode), faded, so the columns show on any background.
var bidVolume = chart.series.push(am5xy.ColumnSeries.new(root, {
minBulletDistance: 10,
xAxis: xAxis,
yAxis: yAxis,
valueYField: "bidsvolume",
categoryXField: "value",
fill: root.interfaceColors.get("alternativeBackground")
}));
bidVolume.columns.template.set("fillOpacity", 0.2);
var asksVolume = chart.series.push(am5xy.ColumnSeries.new(root, {
minBulletDistance: 10,
xAxis: xAxis,
yAxis: yAxis,
valueYField: "asksvolume",
categoryXField: "value",
fill: root.interfaceColors.get("alternativeBackground")
}));
asksVolume.columns.template.set("fillOpacity", 0.2);
// Add cursor
// https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/
var cursor = chart.set("cursor", am5xy.XYCursor.new(root, {
xAxis: xAxis // the cursor snaps to the prices on this axis
}));
cursor.lineY.set("visible", false); // only the vertical cursor line, no horizontal one
// Data loader
function loadData() {
// the top 50 bids and asks for ETH/BTC from Binance's public API
am5.net.load("https://data-api.binance.vision/api/v3/depth?symbol=ETHBTC&limit=50").then(function(result) {
var data = am5.JSONParser.parse(result.response); // turn the response text into an object
parseData(data);
}).catch(function() {
// Failed to load
// Using drop-in data
parseData({
"asks" : [ [ "0.07070", 1.0 ], [ "0.07071", 1.654 ], [ "0.07076", 0.61 ], [ "0.07077", 1.2 ], [ "0.07093", 0.584 ], [ "0.07095", 0.005 ], [ "0.07098", 0.01 ], [ "0.07100", 0.653 ], [ "0.07105", 6.0 ], [ "0.07107", 0.002 ], [ "0.07110", 0.022 ], [ "0.07113", 0.001 ], [ "0.07115", 0.001 ], [ "0.07117", 0.001 ], [ "0.07119", 0.001 ], [ "0.07123", 0.001 ], [ "0.07124", 0.002 ], [ "0.07125", 0.001 ], [ "0.07127", 0.001 ], [ "0.07129", 0.001 ], [ "0.07130", 0.001 ], [ "0.07131", 0.001 ], [ "0.07133", 0.001 ], [ "0.07135", 0.002 ], [ "0.07137", 0.001 ], [ "0.07139", 0.001 ], [ "0.07141", 0.001 ], [ "0.07143", 0.001 ], [ "0.07145", 0.001 ], [ "0.07147", 0.004 ], [ "0.07148", 6.311 ], [ "0.07149", 0.001 ], [ "0.07150", 10.03 ], [ "0.07151", 0.001 ], [ "0.07153", 0.001 ], [ "0.07155", 0.001 ], [ "0.07157", 0.001 ], [ "0.07159", 0.001 ], [ "0.07161", 0.001 ], [ "0.07162", 0.238 ], [ "0.07163", 0.001 ], [ "0.07164", 0.584 ], [ "0.07165", 0.541 ], [ "0.07167", 0.001 ], [ "0.07169", 0.001 ], [ "0.07171", 0.001 ], [ "0.07173", 0.001 ], [ "0.07175", 0.017 ], [ "0.07177", 0.001 ], [ "0.07179", 0.001 ] ],
"bids" : [ [ "0.07060", 1.001 ], [ "0.07059", 1.544 ], [ "0.07056", 0.61 ], [ "0.07053", 0.002 ], [ "0.07048", 1.2 ], [ "0.07040", 0.05 ], [ "0.07031", 0.663 ], [ "0.07024", 0.005 ], [ "0.07020", 5.99 ], [ "0.07010", 0.022 ], [ "0.07006", 0.001 ], [ "0.07005", 0.003 ], [ "0.07000", 1.0 ], [ "0.06993", 0.002 ], [ "0.06990", 6.15 ], [ "0.06989", 0.519 ], [ "0.06986", 0.001 ], [ "0.06983", 0.024 ], [ "0.06980", 0.031 ], [ "0.06978", 0.01 ], [ "0.06977", 0.81 ], [ "0.06975", 0.053 ], [ "0.06970", 0.022 ], [ "0.06967", 0.531 ], [ "0.06962", 0.017 ], [ "0.06955", 0.004 ], [ "0.06953", 0.002 ], [ "0.06951", 0.031 ], [ "0.06950", 10.0 ], [ "0.06933", 0.301 ], [ "0.06932", 0.606 ], [ "0.06931", 0.022 ], [ "0.06929", 0.015 ], [ "0.06924", 2.48 ], [ "0.06923", 0.5 ], [ "0.06922", 0.2 ], [ "0.06921", 0.5 ], [ "0.06918", 0.03 ], [ "0.06915", 0.001 ], [ "0.06912", 0.069 ], [ "0.06911", 0.002 ], [ "0.06905", 0.003 ], [ "0.06900", 20.39 ], [ "0.06899", 0.002 ], [ "0.06897", 0.242 ], [ "0.06886", 0.808 ], [ "0.06880", 0.026 ], [ "0.06872", 1.0 ], [ "0.06868", 0.005 ], [ "0.06862", 0.584 ] ],
"isFrozen" : "0",
"postOnly" : "0",
"seq" : 67767369
})
});
}
// one data row per price, from both bids and asks, for the axis and all four series
function parseData(data) {
// The chart may have been removed while the data was on its way
if (root.isDisposed()) {
return;
}
var res = [];
processData(data.bids, "bids", true, res); // bids first, in rising price order...
processData(data.asks, "asks", false, res); // ...then the asks above them
xAxis.data.setAll(res); // one category per price
bidsTotalVolume.data.setAll(res);
asksTotalVolume.data.setAll(res);
bidVolume.data.setAll(res);
asksVolume.data.setAll(res);
}
loadData();
// Load fresh data every 30 seconds
setInterval(loadData, 30000);
// Function to process (sort and calculate cumulative volume)
function processData(list, type, desc, res) {
// Convert to data points
for(var i = 0; i < list.length; i++) {
list[i] = {
value: Number(list[i][0]),
volume: Number(list[i][1]),
}
}
// Sort list just in case
list.sort(function(a, b) {
if (a.value > b.value) {
return 1;
}
else if (a.value < b.value) {
return -1;
}
else {
return 0;
}
});
// Calculate cumulative volume
if (desc) {
// bids add up from the highest price down, each one put in front of the last
for(var i = list.length - 1; i >= 0; i--) {
if (i < (list.length - 1)) {
list[i].totalvolume = list[i+1].totalvolume + list[i].volume;
}
else {
list[i].totalvolume = list[i].volume;
}
var dp = {};
dp["value"] = list[i].value;
dp[type + "volume"] = list[i].volume;
dp[type + "totalvolume"] = list[i].totalvolume;
res.unshift(dp);
}
}
else {
// asks add up from the lowest price up, each one put after the last
for(var i = 0; i < list.length; i++) {
if (i > 0) {
list[i].totalvolume = list[i-1].totalvolume + list[i].volume;
}
else {
list[i].totalvolume = list[i].volume;
}
var dp = {};
dp["value"] = list[i].value;
dp[type + "volume"] = list[i].volume;
dp[type + "totalvolume"] = list[i].totalvolume;
res.push(dp);
}
}
}
{
"type": "XYChart",
"settings": {
"focusable": true,
"panX": false,
"panY": false,
"wheelX": "none",
"wheelY": "none",
"scrollbarX": {
"type": "Scrollbar",
"settings": {
"orientation": "horizontal",
"forceHidden": true
}
},
"cursor": {
"type": "XYCursor",
"settings": {
"xAxis": "#axis-0"
},
"properties": {
"lineY": {
"settings": {
"visible": false
}
}
}
}
},
"properties": {
"series": [
"#series-0",
"#series-1",
"#series-2",
"#series-3"
],
"xAxes": [
"#axis-0"
],
"yAxes": [
"#axis-1"
]
},
"refs": [
{
"data-0": [
{
"value": 0.03051,
"bidsvolume": 0.6312,
"bidstotalvolume": 1748.8587000000002
},
{
"value": 0.03052,
"bidsvolume": 1.2354,
"bidstotalvolume": 1748.2275000000002
},
{
"value": 0.03053,
"bidsvolume": 1.2459,
"bidstotalvolume": 1746.9921000000002
},
{
"value": 0.03054,
"bidsvolume": 0.9264,
"bidstotalvolume": 1745.7462000000003
},
{
"value": 0.03055,
"bidsvolume": 1.1956,
"bidstotalvolume": 1744.8198000000002
},
{
"value": 0.03056,
"bidsvolume": 5.8117,
"bidstotalvolume": 1743.6242000000002
},
{
"value": 0.03057,
"bidsvolume": 0.8545,
"bidstotalvolume": 1737.8125000000002
},
{
"value": 0.03058,
"bidsvolume": 2.7808,
"bidstotalvolume": 1736.9580000000003
},
{
"value": 0.03059,
"bidsvolume": 0.9349,
"bidstotalvolume": 1734.1772000000003
},
{
"value": 0.0306,
"bidsvolume": 23.4923,
"bidstotalvolume": 1733.2423000000003
},
{
"value": 0.03061,
"bidsvolume": 3.5567,
"bidstotalvolume": 1709.7500000000002
},
{
"value": 0.03062,
"bidsvolume": 5.5395,
"bidstotalvolume": 1706.1933000000001
},
{
"value": 0.03063,
"bidsvolume": 6.1194,
"bidstotalvolume": 1700.6538
},
{
"value": 0.03064,
"bidsvolume": 17.3573,
"bidstotalvolume": 1694.5344
},
{
"value": 0.03065,
"bidsvolume": 1.5995,
"bidstotalvolume": 1677.1771
},
{
"value": 0.03066,
"bidsvolume": 1.7473,
"bidstotalvolume": 1675.5776
},
{
"value": 0.03067,
"bidsvolume": 0.6581,
"bidstotalvolume": 1673.8303
},
{
"value": 0.03068,
"bidsvolume": 3.5882,
"bidstotalvolume": 1673.1722
},
{
"value": 0.03069,
"bidsvolume": 1.8025,
"bidstotalvolume": 1669.584
},
{
"value": 0.0307,
"bidsvolume": 6.8387,
"bidstotalvolume": 1667.7815
},
{
"value": 0.03071,
"bidsvolume": 1.4879,
"bidstotalvolume": 1660.9428
},
{
"value": 0.03072,
"bidsvolume": 2.5449,
"bidstotalvolume": 1659.4549
},
{
"value": 0.03073,
"bidsvolume": 0.3915,
"bidstotalvolume": 1656.9099999999999
},
{
"value": 0.03074,
"bidsvolume": 2.8829,
"bidstotalvolume": 1656.5185
},
{
"value": 0.03075,
"bidsvolume": 3.0051,
"bidstotalvolume": 1653.6355999999998
},
{
"value": 0.03076,
"bidsvolume": 2.3196,
"bidstotalvolume": 1650.6304999999998
},
{
"value": 0.03077,
"bidsvolume": 5.1818,
"bidstotalvolume": 1648.3108999999997
},
{
"value": 0.03078,
"bidsvolume": 4.8939,
"bidstotalvolume": 1643.1290999999997
},
{
"value": 0.03079,
"bidsvolume": 3.8038,
"bidstotalvolume": 1638.2351999999996
},
{
"value": 0.0308,
"bidsvolume": 11.2913,
"bidstotalvolume": 1634.4313999999997
},
{
"value": 0.03081,
"bidsvolume": 7.11,
"bidstotalvolume": 1623.1400999999996
},
{
"value": 0.03082,
"bidsvolume": 6.0571,
"bidstotalvolume": 1616.0300999999997
},
{
"value": 0.03083,
"bidsvolume": 8.7704,
"bidstotalvolume": 1609.9729999999997
},
{
"value": 0.03084,
"bidsvolume": 29.84,
"bidstotalvolume": 1601.2025999999996
},
{
"value": 0.03085,
"bidsvolume": 7.9361,
"bidstotalvolume": 1571.3625999999997
},
{
"value": 0.03086,
"bidsvolume": 8.4077,
"bidstotalvolume": 1563.4264999999998
},
{
"value": 0.03087,
"bidsvolume": 5.9904,
"bidstotalvolume": 1555.0187999999998
},
{
"value": 0.03088,
"bidsvolume": 9.7906,
"bidstotalvolume": 1549.0284
},
{
"value": 0.03089,
"bidsvolume": 122.6232,
"bidstotalvolume": 1539.2377999999999
},
{
"value": 0.0309,
"bidsvolume": 126.8298,
"bidstotalvolume": 1416.6145999999999
},
{
"value": 0.03091,
"bidsvolume": 134.7627,
"bidstotalvolume": 1289.7848
},
{
"value": 0.03092,
"bidsvolume": 161.7223,
"bidstotalvolume": 1155.0221
},
{
"value": 0.03093,
"bidsvolume": 161.2365,
"bidstotalvolume": 993.2997999999999
},
{
"value": 0.03094,
"bidsvolume": 161.29,
"bidstotalvolume": 832.0632999999999
},
{
"value": 0.03095,
"bidsvolume": 135.2985,
"bidstotalvolume": 670.7733
},
{
"value": 0.03096,
"bidsvolume": 178.5866,
"bidstotalvolume": 535.4748
},
{
"value": 0.03097,
"bidsvolume": 86.7946,
"bidstotalvolume": 356.8882
},
{
"value": 0.03098,
"bidsvolume": 116.6244,
"bidstotalvolume": 270.0936
},
{
"value": 0.03099,
"bidsvolume": 135.9109,
"bidstotalvolume": 153.4692
},
{
"value": 0.031,
"bidsvolume": 17.5583,
"bidstotalvolume": 17.5583
},
{
"value": 0.03101,
"asksvolume": 54.2236,
"askstotalvolume": 54.2236
},
{
"value": 0.03102,
"asksvolume": 92.0982,
"askstotalvolume": 146.3218
},
{
"value": 0.03103,
"asksvolume": 53.4609,
"askstotalvolume": 199.7827
},
{
"value": 0.03104,
"asksvolume": 89.6309,
"askstotalvolume": 289.4136
},
{
"value": 0.03105,
"asksvolume": 128.9356,
"askstotalvolume": 418.3492
},
{
"value": 0.03106,
"asksvolume": 110.6916,
"askstotalvolume": 529.0408
},
{
"value": 0.03107,
"asksvolume": 89.4994,
"askstotalvolume": 618.5402
},
{
"value": 0.03108,
"asksvolume": 84.4383,
"askstotalvolume": 702.9785
},
{
"value": 0.03109,
"asksvolume": 86.9574,
"askstotalvolume": 789.9359000000001
},
{
"value": 0.0311,
"asksvolume": 96.868,
"askstotalvolume": 886.8039000000001
},
{
"value": 0.03111,
"asksvolume": 121.1352,
"askstotalvolume": 1007.9391
},
{
"value": 0.03112,
"asksvolume": 126.3807,
"askstotalvolume": 1134.3198
},
{
"value": 0.03113,
"asksvolume": 11.1497,
"askstotalvolume": 1145.4695
},
{
"value": 0.03114,
"asksvolume": 3.7084,
"askstotalvolume": 1149.1779
},
{
"value": 0.03115,
"asksvolume": 6.295,
"askstotalvolume": 1155.4729
},
{
"value": 0.03116,
"asksvolume": 1.9093,
"askstotalvolume": 1157.3822
},
{
"value": 0.03117,
"asksvolume": 4.2829,
"askstotalvolume": 1161.6651
},
{
"value": 0.03118,
"asksvolume": 1.9873,
"askstotalvolume": 1163.6524
},
{
"value": 0.03119,
"asksvolume": 4.6358,
"askstotalvolume": 1168.2882
},
{
"value": 0.0312,
"asksvolume": 49.9456,
"askstotalvolume": 1218.2338
},
{
"value": 0.03121,
"asksvolume": 1.3194,
"askstotalvolume": 1219.5532
},
{
"value": 0.03122,
"asksvolume": 2.9183,
"askstotalvolume": 1222.4715
},
{
"value": 0.03123,
"asksvolume": 1.138,
"askstotalvolume": 1223.6095
},
{
"value": 0.03124,
"asksvolume": 0.3751,
"askstotalvolume": 1223.9846
},
{
"value": 0.03125,
"asksvolume": 2.8954,
"askstotalvolume": 1226.88
},
{
"value": 0.03126,
"asksvolume": 6.1913,
"askstotalvolume": 1233.0713
},
{
"value": 0.03127,
"asksvolume": 2.2856,
"askstotalvolume": 1235.3569
},
{
"value": 0.03128,
"asksvolume": 0.8265,
"askstotalvolume": 1236.1834
},
{
"value": 0.03129,
"asksvolume": 7.2453,
"askstotalvolume": 1243.4287
},
{
"value": 0.0313,
"asksvolume": 218.1328,
"askstotalvolume": 1461.5615
},
{
"value": 0.03131,
"asksvolume": 5.4017,
"askstotalvolume": 1466.9632
},
{
"value": 0.03132,
"asksvolume": 2.1036,
"askstotalvolume": 1469.0667999999998
},
{
"value": 0.03133,
"asksvolume": 5.8717,
"askstotalvolume": 1474.9384999999997
},
{
"value": 0.03134,
"asksvolume": 0.4971,
"askstotalvolume": 1475.4355999999998
},
{
"value": 0.03135,
"asksvolume": 2.5512,
"askstotalvolume": 1477.9868
},
{
"value": 0.03136,
"asksvolume": 2.9088,
"askstotalvolume": 1480.8955999999998
},
{
"value": 0.03137,
"asksvolume": 0.5357,
"askstotalvolume": 1481.4312999999997
},
{
"value": 0.03138,
"asksvolume": 1.0526,
"askstotalvolume": 1482.4838999999997
},
{
"value": 0.03139,
"asksvolume": 4.5019,
"askstotalvolume": 1486.9857999999997
},
{
"value": 0.0314,
"asksvolume": 12.7401,
"askstotalvolume": 1499.7258999999997
},
{
"value": 0.03141,
"asksvolume": 1.5342,
"askstotalvolume": 1501.2600999999997
},
{
"value": 0.03142,
"asksvolume": 1.4774,
"askstotalvolume": 1502.7374999999997
},
{
"value": 0.03143,
"asksvolume": 2.0042,
"askstotalvolume": 1504.7416999999998
},
{
"value": 0.03144,
"asksvolume": 3.6201,
"askstotalvolume": 1508.3618
},
{
"value": 0.03145,
"asksvolume": 3.8391,
"askstotalvolume": 1512.2008999999998
},
{
"value": 0.03146,
"asksvolume": 0.4564,
"askstotalvolume": 1512.6572999999999
},
{
"value": 0.03147,
"asksvolume": 5.4524,
"askstotalvolume": 1518.1096999999997
},
{
"value": 0.03148,
"asksvolume": 19.6066,
"askstotalvolume": 1537.7162999999998
},
{
"value": 0.03149,
"asksvolume": 0.536,
"askstotalvolume": 1538.2522999999999
},
{
"value": 0.0315,
"asksvolume": 27.3515,
"askstotalvolume": 1565.6037999999999
}
]
},
{
"axis-0": {
"type": "CategoryAxis",
"settings": {
"categoryField": "value",
"renderer": {
"type": "AxisRendererX",
"settings": {
"minGridDistance": 70
}
},
"tooltip": {
"type": "Tooltip"
}
},
"properties": {
"data": "#data-0"
},
"children": [
{
"type": "Label",
"settings": {
"text": "Price (BTC per ETH)",
"x": {
"type": "Percent",
"value": 50
},
"centerX": {
"type": "Percent",
"value": 50
}
}
}
]
}
},
{
"axis-1": {
"type": "ValueAxis",
"settings": {
"maxDeviation": 0.1,
"renderer": {
"type": "AxisRendererY"
}
},
"children": [
{
"type": "Label",
"settings": {
"text": "Volume (ETH)",
"rotation": -90,
"y": {
"type": "Percent",
"value": 50
},
"centerX": {
"type": "Percent",
"value": 50
}
},
"index": 0
}
]
}
},
{
"series-0": {
"type": "StepLineSeries",
"settings": {
"minBulletDistance": 10,
"xAxis": "#axis-0",
"yAxis": "#axis-1",
"valueYField": "bidstotalvolume",
"categoryXField": "value",
"stroke": "@root.interfaceColors.get('positive')",
"fill": "@root.interfaceColors.get('positive')",
"tooltip": {
"type": "Tooltip",
"settings": {
"pointerOrientation": "horizontal",
"labelText": "[width: 120px]Bid:[/][bold]{categoryX}[/]\n[width: 120px]Total volume:[/][bold]{valueY}[/]\n[width: 120px]Volume:[/][bold]{bidsvolume}[/]"
}
}
},
"properties": {
"data": "#data-0",
"strokes": {
"properties": {
"template": {
"settings": {
"strokeWidth": 2
}
}
}
},
"fills": {
"properties": {
"template": {
"settings": {
"visible": true,
"fillOpacity": 0.2
}
}
}
}
}
}
},
{
"series-1": {
"type": "StepLineSeries",
"settings": {
"minBulletDistance": 10,
"xAxis": "#axis-0",
"yAxis": "#axis-1",
"valueYField": "askstotalvolume",
"categoryXField": "value",
"stroke": "@root.interfaceColors.get('negative')",
"fill": "@root.interfaceColors.get('negative')",
"tooltip": {
"type": "Tooltip",
"settings": {
"pointerOrientation": "horizontal",
"labelText": "[width: 120px]Ask:[/][bold]{categoryX}[/]\n[width: 120px]Total volume:[/][bold]{valueY}[/]\n[width: 120px]Volume:[/][bold]{asksvolume}[/]"
}
}
},
"properties": {
"data": "#data-0",
"strokes": {
"properties": {
"template": {
"settings": {
"strokeWidth": 2
}
}
}
},
"fills": {
"properties": {
"template": {
"settings": {
"visible": true,
"fillOpacity": 0.2
}
}
}
}
}
}
},
{
"series-2": {
"type": "ColumnSeries",
"settings": {
"minBulletDistance": 10,
"xAxis": "#axis-0",
"yAxis": "#axis-1",
"valueYField": "bidsvolume",
"categoryXField": "value",
"fill": "@root.interfaceColors.get('alternativeBackground')"
},
"properties": {
"data": "#data-0",
"columns": {
"properties": {
"template": {
"settings": {
"fillOpacity": 0.2
}
}
}
}
}
}
},
{
"series-3": {
"type": "ColumnSeries",
"settings": {
"minBulletDistance": 10,
"xAxis": "#axis-0",
"yAxis": "#axis-1",
"valueYField": "asksvolume",
"categoryXField": "value",
"fill": "@root.interfaceColors.get('alternativeBackground')"
},
"properties": {
"data": "#data-0",
"columns": {
"properties": {
"template": {
"settings": {
"fillOpacity": 0.2
}
}
}
}
}
}
}
]
}