SpaceTradersAPI / issues-and-suggestions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Inconsistency in Market order responses

jurrehart opened this issue · comments

There's an inconsistent reponse in the market orders where a sell-orders endpoint response has an array as order and buy-order has a single object as order
buy-orders

    "credits": 112690,
    "order": {
        "good": "SHIP_PARTS",
        "pricePerUnit": 1240,
        "quantity": 18,
        "total": 22320
    },
    "ship": {
       ...
    }
}

sell-orders

{
    "credits": 127704,
    "order": [
        {
            "good": "SHIP_PARTS",
            "pricePerUnit": 1300,
            "quantity": 18,
            "total": 23400
        }
    ],
    "ship": {
       ...
    }
}

This should now be fixed.