Mt. Gox API - getting confirmation of a trade order

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?

Jake-i

Posted 2013-05-09T20:39:56.763

Reputation: 11

Answers

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.

Tom Herman

Posted 2013-05-09T20:39:56.763

Reputation: 11

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.

stanm87

Posted 2013-05-09T20:39:56.763

Reputation: 237