Bitcoin Forum

Economy => Trading Discussion => Topic started by: thezerg on January 15, 2013, 06:18:25 PM



Title: Mt Gox trade channel message repeats
Post by: thezerg on January 15, 2013, 06:18:25 PM
I'm trying to chase down an issue in the mt gox streaming API (or my code) where I see double transactions.  These seem to happen during big buys or dumps but not during normal processing.  Anyone else seen this?

To debug this, I threw in some code that eliminates trades with the same 'tid'.  However, I started seeing repeated transactions across different currencies like this:

{'origin': 'broadcast', 'trade': {'price_currency': 'USD', 'trade_type': 'bid', 'price_int': '1424999', 'price': 14.24999, 'primary': 'N', 'item': 'BTC', 'amount': 29.0911, 'tid': '1358271672595895', 'amount_int': '2909110000', 'date': 1358271672.0, 'type': 'trade', 'properties': 'market,mixed_currency'}, 'private': 'trade', 'channel': 'dbf1dee9-4f2e-4a08-8cb7-748919a71b21', 'op': 'private'}

{'origin': 'broadcast', 'trade': {'price_currency': 'EUR', 'trade_type': 'bid', 'price_int': '1094838', 'price': 10.94838, 'primary': 'Y', 'item': 'BTC', 'amount': 29.0911, 'tid': '1358271672595895', 'amount_int': '2909110000', 'date': 1358271672.0, 'type': 'trade', 'properties': 'market,mixed_currency'}, 'private': 'trade', 'channel': 'dbf1dee9-4f2e-4a08-8cb7-748919a71b21', 'op': 'private'}

Are these both valid (as the same trade) and indicative of some kind of automatic currency translation that Mt. Gox is doing?

Thanks!


Title: Re: Mt Gox trade channel message repeats
Post by: MagicalTux on January 17, 2013, 07:29:07 AM
Both entries are actually the same trade, as seen from different currencies. This happens when an order hits an open order in another currency. Those trades have the "mixed_currency" flag set.

You can use the "primary" field to differentiate them.