What exactly is data-req_id ?

Hi, does anyone know what this is or does exactly?

It keeps displaying a number differently (keeps rising) for each trade on Volatility odd/even and matches/differs?

ie : data-req_id= '115' ?

Comments

  • req_id is used to map client request to client response. it doesn't impact any thing.

    For example you want to send two subscription and want to map response to your request, you can use req_id

    Request 1

    {
      "proposal": 1,
      "amount": "100",
      "basis": "payout",
      "contract_type": "CALL",
      "currency": "USD",
      "duration": "10",
      "duration_unit": "m",
      "symbol": "frxUSDJPY", 
      "req_id": 1,
      "subscribe": 1
    }
    

    Request 2

    {
      "proposal": 1,
      "amount": "100",
      "basis": "payout",
      "contract_type": "CALL",
      "currency": "USD",
      "duration": "10",
      "duration_unit": "m",
      "symbol": "R_100", 
      "req_id": 2,
      "subscribe": 1
    }
    

    So now you will get response for both of request, so easy way to distinguish to check req_id of response and map it to request or you can do in crude way like

    $response[proposal][symbol] === "R_100"

Sign In or Register to comment.