Skip to content

Commit

Permalink
limit parameter added to aggregate requests (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkahramana authored Jan 5, 2021
1 parent 046cb1a commit 6e8e3b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/kotlin/io/polygon/kotlin/sdk/rest/Aggregates.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suspend fun PolygonRestClient.getAggregates(params: AggregatesParameters): Aggre
)

parameters["unadjusted"] = params.unadjusted.toString()
parameters["limit"] = params.limit.toString()
}

@Builder
Expand Down Expand Up @@ -50,7 +51,11 @@ data class AggregatesParameters(

/** Set to true if the results should NOT be adjusted for splits. Default: false */
@DefaultValue("false")
val unadjusted: Boolean = false
val unadjusted: Boolean = false,

/** Limits the number of base aggregates */
@DefaultValue("5000")
val limit: Long = 5000
)

@Serializable
Expand Down

0 comments on commit 6e8e3b1

Please sign in to comment.