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.

Expected downtimes of the API on January 3rd 2019

Expected Downtime Warning

We have a planned upgrade of our systems involved in the API on January 3rd of 2019. All APIs might be unavailable for several minutes over the day.

We apologize for any inconvenience this upgrade might cause with market opened.

1 Like

The upgrade of the API Manager is now finished.

Let us know if you have any issues trying to access the API using your existing credentials.

1 Like

Hi,

Since the recent update, it is not possible to test the POST /products method in the API manager. The following example has worked fine on the previous version.

JSON :

{
  "filter": [
    {
      "name": "return",
      "options": [
        {
          "max": 100,
          "min": 0,
          "period": "1m"
        }
      ]
    }
  ],
  "order": "ASC",
  "orderField": "productName",
  "page": 0,
  "perPage": 50,
  "period": "1m"
}

Response:

{
  "timestamp": "2019-01-03T21:05:30.135+0000",
  "status": 400,
  "error": "Bad Request",
  "message": "JSON parse error: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 11] (through reference chain: com.darwinex.api.dto.filter.ProductFilterDTO[\"filter\"])",
  "path": "/products"
}
2 Likes

I have the same problem…do you know when will be correct?

This is quite interesting …

If I try with a request having more than one element in the collections … it seems to work:

{
  "filter": [
    {
      "name": "return",
      "options": [
        {
          "period": "1m",
          "min": 0,
          "max": 100
        },{
          "period": "1m",
          "min": 0,
          "max": 100
        }
      ]
    },{
      "name": "return",
      "options": [
        {
          "period": "1m",
          "min": 0,
          "max": 100
        },{
          "period": "1m",
          "min": 0,
          "max": 100
        }
      ]
    }
  ],
  "period": "1m",
  "perPage": 50,
  "page": 0,
  "orderField": "productName",
  "order": "ASC"
}

Response:

[
  {
    "productName": "AAN.4.2",
    "currentInvestment": 627.56,
    "investorsByPeriod": 0,
    "returnByPeriod": 2.6041118735157243,
    "drawDownByPeriod": -3.77232220136946,
    "period": "1m",
    "buyAllowed": true,
    "conditionalBuyAllowed": true,
    "conditionalSellAllowed": true,
    "sellAllowed": true,
    "quote": 89.37,
    "quoteDate": 1546591578792,
    "returnPercentage": 0.011183289811015129
  }, ...

I hope to have this issue fixed today.

This issue with the POST /products is now fixed.
Requests can be done to the POST /products without the “[”, “]” in single collections.

1 Like

It’s working now…Thanks! Next week I will start a Demo Automated Portfolio.

2 Likes

It would be a great point to have possibility to manage more than one demo portfolio in order to prove another automated strategies.

2 Likes

Yes, indeed it would. In fact , the functionality to have more than one investor account in demo or live is one of the functionalities announced for this year, which is called multiportfolio. The backend of the API was built thinking on the multiportfolio functionality and that’s certainly something we also would like to offer.

3 Likes