Package markets.alpaca.client.trading
Record Class ListOrdersRequest
java.lang.Object
java.lang.Record
markets.alpaca.client.trading.ListOrdersRequest
public record ListOrdersRequest(String status, Integer limit, String after, String until, String direction, Boolean nested, String symbols, String side, List<String> assetClasses, String beforeOrderId, String afterOrderId)
extends Record
Named parameters for the Trading API
GET /v2/orders endpoint.
Unset fields are sent as null, allowing Alpaca's API defaults to apply. The SDK
validates local constraints that are easy to violate accidentally: limit must be between
1 and 500, beforeOrderId and afterOrderId are mutually exclusive, and order-id
pagination cannot be combined with after/until time filters.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for immutableListOrdersRequestinstances.static enumSort direction for list-orders results.static enumOrder status filter accepted by the list-orders endpoint. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafter()Returns the value of theafterrecord component.Returns the value of theafterOrderIdrecord component.Returns the asset-class filter as an immutable snapshot.Returns the value of thebeforeOrderIdrecord component.static ListOrdersRequest.Builderbuilder()Returns a builder for named list-orders parameters.Returns the value of thedirectionrecord component.static ListOrdersRequestempty()Returns an empty request that uses the API defaults.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.limit()Returns the value of thelimitrecord component.nested()Returns the value of thenestedrecord component.side()Returns the value of thesiderecord component.status()Returns the value of thestatusrecord component.symbols()Returns the value of thesymbolsrecord component.final StringtoString()Returns a string representation of this record class.until()Returns the value of theuntilrecord component.
-
Constructor Details
-
ListOrdersRequest
public ListOrdersRequest(String status, Integer limit, String after, String until, String direction, Boolean nested, String symbols, String side, List<String> assetClasses, String beforeOrderId, String afterOrderId) Creates an instance of aListOrdersRequestrecord class.- Parameters:
status- the value for thestatusrecord componentlimit- the value for thelimitrecord componentafter- the value for theafterrecord componentuntil- the value for theuntilrecord componentdirection- the value for thedirectionrecord componentnested- the value for thenestedrecord componentsymbols- the value for thesymbolsrecord componentside- the value for thesiderecord componentassetClasses- the value for theassetClassesrecord componentbeforeOrderId- the value for thebeforeOrderIdrecord componentafterOrderId- the value for theafterOrderIdrecord component
-
-
Method Details
-
empty
Returns an empty request that uses the API defaults. -
builder
Returns a builder for named list-orders parameters. -
assetClasses
Returns the asset-class filter 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). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
after
Returns the value of theafterrecord component.- Returns:
- the value of the
afterrecord component
-
until
Returns the value of theuntilrecord component.- Returns:
- the value of the
untilrecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
nested
Returns the value of thenestedrecord component.- Returns:
- the value of the
nestedrecord component
-
symbols
Returns the value of thesymbolsrecord component.- Returns:
- the value of the
symbolsrecord component
-
side
Returns the value of thesiderecord component.- Returns:
- the value of the
siderecord component
-
beforeOrderId
Returns the value of thebeforeOrderIdrecord component.- Returns:
- the value of the
beforeOrderIdrecord component
-
afterOrderId
Returns the value of theafterOrderIdrecord component.- Returns:
- the value of the
afterOrderIdrecord component
-