How to get the outcome of a trade

After buying a contract/proposal, how do I know or later check of the outcome, e.g. profit/loss?

Thanks

Answers

  • There are two possibilities...
    1. Subscribe to the proposal_open_contract call and each time a response comes in check for the exit_tick field. You can then compare the exit_tick to the entry_tick in order to tell whether the contract has been won.
    2. Subscribe to the transactions stream and wait for the sell transaction for that contract.

    The second method is slower.

Sign In or Register to comment.