API changes - Addition to Profit Table response.

Dear developers,
We are soon adding ‘duration_type’ as a new optional parameter to our profit_table response API call.
This new string parameter indicates the 'duration type' of a contract and has one of these values: ticks, seconds, minutes, hours, days.
Here is an example of profit_table response:

{
  "echo_req": {
    "date_to": 1628726399,
    "description": 1,
    "limit": 50,
    "offset": 0,
    "profit_table": 1,
    "req_id": 22
  },
  "msg_type": "profit_table",
  "profit_table": {
    "count": 2,
    "transactions": [
      {
        "app_id": 1003,
        "buy_price": 30,
        "contract_id": 79,
        "duration_type": "ticks",
        "longcode": "Win payout if Volatility 25 Index after 3 ticks is strictly higher than entry spot.",
        "payout": 58.6,
        "purchase_time": 1628662242,
        "sell_price": 58.6,
        "sell_time": 1628662251,
        "shortcode": "CALL_R_25_58.60_1628662242_3T_S0P_0",
        "transaction_id": 219
      },
      {
        "app_id": 1003,
        "buy_price": 30,
        "contract_id": 59,
        "duration_type": "seconds",
        "longcode": "Win payout if Volatility 25 Index is strictly higher than entry spot at 15 seconds after contract start time.",
        "payout": 58.6,
        "purchase_time": 1628662173,
        "sell_price": 0,
        "sell_time": 1628662190,
        "shortcode": "CALL_R_25_58.60_1628662173_1628662188_S0P_0",
        "transaction_id": 179
      }
    ]
  },
  "req_id": 22
}

Please make the necessary changes to your code if you wanted to use 'duration_type'.
Thank you.
Team Deriv.com
api-support@deriv.com

Sign In or Register to comment.