Just found another bug, every time you try to fill an order (at least bid) directly via OAuth you get an error
Example:
OAuth ->fetch ('
https://btct.co/oauth/trade', array('act' => 'ask_submit', 'ticker' => 'S.MPOE-PT', 'ask_quantity' => '1', 'ask_price' => '0.0008607'), 'POST')
Response:
Invalid auth/bad request (got a 500, expected HTTP/1.1 20X or a redirect)
Its also possible that it creates a deadlock. It seems that the system does not release the lock after this. (Just guessing) On second try I get:
Array ( [status] => error [error_message] => Received Ask Order: 1 of S.MPOE-PT @ 0.0008607 BTC: Excessive wait trying to get lock on S.MPOE-PT. )
Thank you. I have found two potential points of exit from the code where the security lock was not being released prior to exiting:
- One related to backend bitcoind failure, which I do not think was the cause here because there's logging that would have been seen if this were the case.
- Another which may be the smoking gun was a DDoS prevention piece that was intended to run once at init, but was being called twice because of a double layer of validation in the bid/ask processing methods. I've fixed it to only do the DDoS test the first call per run.
Hopefully it ends up being taken care of now, but I've also added more logging/debugging code a bunch of places to help out if this doesn't end up taking care of it.
Cheers.