Class Activity
java.lang.Object
markets.alpaca.client.openapi.broker.model.Activity
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class Activity
extends Object
implements Serializable
Base for activity types
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumValid only for non-trading activity types.static enumValid only for trading activity types. -
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 Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivitySubType(String activitySubType) activityType(ActivityType activityType) createdAt(OffsetDateTime createdAt) cumQty(BigDecimal cumQty) description(String description) booleanstatic ActivityCreate an instance of Activity given an JSON stringGet accountIdRepresents a more specific classification to the `activity_type`.Get activityTypeReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Valid only for non-trading activity types.Valid only for trading activity types.Currency denomination of the activity.getCusip()Valid only for non-trading activity types.getDate()Valid only for non-trading activity types.Valid only for non-trading activity types.ID used to link activities who share a sibling relationshipgetId()Get idValid only for trading activity types.Valid only for non-trading activity types.Valid only for trading activity types.Get orderStatusValid only for non-trading activity types.getPrice()Valid only for trading activity types.getQty()Valid only for non-trading activity types.getSide()Get sideValid only for non-trading activity types.Valid only for non-trading activity types.Valid only for trading activity types.getType()Valid only for trading activity types.inthashCode()leavesQty(BigDecimal leavesQty) netAmount(BigDecimal netAmount) orderStatus(OrderStatus orderStatus) perShareAmount(BigDecimal perShareAmount) price(BigDecimal price) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.qty(BigDecimal qty) voidsetAccountId(UUID accountId) voidsetActivitySubType(String activitySubType) voidsetActivityType(ActivityType activityType) voidsetCreatedAt(OffsetDateTime createdAt) voidsetCumQty(BigDecimal cumQty) voidsetCurrency(String currency) voidvoidvoidsetDescription(String description) voidsetGroupId(UUID groupId) voidvoidsetLeavesQty(BigDecimal leavesQty) voidsetNetAmount(BigDecimal netAmount) voidsetOrderId(UUID orderId) voidsetOrderStatus(OrderStatus orderStatus) voidsetPerShareAmount(BigDecimal perShareAmount) voidsetPrice(BigDecimal price) voidsetQty(BigDecimal qty) voidvoidsetStatus(Activity.StatusEnum status) voidvoidsetTransactionTime(OffsetDateTime transactionTime) voidsetType(Activity.TypeEnum type) status(Activity.StatusEnum status) toJson()Convert an instance of Activity to an JSON stringtoString()transactionTime(OffsetDateTime transactionTime) type(Activity.TypeEnum type) 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_ACTIVITY_TYPE
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_CUM_QTY
- See Also:
-
SERIALIZED_NAME_LEAVES_QTY
- See Also:
-
SERIALIZED_NAME_ORDER_ID
- See Also:
-
SERIALIZED_NAME_ORDER_STATUS
- See Also:
-
SERIALIZED_NAME_PRICE
- See Also:
-
SERIALIZED_NAME_QTY
- See Also:
-
SERIALIZED_NAME_SIDE
- See Also:
-
SERIALIZED_NAME_SYMBOL
- See Also:
-
SERIALIZED_NAME_TRANSACTION_TIME
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_ACTIVITY_SUB_TYPE
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_CURRENCY
- See Also:
-
SERIALIZED_NAME_CUSIP
- See Also:
-
SERIALIZED_NAME_DATE
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_GROUP_ID
- See Also:
-
SERIALIZED_NAME_NET_AMOUNT
- See Also:
-
SERIALIZED_NAME_PER_SHARE_AMOUNT
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Activity
public Activity()
-
-
Method Details
-
accountId
-
getAccountId
Get accountId- Returns:
- accountId
-
setAccountId
-
activityType
-
getActivityType
Get activityType- Returns:
- activityType
-
setActivityType
-
id
-
getId
Get id- Returns:
- id
-
setId
-
cumQty
-
getCumQty
Valid only for trading activity types. Null for non-trading activites.- Returns:
- cumQty
-
setCumQty
-
leavesQty
-
getLeavesQty
Valid only for trading activity types. Null for non-trading activites.- Returns:
- leavesQty
-
setLeavesQty
-
orderId
-
getOrderId
Valid only for trading activity types. Null for non-trading activites.- Returns:
- orderId
-
setOrderId
-
orderStatus
-
getOrderStatus
Get orderStatus- Returns:
- orderStatus
-
setOrderStatus
-
price
-
getPrice
Valid only for trading activity types. Null for non-trading activites.- Returns:
- price
-
setPrice
-
qty
-
getQty
Valid only for non-trading activity types. Null for trading activites.- Returns:
- qty
-
setQty
-
side
-
getSide
Get side- Returns:
- side
-
setSide
-
symbol
-
getSymbol
Valid only for non-trading activity types. Null for trading activites.- Returns:
- symbol
-
setSymbol
-
transactionTime
-
getTransactionTime
Valid only for trading activity types. Null for non-trading activites.- Returns:
- transactionTime
-
setTransactionTime
-
type
-
getType
Valid only for trading activity types. Null for non-trading activites.- Returns:
- type
-
setType
-
activitySubType
-
getActivitySubType
Represents a more specific classification to the `activity_type`. This field is optional and may not always be populated, depending on the activity type and the available data. Each `activity_type` has a set of valid `activity_sub_type` values. Full mapping of `activity_type` to `activity_sub_type`: - **DIV**: Dividend activity sub-types: - **CDIV**: Cash Dividend - **SDIV**: Stock Dividend - **SPD**: Substitute Payment In Lieu Of Dividend - **FEE**: Fee-related activity sub-types: - **REG**: Regulatory Fee - **TAF**: Trading Activity Fee - **LCT**: Local Currency Trading Fee - **ORF**: Options Regulatory Fee - **OCC**: Options Clearing Corporation Fee - **NRC**: Non-Retail Commission Fee - **NRV**: Non-Retail Venue Fee - **COM**: Commission - **CAT**: Consolidated Audit Trail Fee - **INT**: Interest-related activity sub-types: - **MGN**: Margin Interest - **CDT**: Credit Interest - **SWP**: Sweep Interest - **QII**: Qualified Interest - **MA**: Merger and Acquisition activity sub-types: - **CMA**: Cash Merger - **SMA**: Stock Merger - **SCMA**: Stock & Cash Merger - **NC**: Name Change activity sub types - **SNC**: Symbol Name Change - **CNC**: CUSIP Name Change - **SCNC**: Symbol & CUSIP Name Change - **OPCA**: Option Corporate Action activity sub-types: - **DIV.CDIV**: Cash Dividend - **DIV.SDIV**: Stock Dividend - **MA.CMA**: Cash Merger - **MA.SMA**: Stock Merger - **MA.SCMA**: Stock & Cash Merger - **NC.CNC**: CUSIP Name Change - **NC.SNC**: Symbol Name Change - **NC.SCNC**: Symbol & CUSIP Name Change - **SPIN**: Spin-off - **SPLIT.FSPLIT**: Forward Stock Split - **SPLIT.RSPLIT**: Reverse Stock Split - **SPLIT.USPLIT**: Unit Split - **REORG**: Reorganization activity sub-types: - **WRM**: Worthless Removal - **SPLIT**: Stock Split activity sub-types: - **FSPLIT**: Forward Stock Split - **RSPLIT**: Reverse Stock Split - **USPLIT**: Unit Split - **VOF**: Voluntary Offering activity sub-types: - **VTND**: Tender Offer - **VWRT**: Warrant Exercise - **VRGT**: Rights Offer - **VEXH**: Exchange Offer - **WH**: Withholding activity sub-types: - **SWH**: State Withholding - **FWH**: Federal Withholding - **SLWH**: Sales Withholding- Returns:
- activitySubType
-
setActivitySubType
-
createdAt
-
getCreatedAt
Valid only for non-trading activity types. Null for trading activites.- Returns:
- createdAt
-
setCreatedAt
-
currency
-
getCurrency
Currency denomination of the activity. USD by default.- Returns:
- currency
-
setCurrency
-
cusip
-
getCusip
Valid only for non-trading activity types. Null for trading activites.- Returns:
- cusip
-
setCusip
-
date
-
getDate
Valid only for non-trading activity types. Null for trading activites.- Returns:
- date
-
setDate
-
description
-
getDescription
Valid only for non-trading activity types. Null for trading activites.- Returns:
- description
-
setDescription
-
groupId
-
getGroupId
ID used to link activities who share a sibling relationship- Returns:
- groupId
-
setGroupId
-
netAmount
-
getNetAmount
Valid only for non-trading activity types. Null for trading activites.- Returns:
- netAmount
-
setNetAmount
-
status
-
getStatus
Valid only for non-trading activity types. Null for trading activites.- Returns:
- status
-
setStatus
-
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 Activity 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 Activity
-
fromJson
Create an instance of Activity given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Activity
- Throws:
IOException- if the JSON string is invalid with respect to Activity
-
toJson
Convert an instance of Activity to an JSON string- Returns:
- JSON string
-