Package markets.alpaca.client.data
Record Class StockTradesRequest
java.lang.Object
java.lang.Record
markets.alpaca.client.data.StockTradesRequest
public record StockTradesRequest(List<String> symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String asof, StockHistoricalFeed feed, String currency, String pageToken, Sort sort)
extends Record
Named parameters for Market Data historical stock-trades endpoints.
At least one symbol is required. Unset optional fields are sent as null, allowing the
generated client and API defaults to apply. AlpacaStocks.trades(StockTradesRequest)
supports multiple symbols; AlpacaStocks.tradesForSymbol(StockTradesRequest) requires
exactly one symbol because it calls the generated single-symbol endpoint.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for immutableStockTradesRequestinstances. -
Constructor Summary
ConstructorsConstructorDescriptionStockTradesRequest(List<String> symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String asof, StockHistoricalFeed feed, String currency, String pageToken, Sort sort) Creates an instance of aStockTradesRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasof()Returns the value of theasofrecord component.static StockTradesRequest.Builderbuilder()Returns a builder for historical stock-trades parameters.currency()Returns the value of thecurrencyrecord component.end()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.feed()Returns the value of thefeedrecord component.final inthashCode()Returns a hash code value for this object.limit()Returns the value of thelimitrecord component.Returns the value of thepageTokenrecord component.sort()Returns the value of thesortrecord component.start()Returns the value of thestartrecord component.symbols()Returns the requested symbols as an immutable snapshot.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StockTradesRequest
public StockTradesRequest(List<String> symbols, OffsetDateTime start, OffsetDateTime end, Integer limit, String asof, StockHistoricalFeed feed, String currency, String pageToken, Sort sort) Creates an instance of aStockTradesRequestrecord class.- Parameters:
symbols- the value for thesymbolsrecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentlimit- the value for thelimitrecord componentasof- the value for theasofrecord componentfeed- the value for thefeedrecord componentcurrency- the value for thecurrencyrecord componentpageToken- the value for thepageTokenrecord componentsort- the value for thesortrecord component
-
-
Method Details
-
builder
Returns a builder for historical stock-trades parameters. -
symbols
Returns the requested symbols as an immutable snapshot. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
asof
Returns the value of theasofrecord component.- Returns:
- the value of the
asofrecord component
-
feed
Returns the value of thefeedrecord component.- Returns:
- the value of the
feedrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
pageToken
Returns the value of thepageTokenrecord component.- Returns:
- the value of the
pageTokenrecord component
-
sort
Returns the value of thesortrecord component.- Returns:
- the value of the
sortrecord component
-