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

Charts api reworked #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Charts api reworked #59

wants to merge 2 commits into from

Conversation

GusevTimofey
Copy link
Member

No description provided.

val value: String,
val dateFormat: String,
val timeWindow: FiniteDuration,
val pgValue: Int,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic field

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added comment

@Bromel777
Copy link
Member

please, squash commits

@@ -81,6 +82,27 @@ final class AmmStatsEndpoints(conf: RequestConfig) {
.name("Pool chart")
.description("Get price chart by pool")

def getPoolPriceChartWithGaps: Endpoint[(PoolId, TimeWindow, ChartGap), HttpError, List[PricePoint], Any] =
baseEndpoint.get
.in(PathPrefix / "pool" / path[PoolId].description("Asset reference") / "charts")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Asset reference" is misleading

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

from <- window.from
to <- window.to
period = to - from
} yield if (period > gap.minimalGap) false else true).getOrElse(true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} yield if (period > gap.minimalGap) false else true).getOrElse(true)
} yield period <= gap.minimalGap).getOrElse(true)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

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

Successfully merging this pull request may close these issues.

3 participants