Class Watchlist
java.lang.Object
markets.alpaca.client.openapi.trading.model.Watchlist
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class Watchlist
extends Object
implements Serializable
The watchlist API provides CRUD operation for the account's watchlist. An account can have multiple watchlists and each is uniquely identified by id but can also be addressed by user-defined name. Each watchlist is an ordered list of assets.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssetsItem(Assets assetsItem) createdAt(OffsetDateTime createdAt) booleanstatic WatchlistCreate an instance of Watchlist given an JSON stringaccount IDReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.the content of this watchlist, in the order as registered by the clientGet createdAtgetId()watchlist idgetName()user-defined watchlist name (up to 64 characters)Get updatedAtinthashCode()putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetAccountId(UUID accountId) voidvoidsetCreatedAt(OffsetDateTime createdAt) voidvoidvoidsetUpdatedAt(OffsetDateTime updatedAt) toJson()Convert an instance of Watchlist to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ACCOUNT_ID
- See Also:
-
SERIALIZED_NAME_ASSETS
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Watchlist
public Watchlist()
-
-
Method Details
-
accountId
-
getAccountId
account ID- Returns:
- accountId
-
setAccountId
-
assets
-
addAssetsItem
-
getAssets
the content of this watchlist, in the order as registered by the client- Returns:
- assets
-
setAssets
-
createdAt
-
getCreatedAt
Get createdAt- Returns:
- createdAt
-
setCreatedAt
-
id
-
getId
watchlist id- Returns:
- id
-
setId
-
name
-
getName
user-defined watchlist name (up to 64 characters)- Returns:
- name
-
setName
-
updatedAt
-
getUpdatedAt
Get updatedAt- Returns:
- updatedAt
-
setUpdatedAt
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the Watchlist instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to Watchlist
-
fromJson
Create an instance of Watchlist given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Watchlist
- Throws:
IOException- if the JSON string is invalid with respect to Watchlist
-
toJson
Convert an instance of Watchlist to an JSON string- Returns:
- JSON string
-