CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 66 % of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

[ANNOUNCEMENT] Candle History improvements

Darwin Info API

Candle History

The methods for retrieving candle history have been improved to retrieve more history data per resolution, following several requests received. For instance, the window providing 1 minute candle resolution was 150 minutes before the change… but now, the API is providing a frame window of 1 week for providing 1 minute candles.

Example:

https://api.darwinex.com/darwininfo/1.4/products/DWC.4.20/candles?resolution=1m&from=1552045904&to=1552564200

Response:

{
  "candles": [
    {
      "candle": {
        "close": 71.87,
        "max": 71.88,
        "min": 71.85,
        "open": 71.87
      },
      "timestamp": 1552045860
    },
    {
      "candle": {
        "close": 71.85,
        "max": 71.88,
        "min": 71.84,
        "open": 71.87
      },
      "timestamp": 1552045920
    },
...
    {
      "candle": {
        "close": 71.28,
        "max": 71.33,
        "min": 71.28,
        "open": 71.32
      },
      "timestamp": 1552564140
    },
    {
      "candle": {
        "close": 71.34,
        "max": 71.35,
        "min": 71.28,
        "open": 71.28
      },
      "timestamp": 1552564200
    }
  ],
  "period": {
    "start": 1552045860,
    "end": 1552564200
  },
  "resolution": "1m",
  "supportedResolutions": [
    "1m",
    "5m",
    "15m",
    "30m",
    "1h",
    "4h"
  ]
}

The following restrictions applies to this candle history request at the moment:

Period Resolution
1 hour 1 minute
2.5 hours 1, 5 minutes
12 hours 1, 5, 15 minutes
36 hours 1, 5, 15, 30 minutes
72 hours 1, 5, 15, 30 minutes, 1 hour
144 hours (6 days) 1, 5, 15, 30 minutes, 1, 4 hours
600 hours (25 days) 15, 30 minutes, 1, 4 hours, 1 day
3360 hours (140 days) 4 hours, 1 day, 1 week
16800 hours (700 days) 1 day, 1 week, 1 month

Weekends and some holidays are excluded from period calculations for candles. Therefore, 6 days corresponds to a week and 25 days to a month.

4 Likes

Weekend == no candles == a little humor

1 Like

hahaha… epic :joy:

I thrive on this kind of humour, keep it coming!

1 Like