Finished types for AccountBalance sub-structure
This commit is contained in:
parent
a383a0535c
commit
42983aedfb
2
main.go
2
main.go
@ -49,5 +49,5 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("%s\n", b)
|
fmt.Printf("%s\n", b)
|
||||||
fmt.Printf("%s\n", acctSummary.Accounts)
|
fmt.Printf("%s\n", acctSummary.Accounts[0].Balance.Money.AccruedInterest)
|
||||||
}
|
}
|
||||||
|
55
types.go
55
types.go
@ -20,42 +20,45 @@ type AccountSummary struct {
|
|||||||
XMLName xml.Name `xml:"accountsummary"`
|
XMLName xml.Name `xml:"accountsummary"`
|
||||||
Account int `xml:"account"`
|
Account int `xml:"account"`
|
||||||
AccountName string `xml:"accountname"`
|
AccountName string `xml:"accountname"`
|
||||||
Balance AccountBalance
|
Balance AccountBalance `xml:"accountbalance"`
|
||||||
Holdings AccountHoldings
|
Holdings AccountHoldings `xml:"accountholdings"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Securities struct {
|
type Securities struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type AccountBalance struct {
|
type AccountBalance struct {
|
||||||
Account int `xml:"accounts>accountsummary>accountbalance>account"`
|
XMLName xml.Name `xml:"accountbalance"`
|
||||||
AccountValue float64
|
Account int `xml:"account"`
|
||||||
BuyingPower BuyingPower
|
AccountValue float64 `xml:"accountvalue"`
|
||||||
FedCall int
|
BuyingPower BuyingPower `xml:"buyingpower"`
|
||||||
HouseCall int
|
FedCall int `xml:"fedcall"`
|
||||||
Money Money
|
HouseCall int `xml:"housecall"`
|
||||||
Securities Securities
|
Money Money `xml:"money"`
|
||||||
|
Securities Securities `xml:"securities"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BuyingPower struct {
|
type BuyingPower struct {
|
||||||
CashAvailableForWithdrawal float64
|
XMLName xml.Name `xml:"buyingpower"`
|
||||||
DayTrading int
|
CashAvailableForWithdrawal float64 `xml:"cashavailableforwithdrawal"`
|
||||||
EquityPercentage int
|
DayTrading int `xml:"daytrading"`
|
||||||
Options int
|
EquityPercentage int `xml:"equitypercentage"`
|
||||||
SodDayTrading int
|
Options int `xml:"options"`
|
||||||
SodOptions int
|
SodDayTrading int `xml:"soddaytrading"`
|
||||||
SodStock int
|
SodOptions int `xml:"sodoptions"`
|
||||||
Stock int
|
SodStock int `xml:"sodstock"`
|
||||||
|
Stock int `xml:"stock"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Money struct {
|
type Money struct {
|
||||||
AccruedInterest float64
|
XMLName xml.Name `xml:"money"`
|
||||||
Cash float64
|
AccruedInterest float64 `xml:"accruedinterest"`
|
||||||
CashAvailable float64
|
Cash float64 `xml:"cash"`
|
||||||
MarginBalance int
|
CashAvailable float64 `xml:"cashavailable"`
|
||||||
Mmf int
|
MarginBalance float64 `xml:"marginbalance"`
|
||||||
Total int
|
Mmf float64 `xml:"mnf"`
|
||||||
UnclearedDeposits float64
|
Total float64 `xml:"total"`
|
||||||
UnsettledFunds float64
|
UnclearedDeposits float64 `xml:"uncleareddeposits"`
|
||||||
Yield float64
|
UnsettledFunds float64 `xml:"unsettledfunds"`
|
||||||
|
Yield float64 `xml:"yield"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user