NAME

Finance::Alpaca::Struct::Activity - A Single Account Activity Object

SYNOPSIS

    use Finance::Alpaca;
    for my $activity (Finance::Alpaca->new( ... )->activities( activity_types => [qw[ACATC ACATS]] )) {
        say sprintf '%s @ %f', $activity->symbol, $activity->net_amount
    }

DESCRIPTION

The account activities API provides access to a historical record of transaction activities that have impacted your account. Trade execution activities and non-trade activities, such as dividend payments, are both reported through this endpoint. See the bottom of this page for a full list of the types of activities that may be reported.

Properties

The following properties are contained in the object.

    for my $activity ($camelia->activities()) {
        say $activity->symbol;
    }
id - An ID for the activity, always in “::” format. Can be sent as page_token in requests to facilitate the paging of results.
activity_type - See below for a list of possible values
date - The date on which the activity occurred or on which the transaction associated with the activity settled as a Time::Moment object
net_amount - The net amount of money (positive or negative) associated with the activity
symbol - The symbol of the security involved with the activity. Not present for all activity types
qty - For dividend activities, the number of shares that contributed to the payment. Not present for other activity types
per_share_amount - For dividend activities, the average amount paid per share. Not present for other activity types

Activity Types

FILL - Order fills (both partial and full fills)
TRANS - Cash transactions (both CSD and CSW)
MISC - Miscellaneous or rarely used activity types (All types except those in TRANS, DIV, or FILL)
ACATC - ACATS IN/OUT (Cash)
ACATS - ACATS IN/OUT (Securities)
CSD - Cash deposit(+)
CSW - Cash withdrawal(-)
DIV - Dividends
DIVCGL - Dividend (capital gain long term)
DIVCGS - Dividend (capital gain short term)
DIVFEE - Dividend fee
DIVFT - Dividend adjusted (Foreign Tax Withheld)
DIVNRA - Dividend adjusted (NRA Withheld)
DIVROC - Dividend return of capital
DIVTW - Dividend adjusted (Tefra Withheld)
DIVTXEX - Dividend (tax exempt)
INT - Interest (credit/margin)
INTNRA - Interest adjusted (NRA Withheld)
INTTW - Interest adjusted (Tefra Withheld)
JNL - Journal entry
JNLC - Journal entry (cash)
JNLS - Journal entry (stock)
MA - Merger/Acquisition
NC - Name change
OPASN - Option assignment
OPEXP - Option expiration
OPXRC - Option exercise
PTC - Pass Thru Charge
PTR - Pass Thru Rebate
REORG - Reorg CA
SC - Symbol change
SSO - Stock spinoff
SSP - Stock split

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.

AUTHOR

Sanko Robinson <sanko@cpan.org>