Is Transaction Subscription stable?
Hi Dear community. Actually I'm trying to get contract info using transaction subcription. I tried yesterday and I was getting Transaction events OK. but Today when I start my app again I don't getting Transaction events OK. Does Transaction Subscription has delay sometimes?
Regards
Best Answers
-
Please note that there is difference between contract expiry and contract sell. Contract expiry is when end time is reached but if contract is not manually sold then sell time will be after contract expiry because it is handled by our system. But if you manually want to tell system to sell expired contracts then use this call
https://developers.binary.com/api/#sell_expired
Send Login.
Send subscribe to transactions.
Send Proposal.
Buy Contract
Wait transaction 1 when I Purchase
Wait transaction 2 (Some times work cuz I get this result after correct tick when I purchase) But sometimes It does not work. sometimes took too much time
When contract is expired call Sell expired -
@tarja when you purchase, buy response contains
contract_id
, with thatcontract_id
you can subscribeproposal_open_contract
with thatcontract_id
, that will give you all updates.Wait transaction 2 (Some times work cuz I get this result after correct tick when I purchase) But sometimes It does not work. sometimes took too much time.
Sometimes it takes time because sell happens after contract has expired and our system sells based on ticks provided by feed provider so sometimes it can take time
Answers
You need to check if your subscription is still valid, if your subscription has expired or your connection dropped in between then you need to subscribe again as subscription is per connection.
Hi.
But its strange because I was getting valid response when I send {"transaction": 1,"subscribe": 1}
And I was getting updates (some update for example when I purchase a contract but not when contract finish to get the result of the purchase.)
Today It is working Ok maybe. So I going to keep checking to see it I got wrong again.
Thank you very much Raunak.
Regards
Please note that contract expiry and contract sell is different. You will get notification when contract has been sold. Contract is sold by our system after contract expiry or if you manually sell it then it will be sold at that time
So how Can I handle if I loss or win a contract when I play in ticks. should I send a contract verification or resquet the profit table before x secound after my purchase?
Because actually I using this way.
Send Login.
Send subscribe to transactions.
Send Proposal.
Buy Contract
Wait transaction 1 when I Purchase
Wait transaction 2 (Some times work cuz I get this result after correct tick when I purchase) But sometimes It does not work. sometimes took too much time.
So what the best way to handle this?
Thank you very much Mrs. Raunak
Regards.
Bump.