Class Assets
java.lang.Object
markets.alpaca.client.openapi.trading.model.Assets
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class Assets
extends Object
implements Serializable
The assets API serves as the master list of assets available for trade and data consumption from Alpaca. Assets are sorted by asset class, exchange and symbol. Some assets are only available for data consumption via Polygon, and are not tradable with Alpaca. These assets will be marked with the flag tradable=false.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumBorrow status for US equity assets.static classstatic enumactive or inactive -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttributesItem(AssetAttribute attributesItem) attributes(List<AssetAttribute> attributes) borrowStatus(Assets.BorrowStatusEnum borrowStatus) easyToBorrow(Boolean easyToBorrow) Deprecated.booleanfractionable(Boolean fractionable) static AssetsCreate an instance of Assets given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get attributesBorrow status for US equity assets.getCusip()The CUSIP identifier for the asset (US Equities only).Deprecated.Get exchangeAsset is fractionable or notgetId()Asset IDDeprecated.Asset is marginable or notThe margin requirement percentage for the asset's long positions (equities only).The margin requirement percentage for the asset's short positions (equities only).Minimum order size.Amount a trade quantity can be incremented by.getName()The official name of the assetAmount the price can be incremented by.Get propertyClassAsset is shortable or notactive or inactiveThe symbol of the assetAsset is tradable on Alpaca or notinthashCode()maintenanceMarginRequirement(BigDecimal maintenanceMarginRequirement) Deprecated.marginable(Boolean marginable) marginRequirementLong(String marginRequirementLong) marginRequirementShort(String marginRequirementShort) minOrderSize(BigDecimal minOrderSize) minTradeIncrement(BigDecimal minTradeIncrement) priceIncrement(BigDecimal priceIncrement) propertyClass(AssetClass propertyClass) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetAttributes(List<AssetAttribute> attributes) voidsetBorrowStatus(Assets.BorrowStatusEnum borrowStatus) voidvoidsetEasyToBorrow(Boolean easyToBorrow) Deprecated.voidsetExchange(Exchange exchange) voidsetFractionable(Boolean fractionable) voidvoidsetMaintenanceMarginRequirement(BigDecimal maintenanceMarginRequirement) Deprecated.voidsetMarginable(Boolean marginable) voidsetMarginRequirementLong(String marginRequirementLong) voidsetMarginRequirementShort(String marginRequirementShort) voidsetMinOrderSize(BigDecimal minOrderSize) voidsetMinTradeIncrement(BigDecimal minTradeIncrement) voidvoidsetPriceIncrement(BigDecimal priceIncrement) voidsetPropertyClass(AssetClass propertyClass) voidsetShortable(Boolean shortable) voidsetStatus(Assets.StatusEnum status) voidvoidsetTradable(Boolean tradable) status(Assets.StatusEnum status) toJson()Convert an instance of Assets 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_ATTRIBUTES
- See Also:
-
SERIALIZED_NAME_BORROW_STATUS
- See Also:
-
SERIALIZED_NAME_PROPERTY_CLASS
- See Also:
-
SERIALIZED_NAME_CUSIP
- See Also:
-
SERIALIZED_NAME_EASY_TO_BORROW
- See Also:
-
SERIALIZED_NAME_EXCHANGE
- See Also:
-
SERIALIZED_NAME_FRACTIONABLE
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_MAINTENANCE_MARGIN_REQUIREMENT
- See Also:
-
SERIALIZED_NAME_MARGIN_REQUIREMENT_LONG
- See Also:
-
SERIALIZED_NAME_MARGIN_REQUIREMENT_SHORT
- See Also:
-
SERIALIZED_NAME_MARGINABLE
- See Also:
-
SERIALIZED_NAME_MIN_ORDER_SIZE
- See Also:
-
SERIALIZED_NAME_MIN_TRADE_INCREMENT
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_PRICE_INCREMENT
- See Also:
-
SERIALIZED_NAME_SHORTABLE
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_SYMBOL
- See Also:
-
SERIALIZED_NAME_TRADABLE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Assets
public Assets()
-
-
Method Details
-
attributes
-
addAttributesItem
-
getAttributes
Get attributes- Returns:
- attributes
-
setAttributes
-
borrowStatus
-
getBorrowStatus
Borrow status for US equity assets. This field is omitted for non-US-equity assets.- Returns:
- borrowStatus
-
setBorrowStatus
-
propertyClass
-
getPropertyClass
Get propertyClass- Returns:
- propertyClass
-
setPropertyClass
-
cusip
-
getCusip
The CUSIP identifier for the asset (US Equities only). To request a specific CUSIP, please reach out to Alpaca support.- Returns:
- cusip
-
setCusip
-
easyToBorrow
Deprecated. -
getEasyToBorrow
Deprecated.**deprecated**: Please use borrow_status instead. Asset is easy-to-borrow or not (filtering for easy_to_borrow = True is the best way to check whether the name is currently available to short at Alpaca).- Returns:
- easyToBorrow
-
setEasyToBorrow
Deprecated. -
exchange
-
getExchange
Get exchange- Returns:
- exchange
-
setExchange
-
fractionable
-
getFractionable
Asset is fractionable or not- Returns:
- fractionable
-
setFractionable
-
id
-
getId
Asset ID- Returns:
- id
-
setId
-
maintenanceMarginRequirement
@Deprecated public Assets maintenanceMarginRequirement(@Nullable BigDecimal maintenanceMarginRequirement) Deprecated. -
getMaintenanceMarginRequirement
Deprecated.**deprecated**: Please use margin_requirement_long or margin_requirement_short instead. Note that these fields are of type string. Shows the margin requirement percentage for the asset (equities only).- Returns:
- maintenanceMarginRequirement
-
setMaintenanceMarginRequirement
@Deprecated public void setMaintenanceMarginRequirement(@Nullable BigDecimal maintenanceMarginRequirement) Deprecated. -
marginRequirementLong
-
getMarginRequirementLong
The margin requirement percentage for the asset's long positions (equities only).- Returns:
- marginRequirementLong
-
setMarginRequirementLong
-
marginRequirementShort
-
getMarginRequirementShort
The margin requirement percentage for the asset's short positions (equities only).- Returns:
- marginRequirementShort
-
setMarginRequirementShort
-
marginable
-
getMarginable
Asset is marginable or not- Returns:
- marginable
-
setMarginable
-
minOrderSize
-
getMinOrderSize
Minimum order size. Field available for crypto only.- Returns:
- minOrderSize
-
setMinOrderSize
-
minTradeIncrement
-
getMinTradeIncrement
Amount a trade quantity can be incremented by. Field available for crypto only.- Returns:
- minTradeIncrement
-
setMinTradeIncrement
-
name
-
getName
The official name of the asset- Returns:
- name
-
setName
-
priceIncrement
-
getPriceIncrement
Amount the price can be incremented by. Field available for crypto only.- Returns:
- priceIncrement
-
setPriceIncrement
-
shortable
-
getShortable
Asset is shortable or not- Returns:
- shortable
-
setShortable
-
status
-
getStatus
active or inactive- Returns:
- status
-
setStatus
-
symbol
-
getSymbol
The symbol of the asset- Returns:
- symbol
-
setSymbol
-
tradable
-
getTradable
Asset is tradable on Alpaca or not- Returns:
- tradable
-
setTradable
-
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 Assets 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 Assets
-
fromJson
Create an instance of Assets given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Assets
- Throws:
IOException- if the JSON string is invalid with respect to Assets
-
toJson
Convert an instance of Assets to an JSON string- Returns:
- JSON string
-