---
title: "Dark Candlestick Chart API — Trading-terminal look | Imejis"
description: "Generate dark-mode candlestick chart images with the classic trading-terminal look — light axes on a dark canvas, fresh OHLC per API call. Try Imejis free."
url: "https://www.imejis.io/components/candlestick/dark"
---

# Dark Candlestick Chart API — Trading-terminal look | Imejis

Light candles on a dark canvas — the classic trading-terminal look.

## Use cases

- Crypto/trading social cards in dark mode
- Terminal-style dashboard exports
- Night-theme price alerts

## Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `candles` | `object[]` | `[]` | OHLC data — one { open, high, low, close } object per period. |
| `labels` | `string[]` | `[]` | Period labels along the x-axis (e.g. dates). |
| `upColor` | `color` | `"#16a34a"` | Body color of bullish candles (close ≥ open). |
| `downColor` | `color` | `"#dc2626"` | Body color of bearish candles (close < open). |
| `wickColor` | `color` | — | Wick (high-low line) color; defaults to the candle body color. |
| `showAxis` | `boolean` | `true` | Show the price and date axes. |
| `showGrid` | `boolean` | `true` | Show horizontal grid lines. |
| `valueFormat` | `'number' \| 'compact' \| 'percent' \| 'currency'` | `"number"` | Price format (1,200 / 1.2K / 12% / $1,200). |
| `currencySymbol` | `string` | `"$"` | Currency symbol used with the 'currency' format. |
| `textColor` | `color` | `"#52514e"` | Axis label color. |
| `gridColor` | `color` | `"#e6e6e3"` | Grid line color. |
| `opacity` | `number` | `1` | Overall component opacity from 0 (transparent) to 1 (opaque). |
| `borderWidth` | `number` | `0` | Border thickness in pixels around the component. |
| `borderColor` | `color` | `"transparent"` | Border color (any CSS color). |
| `borderStyle` | `'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'none'` | `"solid"` | Border line style. |
| `borderRadius` | `number` | `0` | Corner radius in pixels. |
| `boxShadow` | `string` | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |

## Design JSON (this variant)

```json
{
  "title": "Candlestick sample",
  "description": "A weekly OHLC price chart",
  "dimensions": {
    "width": 800,
    "height": 420
  },
  "background": {
    "color": "#0f172a"
  },
  "components": [
    {
      "id": "sample-candlestick",
      "key": "ohlc",
      "type": "candlestick",
      "position": {
        "x": 120,
        "y": 50
      },
      "rotation": 0,
      "size": {
        "width": 560,
        "height": 320
      },
      "dynamic": true,
      "properties": {
        "candles": [
          {
            "open": 100,
            "high": 112,
            "low": 97,
            "close": 109
          },
          {
            "open": 109,
            "high": 114,
            "low": 105,
            "close": 106
          },
          {
            "open": 106,
            "high": 108,
            "low": 98,
            "close": 101
          },
          {
            "open": 101,
            "high": 118,
            "low": 100,
            "close": 116
          },
          {
            "open": 116,
            "high": 122,
            "low": 113,
            "close": 120
          },
          {
            "open": 120,
            "high": 121,
            "low": 110,
            "close": 112
          },
          {
            "open": 112,
            "high": 119,
            "low": 111,
            "close": 118
          }
        ],
        "labels": [
          "Mon",
          "Tue",
          "Wed",
          "Thu",
          "Fri",
          "Sat",
          "Sun"
        ],
        "upColor": "#22c55e",
        "downColor": "#ef4444",
        "showAxis": true,
        "showGrid": true,
        "valueFormat": "currency",
        "currencySymbol": "$",
        "opacity": 1,
        "textColor": "#cbd5e1",
        "gridColor": "#334155"
      }
    }
  ]
}
```

## Examples

### Dark crypto recap

A dark-canvas week of candles, compact-formatted.

API overrides that reproduce this example:

