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

Handle missing prices for today #17

Merged
merged 1 commit into from
May 28, 2023
Merged

Conversation

slovdahl
Copy link
Owner

@slovdahl slovdahl commented May 28, 2023

Happened today (2023-05-28) when https://api.spot-hinta.fi/TodayAndDayForward returned

[
  {
    "Rank": 1,
    "DateTime": "2023-05-29T01:00:00+03:00",
    "PriceNoTax": -0.0001,
    "PriceWithTax": -0.0002
  },
  {
    "Rank": 2,
    "DateTime": "2023-05-29T02:00:00+03:00",
    "PriceNoTax": -0.0001,
    "PriceWithTax": -0.0001
  },
  {
    "Rank": 3,
    "DateTime": "2023-05-29T03:00:00+03:00",
    "PriceNoTax": -0.0001,
    "PriceWithTax": -0.0001
  },
  {
    "Rank": 4,
    "DateTime": "2023-05-29T04:00:00+03:00",
    "PriceNoTax": 0,
    "PriceWithTax": 0
  },
  {
    "Rank": 5,
    "DateTime": "2023-05-29T05:00:00+03:00",
    "PriceNoTax": 0.0012,
    "PriceWithTax": 0.0014
  },
  {
    "Rank": 12,
    "DateTime": "2023-05-29T06:00:00+03:00",
    "PriceNoTax": 0.0023,
    "PriceWithTax": 0.0028
  },
  {
    "Rank": 16,
    "DateTime": "2023-05-29T07:00:00+03:00",
    "PriceNoTax": 0.0041,
    "PriceWithTax": 0.0051
  },
  {
    "Rank": 22,
    "DateTime": "2023-05-29T08:00:00+03:00",
    "PriceNoTax": 0.0271,
    "PriceWithTax": 0.0336
  },
  {
    "Rank": 23,
    "DateTime": "2023-05-29T09:00:00+03:00",
    "PriceNoTax": 0.0299,
    "PriceWithTax": 0.0371
  },
  {
    "Rank": 15,
    "DateTime": "2023-05-29T10:00:00+03:00",
    "PriceNoTax": 0.004,
    "PriceWithTax": 0.005
  },
  {
    "Rank": 14,
    "DateTime": "2023-05-29T11:00:00+03:00",
    "PriceNoTax": 0.0035,
    "PriceWithTax": 0.0043
  },
  {
    "Rank": 13,
    "DateTime": "2023-05-29T12:00:00+03:00",
    "PriceNoTax": 0.0023,
    "PriceWithTax": 0.0029
  },
  {
    "Rank": 10,
    "DateTime": "2023-05-29T13:00:00+03:00",
    "PriceNoTax": 0.0021,
    "PriceWithTax": 0.0026
  },
  {
    "Rank": 9,
    "DateTime": "2023-05-29T14:00:00+03:00",
    "PriceNoTax": 0.0019,
    "PriceWithTax": 0.0023
  },
  {
    "Rank": 7,
    "DateTime": "2023-05-29T15:00:00+03:00",
    "PriceNoTax": 0.0016,
    "PriceWithTax": 0.002
  },
  {
    "Rank": 8,
    "DateTime": "2023-05-29T16:00:00+03:00",
    "PriceNoTax": 0.0017,
    "PriceWithTax": 0.0021
  },
  {
    "Rank": 6,
    "DateTime": "2023-05-29T17:00:00+03:00",
    "PriceNoTax": 0.0015,
    "PriceWithTax": 0.0019
  },
  {
    "Rank": 11,
    "DateTime": "2023-05-29T18:00:00+03:00",
    "PriceNoTax": 0.0022,
    "PriceWithTax": 0.0028
  },
  {
    "Rank": 17,
    "DateTime": "2023-05-29T19:00:00+03:00",
    "PriceNoTax": 0.008,
    "PriceWithTax": 0.0099
  },
  {
    "Rank": 20,
    "DateTime": "2023-05-29T20:00:00+03:00",
    "PriceNoTax": 0.0094,
    "PriceWithTax": 0.0116
  },
  {
    "Rank": 21,
    "DateTime": "2023-05-29T21:00:00+03:00",
    "PriceNoTax": 0.0098,
    "PriceWithTax": 0.0122
  },
  {
    "Rank": 19,
    "DateTime": "2023-05-29T22:00:00+03:00",
    "PriceNoTax": 0.0092,
    "PriceWithTax": 0.0114
  },
  {
    "Rank": 18,
    "DateTime": "2023-05-29T23:00:00+03:00",
    "PriceNoTax": 0.008,
    "PriceWithTax": 0.0099
  }
]

@slovdahl slovdahl added bug bugfix Inconsistencies or issues which will cause a problem for users or implementers. and removed bug labels May 28, 2023
@slovdahl slovdahl force-pushed the handle-missing-prices-for-today branch from 1c65f7a to 1b1de4c Compare May 28, 2023 17:47
@slovdahl slovdahl merged commit 52f7d97 into main May 28, 2023
@slovdahl slovdahl deleted the handle-missing-prices-for-today branch May 28, 2023 17:52
@slovdahl slovdahl added the breaking-change A breaking change for existing users. label May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A breaking change for existing users. bugfix Inconsistencies or issues which will cause a problem for users or implementers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant