Code Monkey home page Code Monkey logo

Comments (3)

Marginal avatar Marginal commented on July 24, 2024

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.

from edmarketconnector.

AnthorNet avatar AnthorNet commented on July 24, 2024

statusFlags were present. I just checked.

from edmarketconnector.

Marginal avatar Marginal commented on July 24, 2024

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

from edmarketconnector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.