1

I want to place a trade order at market price from an existing wallet in some auxiliary currency. After a successfull trade, I need to do some other work (fullfillment).

However, I'm having trouble figuring out whether my order went successfull :(

For instance, when the wallet in the auxiliary currency is empty or too low (and the order should fail), I'm getting the exact same response that I'm getting upon a successfull trade:

$response = {
          'data' => 'XXXXXX-XXXX-XXXX-XXXX-XXXXXXX', ## not actual order id/oid
          'result' => 'success'
        };

What's the way I'm supposed to check for a successfull trade?

2 Answers 2

1

The success message is telling you that your request to place an order was successful, not that the order has been fulfilled. For that, you have to poll money/order/result.

Also, I use the order submission API in V2 and it does respond with an insufficient funds error. If you're using the older V0/V1 APIs, you may want to upgrade.

0

yeah this is a really annoying bug in mtgox api. your best bet is to listen to either the streaming user_order messages or make a request to /money/orders and verify that it contains or not the oid you just got.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.