```json
{
  "ohlc.textColor": "#cbd5e1",
  "ohlc.gridColor": "#334155",
  "ohlc.upColor": "#22c55e",
  "ohlc.downColor": "#ef4444",
  "ohlc.candles": [
    {
      "open": 1800,
      "high": 1880,
      "low": 1760,
      "close": 1850
    },
    {
      "open": 1850,
      "high": 1920,
      "low": 1840,
      "close": 1900
    },
    {
      "open": 1900,
      "high": 1910,
      "low": 1820,
      "close": 1835
    },
    {
      "open": 1835,
      "high": 1960,
      "low": 1830,
      "close": 1945
    },
    {
      "open": 1945,
      "high": 2010,
      "low": 1930,
      "close": 1990
    }
  ],
  "ohlc.labels": [
    "Mon",
    "Tue",
    "Wed",
    "Thu",
    "Fri"
  ],
  "ohlc.valueFormat": "compact"
}
```

### Terminal candles

Bright green/red candles on slate for a trading-terminal card.

API overrides that reproduce this example:

```json
{
  "ohlc.textColor": "#e2e8f0",
  "ohlc.gridColor": "#1e293b",
  "ohlc.upColor": "#22c55e",
  "ohlc.downColor": "#ef4444"
}
```

## API overrides

Push a fresh OHLC array per render with '<key>.candles' (or just '<key>'); labels and colors are overridable too.

Flat override payload (`key.property` addressing) with the sample design's current values — send only the keys you want to change:

```json
{
  "ohlc.candles": [
    {
      "open": 100,
      "high": 112,
      "low": 97,
      "close": 109
    },
    {
      "open": 109,
      "high": 114,
      "low": 105,
      "close": 106
    },
    {
      "open": 106,
      "high": 108,
      "low": 98,
      "close": 101
    },
    {
      "open": 101,
      "high": 118,
      "low": 100,
      "close": 116
    },
    {
      "open": 116,
      "high": 122,
      "low": 113,
      "close": 120
    },
    {
      "open": 120,
      "high": 121,
      "low": 110,
      "close": 112
    },
    {
      "open": 112,
      "high": 119,
      "low": 111,
      "close": 118
    }
  ],
  "ohlc.labels": [
    "Mon",
    "Tue",
    "Wed",
    "Thu",
    "Fri",
    "Sat",
    "Sun"
  ],
  "ohlc.upColor": "#16a34a",
  "ohlc.downColor": "#dc2626",
  "ohlc.showAxis": true,
  "ohlc.showGrid": true,
  "ohlc.valueFormat": "currency",
  "ohlc.currencySymbol": "$",
  "ohlc.opacity": 1
}
```

```bash
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "ohlc.candles": [
        {
            "open": 100,
            "high": 112,
            "low": 97,
            "close": 109
        },
        {
            "open": 109,
            "high": 114,
            "low": 105,
            "close": 106
        },
        {
            "open": 106,
            "high": 108,
            "low": 98,
            "close": 101
        },
        {
            "open": 101,
            "high": 118,
            "low": 100,
            "close": 116
        },
        {
            "open": 116,
            "high": 122,
            "low": 113,
            "close": 120
        },
        {
            "open": 120,
            "high": 121,
            "low": 110,
            "close": 112
        },
        {
            "open": 112,
            "high": 119,
            "low": 111,
            "close": 118
        }
    ],
    "ohlc.labels": [
        "Mon",
        "Tue",
        "Wed",
        "Thu",
        "Fri",
        "Sat",
        "Sun"
    ],
    "ohlc.upColor": "#16a34a",
    "ohlc.downColor": "#dc2626",
    "ohlc.showAxis": true,
    "ohlc.showGrid": true,
    "ohlc.valueFormat": "currency",
    "ohlc.currencySymbol": "$",
    "ohlc.opacity": 1
}'
```

`{{YOUR_DESIGN_ID}}` and `{{YOUR_API_KEY}}` are placeholders: first create
the design in your account (paste the sample design JSON above into the
editor at https://app.imejis.io, or create it programmatically via the
imejis MCP server's `create_design` + `update_design` tools), then render
it with the design's id and one of your API keys.

Agents: the MCP server at https://api.imejis.io/api/mcp exposes this same
catalog as structured data via the `list_component_types` tool (property
kinds, allowed values, bounds, ready-to-use sample designs).

## Related

- [Candlestick component](https://www.imejis.io/components/candlestick.md) — full reference and FAQs
- [Minimal](https://www.imejis.io/components/candlestick/minimal.md) — Axis and grid hidden — just the candles, for a clean inline price spark.
