API for check contract results

I can't find the correct API for get results (won/lost) of a contract.
Anyone can help me, please?


  • Hi @Fiber100
    There is not a field for transaction number/reference like 35849297148 for get the result (win/loss).
    Please, can you clarify?

  • I''m not sure what you asking about, but all info is there:
    "contract_id": "17976948048"
    "transaction_id": "35877299288"
    And to get result (win/loss) look at response
    "action": "sell",
    "amount": "10.99" <- win
    if amount 0 , then loss

  • When you send a "buy" request the response includes the contract_id, save this number.

    When the transaction response comes, check the following fields

    • contract_id = the id of the contract you are interested in
    • action = "sell"
    • amount = zero if the trade was lost, or a positive value if the trade was won.

    A word of warning, sometimes the transaction is delayed. I have seen transactions that arrived several minutes after the close of the contract.

    A faster way of getting trade results is to subscribe to Proposal Open Contract
    And watch for a response that contains an "exit_tick" field. Then you can check to see whether the exit_tick is in the money.

    If the relevant transaction is delayed, you can send Sell Expired.

Sign In or Register to comment.