Documentation ¶
Index ¶
- Constants
- Variables
- func AccountActivity(client *resty.Client, accounts []*Account) (map[string][]*pvlib.Transaction, error)
- func FetchMutualFundTickerData(asset *common.Asset, page playwright.Page) error
- func FetchStockTickerData(asset *common.Asset, bearerToken string) error
- func Login(page playwright.Page) error
- func ParseAccountActivity(fidelityActivityJSON string) (trxMap map[string][]*pvlib.Transaction, err error)
- func RestyFromBrowser(context playwright.BrowserContext) (*resty.Client, error)
- func StartPlaywright(headless bool) (page playwright.Page, context playwright.BrowserContext, ...)
- func StopPlaywright(context playwright.BrowserContext, browser playwright.Browser, ...)
- type Account
- type GraphQLQuery
Constants ¶
View Source
const ( HomePageURL = `https://fidelity.com/` LoginURL = `https://digital.fidelity.com/prgw/digital/login/full-page` LogoutURL = `` /* 129-byte string literal not displayed */ SummaryURL = `https://digital.fidelity.com/ftgw/digital/portfolio/summary` ActivityURL = `https://digital.fidelity.com/ftgw/digital/portfolio/activity` GraphQLURL = `https://digital.fidelity.com/ftgw/digital/portfolio/api/graphql` QuoteURL = `https://digital.fidelity.com/prgw/digital/research/quote/dashboard/summary?symbol=%s` MarketDataURL = `https://api.markitdigital.com/xref/v1/symbols/%s` CUSIPURL = `` /* 163-byte string literal not displayed */ )
Variables ¶
View Source
var ( GQLGetContext = `` /* 7389-byte string literal not displayed */ GQLGetAcctFeatureContext = `` /* 1341-byte string literal not displayed */ GQLGetTransactions = `` /* 3310-byte string literal not displayed */ )
View Source
var (
ErrBadHTTPResponse = errors.New("bad HTTP response")
)
View Source
var (
ErrInvalidResponseCode = errors.New("invalid status code returned from activity graph QL")
)
Functions ¶
func AccountActivity ¶
func AccountActivity(client *resty.Client, accounts []*Account) (map[string][]*pvlib.Transaction, error)
func FetchStockTickerData ¶
func Login ¶
func Login(page playwright.Page) error
Login checks if the current session is expired; if it is login
func ParseAccountActivity ¶
func ParseAccountActivity(fidelityActivityJSON string) (trxMap map[string][]*pvlib.Transaction, err error)
ParseAccountActivity reads a json string with account activity downloaded from Fidelity
func RestyFromBrowser ¶
func RestyFromBrowser(context playwright.BrowserContext) (*resty.Client, error)
func StartPlaywright ¶
func StartPlaywright(headless bool) (page playwright.Page, context playwright.BrowserContext, browser playwright.Browser, pw *playwright.Playwright)
StartPlaywright starts the playwright server and browser, it then creates a new context and page with the stealth extensions loaded
func StopPlaywright ¶
func StopPlaywright(context playwright.BrowserContext, browser playwright.Browser, pw *playwright.Playwright)
Types ¶
type Account ¶
type Account struct { AccountNumber string `json:"acctNum"` AccountType string `json:"acctType"` AccountSubType string `json:"acctSubType"` AccountSubTypeDescription string `json:"acctSubTypeDesc"` Name string `json:"name"` BorrowFullyPaidCode string `json:"borrowFullyPaidCode"` RegTypeDescription string `json:"regTypeDesc"` IsMultiCurrencyAllowed bool `json:"isMultiCurrencyAllowed"` RelationshipRoleTypeCode string `json:"relRoleTypeCode"` CostBasisCode *string `json:"costBasisCode"` IsTradable bool `json:"isTradable"` SystemOfRecord *string `json:"sysOfRcd"` BillPayEnrolled bool `json:"billPayEnrolled"` }
func GetAccounts ¶
Click to show internal directories.
Click to hide internal directories.