Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phantom item sent to EDDN #2

Closed
maddavo opened this issue Jun 7, 2015 · 3 comments
Closed

Phantom item sent to EDDN #2

maddavo opened this issue Jun 7, 2015 · 3 comments

Comments

@maddavo
Copy link

maddavo commented Jun 7, 2015

There is a price that got sent to EDDN from NGUN/Thiele Orbital. Imperial Slaves are listed in the json but they are not listed in the in-game market. You need to check for invalid values - in this case the demandBracket is "" which is an invalid value you can filter on. All the price values are way off - probably lingering from some other time - but the demandBracket and stockBracket can be used to check if the item will show in the market and thus be worth counting on for data.

@Marginal
Copy link
Contributor

Marginal commented Jun 7, 2015

Releases >= 1.3.3 set demand=0 if demandBracket==0, but leave sellPrice unchanged. In general this results in EDDN messages that match what the user sees in the Commodity Market. (Earlier versions did the equivalent for offline CSV, BPC and TD output, but not for EDDN messages).

i.e. The following output from the API results in this message which is, I think, correct.

      {
        "volumescale": "1.3000",
        "categoryname": "Chemicals",
        "statusFlags": [],
        "parent_id": null,
        "market_id": null,
        "rare_max_stock": "0",
        "rare_min_stock": "0",
        "demand": 1,
        "stock": 430867,
        "targetStock": 700998,
        "consumptionQty": 348268,
        "creationQty": 613931,
        "stockBracket": 2,
        "demandBracket": 0,
        "meanPrice": 147,
        "sellPrice": 109,
        "buyPrice": 115,
        "capacity": 962199,
        "baseConsumptionQty": 200,
        "baseCreationQty": 200,
        "consumebuy": "3",
        "homesell": "71",
        "homebuy": "74",
        "cost_mean": "147.00",
        "cost_max": 168,
        "cost_min": 125,
        "name": "Hydrogen Fuel",
        "id": "128049202"
      },

The output from the API for Imperial Slaves @ Ngun/Thiele Orbital looks like the following (and results in this EDDN message):

      {
        "volumescale": "1.0000",
        "categoryname": "Slaves",
        "statusFlags": [
          "Not Produced",
          "Low Price",
          "High Demand",
          "Legal"
        ],
        "parent_id": null,
        "market_id": null,
        "rare_max_stock": "0",
        "rare_min_stock": "0",
        "demand": 0,
        "stock": 0,
        "targetStock": 222551,
        "consumptionQty": 42976,
        "creationQty": 211807,
        "stockBracket": 0,
        "demandBracket": "",
        "meanPrice": 16485,
        "sellPrice": 853,
        "buyPrice": 0,
        "capacity": 5095660,
        "baseConsumptionQty": 14,
        "baseCreationQty": 69,
        "consumebuy": "0",
        "homesell": "98",
        "homebuy": "98",
        "cost_mean": "16485.00",
        "cost_max": 865,
        "cost_min": 784,
        "name": "Imperial Slaves",
        "id": "128667728"
      },

Note the "statusFlags" element, which I don't recall seeing before 1.3. I'm not sure which of these flags I should use to exclude this commodity from the output?

Edit: Just re-read your OP. Filtering out commodities with demandBracket == "" looks like the correct thing to do. Will fix in the next release.

@AnthorNet
Copy link
Contributor

statusFlags were present. I just checked.

@Marginal
Copy link
Contributor

Marginal commented Jun 8, 2015

Fixed in Release 1.34 for EDDN v1 and in Release 1.40 for EDDN v2.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants