@prof7bit I noticed that Goxtool goes to great lengths identifying self orders but according to:
https://bitbucket.org/nitrous/mtgox-api#markdown-header-moneyinfo MONEY/ORDER/ADD should return "success" (or error) along with the the OID (order identifier). I still didn't try sending orders, but I am wondering if it is possible to identify the Bot's orders when you are sending them.
Initially (early versions of goxtool) only used the streaming API to send orders, so it all happened asynchronously, the function call (buy, sell, cancel) did immediately return without any feedback. When I later implemented the http api I made it behave the same way, so all existing bots did not experience any different behavior when goxtool was switched to http api, the call still immediately returns while a separate thread is trying to do the http requests. As soon as the http response is received it will put the order into the owns list and fire a bunch of signals while the order is graduating from acked to pending to open.
Its all centered around the idea that nothing you do within your bot should ever block (so you should never wait for a http request to return) because that would block the entire client because only exactly one thread is allowed to be inside a signal call at any given time, any other thread in goxtool that attempts to emit a signal too will have to wait until all slots of the previous signal have returned. Signals can be emitted by the stream receive thread, the http thread and the main thread (keypress signals) and none of them can ever be processed simultaneously, they will all run into the global signal lock and wait until your strategy (or any other component of goxtool/goxapi) returns from the slot it is currently processing.
Sou you should not attempt to program your strategy in an imperative sequential manner, you should instead move the stuff that needs to happen after the order has been placed into the owns_changed slot or other slots that are appropriate. I admit that this might make some things more complicated but I don't see any easy way around this. If you absolutely cannot avoid it to do things in a sequential manner then you might try to start a new separate thread that does it and which calls the protected (prefixed wth "_") blocking http request methods directly.