by Michal » Fri Mar 21, 2008 11:38 am
Hi ,
Im dealing with a partial matched stakes for a bet. I have looked aroud on the forum and gleamed some information. I have now constructed a plan to tackle this issue and I would just like to post it here to make sure that I have the mechanics right to allow me to make the correct coding decisions.
Here goes:
Q1
When a bet is partialy matched then the bet reference gets a P on the end of it.
Q2 The portion of the intended stake that has been matched will be displayed in the W column
Q3 To cancel the remaining part of the stake I place a CANCEL command,
when the bet reference returns canceled it will NOT have the P at the end
this WILL confirm that my bet is no longer active and has been wiped.
Q4 When the bet reference looses the P as in Q3 above I can then go to the W column and see exactly what part of the bet has been matched knowing that since the lack of P indicates the bet has been canceled there will be no more money placed against the bet and I can then count on the W column to tell me what has been matched
From the above confirmations I can the write a code that will
place a bet
check if partial
wait for some time then
cancel the remainder
check reference for P gone indicating cancelation
check the amount of stake matched
re-isue a new bet at current price
Thank you for any assistance or sugestions
Michal