Class StockSnapshot
java.lang.Object
markets.alpaca.client.openapi.data.model.StockSnapshot
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class StockSnapshot
extends Object
implements Serializable
A snapshot provides the latest trade, latest quote, latest minute bar, current daily bar and previous daily bar.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StockSnapshotCreate an instance of StockSnapshot given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get dailyBarGet latestQuoteGet latestTradeGet minuteBarGet prevDailyBarinthashCode()latestQuote(StockQuote latestQuote) latestTrade(StockTrade latestTrade) prevDailyBar(StockBar prevDailyBar) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetDailyBar(StockBar dailyBar) voidsetLatestQuote(StockQuote latestQuote) voidsetLatestTrade(StockTrade latestTrade) voidsetMinuteBar(StockBar minuteBar) voidsetPrevDailyBar(StockBar prevDailyBar) toJson()Convert an instance of StockSnapshot to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_DAILY_BAR
- See Also:
-
SERIALIZED_NAME_LATEST_QUOTE
- See Also:
-
SERIALIZED_NAME_LATEST_TRADE
- See Also:
-
SERIALIZED_NAME_MINUTE_BAR
- See Also:
-
SERIALIZED_NAME_PREV_DAILY_BAR
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
StockSnapshot
public StockSnapshot()
-
-
Method Details
-
dailyBar
-
getDailyBar
Get dailyBar- Returns:
- dailyBar
-
setDailyBar
-
latestQuote
-
getLatestQuote
Get latestQuote- Returns:
- latestQuote
-
setLatestQuote
-
latestTrade
-
getLatestTrade
Get latestTrade- Returns:
- latestTrade
-
setLatestTrade
-
minuteBar
-
getMinuteBar
Get minuteBar- Returns:
- minuteBar
-
setMinuteBar
-
prevDailyBar
-
getPrevDailyBar
Get prevDailyBar- Returns:
- prevDailyBar
-
setPrevDailyBar
-
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 StockSnapshot 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 StockSnapshot
-
fromJson
Create an instance of StockSnapshot given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of StockSnapshot
- Throws:
IOException- if the JSON string is invalid with respect to StockSnapshot
-
toJson
Convert an instance of StockSnapshot to an JSON string- Returns:
- JSON string
-