For BTER bots (running 0.1.4b), orders_history.json BUY-side orders show incorrect "amount"

Issue #160 resolved
Ben Rossi created an issue

I've been working with Jamie to get her set up using the reporting tool that I've been developing. We started to troubleshoot a calculation issue and realized that it is the input source, orders_history.json, that may be wrong.

This only is an issue with the reporting output, because the orders are being placed appropriately (from what we can tell). From orders_history.json from a BTER account:

{
            "active_orders": 4,
            "digest": [
                {
                    "amount": 31258.06604175,
                    "order_currency": "nbt",
                    "time": 1421955933293,
                    "price": 0.004304,
                    "payment_currency": "btc",
                    "order_id": "94455926",
                    "order_type": "SELL"
                },
                {
                    "amount": 31258.06604174,
                    "order_currency": "nbt",
                    "time": 1421955933293,
                    "price": 0.004304,
                    "payment_currency": "btc",
                    "order_id": "94455949",
                    "order_type": "SELL"
                },
                {
                    "amount": 146.15446582,
                    "order_currency": "nbt",
                    "time": 1421955933293,
                    "price": 0.004251,
                    "payment_currency": "btc",
                    "order_id": "94456306",
                    "order_type": "BUY"
                },
                {
                    "amount": 146.18120972,
                    "order_currency": "nbt",
                    "time": 1421955933293,
                    "price": 0.004251,
                    "payment_currency": "btc",
                    "order_id": "94456323",
                    "order_type": "BUY"
                }
            ],
            "time_stamp": 1421955933293
        }

Contrary to how it is displayed in all other order_history.json files for other exchanges, the order_type == "BUY" orders are displaying their amount in BTC, instead of NBT. Now, this is technically correct, if you think about how the orders are placed in the market, but it doesn't match how the rest of the exchanges show the same value.

I know that this is a mistaken rather than an intended output because the order_currency is listed as "nbt" and the price is displayed in "btc/nbt".

Comments (6)

  1. Ben Rossi reporter

    To clarify, what the order_history.json file should show for this set of orders is:

    {
                "active_orders": 4,
                "digest": [
                    {
                        "amount": 31258.06604175,
                        "order_currency": "nbt",
                        "time": 1421955933293,
                        "price": 0.004304,
                        "payment_currency": "btc",
                        "order_id": "94455926",
                        "order_type": "SELL"
                    },
                    {
                        "amount": 31258.06604174,
                        "order_currency": "nbt",
                        "time": 1421955933293,
                        "price": 0.004304,
                        "payment_currency": "btc",
                        "order_id": "94455949",
                        "order_type": "SELL"
                    },
                    {
                        "amount": 34381.19638202,
                        "order_currency": "nbt",
                        "time": 1421955933293,
                        "price": 0.004251,
                        "payment_currency": "btc",
                        "order_id": "94456306",
                        "order_type": "BUY"
                    },
                    {
                        "amount": 34387.48758409,
                        "order_currency": "nbt",
                        "time": 1421955933293,
                        "price": 0.004251,
                        "payment_currency": "btc",
                        "order_id": "94456323",
                        "order_type": "BUY"
                    }
                ],
                "time_stamp": 1421955933293
            }
    
  2. Log in to comment