I think this could be done by a servant, but I am a bit stuck with some aspects of it.
What I would like to do is this.
I have placed some Lay bets in the market, if the price goes against me, rather than it going in play with the BSP that would work on the remaining liability, I would like the bet to be some how amended to a new price closer to the current market price and calculated using the bets payout (rather than the liability). I am happy for this bet to then be settled to BSP if not matched. Doing this balances my book better as it reduces liability across all selections.
I am going in and manually updating at the moment.
Can anyone steer me in the right direction, I am struggling a bit to get started.