I can't find the correct API for get results (won/lost) of a contract.
Anyone can help me, please?
Here it is - https://developers.binary.com/api/#transaction
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:
And to get result (win/loss) look at response
"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
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.