Documentation ¶
Index ¶
- Constants
- func NewNormalizedJsonMap(responseBytes []byte) (jsonmap.JsonMap, error)
- type ETradeAccount
- type ETradeAccountList
- type ETradeAlert
- type ETradeAlertDetails
- type ETradeAlertList
- type ETradeAuthenticationStatus
- type ETradeBalances
- type ETradeDeleteAlerts
- type ETradeLookupResult
- type ETradeLookupResultList
- type ETradeOptionChainPair
- type ETradeOptionChainPairList
- type ETradeOptionExpireDate
- type ETradeOptionExpireDateList
- type ETradeOrder
- type ETradeOrderList
- type ETradePosition
- type ETradePositionList
- type ETradeQuote
- type ETradeQuoteList
- type ETradeStatus
- type ETradeTransaction
- type ETradeTransactionDetails
- type ETradeTransactionList
Constants ¶
const ( // DeleteAlertsStatusKey is the key for the status DeleteAlertsStatusKey = "status" // DeleteAlertsErrorKey is the key for the error message DeleteAlertsErrorKey = "error" // DeleteAlertsFailedAlertsKey is the key for a slice of failed // alert IDs DeleteAlertsFailedAlertsKey = "failedAlerts" )
const ( // OptionChainPairListOptionChainPairsPath is the path to a slice of optionChainPairs. OptionChainPairListOptionChainPairsPath = ".optionChainPairs" // OptionChainPairListTimeStampPath is the path to timestamp. OptionChainPairListTimeStampPath = ".timeStamp" // OptionChainPairListQuoteTypePath is the path to quote type. OptionChainPairListQuoteTypePath = ".quoteType" // OptionChainPairListNearPricePath is the path to near price. OptionChainPairListNearPricePath = ".nearPrice" // OptionChainPairListSelectedEDPath is the path to selectedED map. OptionChainPairListSelectedEDPath = ".selectedED" )
const ( // PositionsListPositionsPath is the path to a slice of positions. PositionsListPositionsPath = ".positions" // PositionsListTotalsPath is the path to a map of totals info PositionsListTotalsPath = ".totals" )
const ( // QuoteListQuotesPath is the path to a slice of quotes. QuoteListQuotesPath = ".quotes" // QuoteListMessagesPath is the path to a slice of messages. QuoteListMessagesPath = ".messages" )
const (
// AccountsListAccountsPath is the path to a slice of accounts.
AccountsListAccountsPath = "accounts"
)
const (
// AlertListAlertsPath is the path to a slice of alerts.
AlertListAlertsPath = ".alerts"
)
const (
// LookupResultListResultsPath is the path to a slice of lookup results.
LookupResultListResultsPath = ".results"
)
const (
// OptionExpireDateListOptionExpireDatesPath is the path to a slice of optionExpireDates.
OptionExpireDateListOptionExpireDatesPath = ".optionExpireDates"
)
const ( // OrderListOrdersPath is the path to a slice of // orders. OrderListOrdersPath = ".orders" )
const (
// PositionLotsPath is the path to a slice of lots for the position.
PositionLotsPath = ".lots"
)
const (
// TransactionListTransactionsPath is the path to a slice of transactions.
TransactionListTransactionsPath = ".transactions"
)
Variables ¶
This section is empty.
Functions ¶
func NewNormalizedJsonMap ¶
NewNormalizedJsonMap returns a JsonMap representation of a JSON response from the ETrade API. It normalizes all keys in the returned map so that their first letter is lower-case. ETrade's keys are camel-cased; however, some keys are UpperCamelCase and some are lowerCamelCase. Because map keys are case-sensitive, normalizing them to lowerCamelCase helps avoid issues indexing the map.
Completely lower-casing the keys would help with other inconsistencies in ETrade's camel-casing; however, doing so would hurt key readability. The normalization should result in mostly-consistent lowerCamelCase keys, where the remaining inconsistencies stem from ETrade's choice of word boundaries (e.g. lowerCamelCase vs lowerCamelcase).
Types ¶
type ETradeAccount ¶
func CreateETradeAccount ¶
func CreateETradeAccount(id string, idKey string, jsonMap jsonmap.JsonMap) ETradeAccount
func CreateETradeAccountFromMap ¶
func CreateETradeAccountFromMap(responseMap jsonmap.JsonMap) (ETradeAccount, error)
type ETradeAccountList ¶
type ETradeAccountList interface { GetAllAccounts() []ETradeAccount GetAccountById(accountID string) ETradeAccount AsJsonMap() jsonmap.JsonMap }
func CreateETradeAccountList ¶
func CreateETradeAccountList(responseMap jsonmap.JsonMap) (ETradeAccountList, error)
func CreateETradeAccountListFromResponse ¶
func CreateETradeAccountListFromResponse(response []byte) (ETradeAccountList, error)
type ETradeAlert ¶
func CreateETradeAlert ¶
func CreateETradeAlert(responseMap jsonmap.JsonMap) (ETradeAlert, error)
type ETradeAlertDetails ¶
func CreateETradeAlertDetails ¶
func CreateETradeAlertDetails(responseMap jsonmap.JsonMap) (ETradeAlertDetails, error)
func CreateETradeAlertDetailsFromResponse ¶
func CreateETradeAlertDetailsFromResponse(response []byte) (ETradeAlertDetails, error)
type ETradeAlertList ¶
type ETradeAlertList interface { GetAllAlerts() []ETradeAlert GetAlertById(alertID int64) ETradeAlert AsJsonMap() jsonmap.JsonMap }
func CreateETradeAlertList ¶
func CreateETradeAlertList(responseMap jsonmap.JsonMap) (ETradeAlertList, error)
func CreateETradeAlertListFromResponse ¶
func CreateETradeAlertListFromResponse(response []byte) (ETradeAlertList, error)
type ETradeAuthenticationStatus ¶
type ETradeAuthenticationStatus interface { NeedAuthorization() bool GetAuthorizationUrl() string AsJsonMap() jsonmap.JsonMap }
func CreateETradeAuthenticationStatus ¶
func CreateETradeAuthenticationStatus(responseMap jsonmap.JsonMap) ( ETradeAuthenticationStatus, error, )
func CreateETradeAuthenticationStatusFromResponse ¶
func CreateETradeAuthenticationStatusFromResponse(response []byte) (ETradeAuthenticationStatus, error)
type ETradeBalances ¶
func CreateETradeBalances ¶
func CreateETradeBalances(responseMap jsonmap.JsonMap) (ETradeBalances, error)
func CreateETradeBalancesFromResponse ¶
func CreateETradeBalancesFromResponse(response []byte) (ETradeBalances, error)
type ETradeDeleteAlerts ¶
type ETradeDeleteAlerts interface { IsSuccess() bool GetFailedAlerts() []int64 AsJsonMap() jsonmap.JsonMap }
func CreateETradeDeleteAlerts ¶
func CreateETradeDeleteAlerts(responseMap jsonmap.JsonMap) (ETradeDeleteAlerts, error)
func CreateETradeDeleteAlertsFromResponse ¶
func CreateETradeDeleteAlertsFromResponse(response []byte) (ETradeDeleteAlerts, error)
type ETradeLookupResult ¶
func CreateETradeLookupResult ¶
func CreateETradeLookupResult(responseMap jsonmap.JsonMap) (ETradeLookupResult, error)
type ETradeLookupResultList ¶
type ETradeLookupResultList interface { GetAllResults() []ETradeLookupResult AsJsonMap() jsonmap.JsonMap }
func CreateETradeLookupResultList ¶
func CreateETradeLookupResultList(responseMap jsonmap.JsonMap) (ETradeLookupResultList, error)
func CreateETradeLookupResultListFromResponse ¶
func CreateETradeLookupResultListFromResponse(response []byte) (ETradeLookupResultList, error)
type ETradeOptionChainPair ¶
func CreateETradeOptionChainPair ¶
func CreateETradeOptionChainPair(responseMap jsonmap.JsonMap) (ETradeOptionChainPair, error)
type ETradeOptionChainPairList ¶
type ETradeOptionChainPairList interface { GetAllOptionChainPairs() []ETradeOptionChainPair AsJsonMap() jsonmap.JsonMap }
func CreateETradeOptionChainPairList ¶
func CreateETradeOptionChainPairList(responseMap jsonmap.JsonMap) (ETradeOptionChainPairList, error)
func CreateETradeOptionChainPairListFromResponse ¶
func CreateETradeOptionChainPairListFromResponse(response []byte) (ETradeOptionChainPairList, error)
type ETradeOptionExpireDate ¶
func CreateETradeOptionExpireDate ¶
func CreateETradeOptionExpireDate(responseMap jsonmap.JsonMap) (ETradeOptionExpireDate, error)
type ETradeOptionExpireDateList ¶
type ETradeOptionExpireDateList interface { GetAllOptionExpireDates() []ETradeOptionExpireDate AsJsonMap() jsonmap.JsonMap }
func CreateETradeOptionExpireDateList ¶
func CreateETradeOptionExpireDateList(responseMap jsonmap.JsonMap) (ETradeOptionExpireDateList, error)
func CreateETradeOptionExpireDateListFromResponse ¶
func CreateETradeOptionExpireDateListFromResponse(response []byte) (ETradeOptionExpireDateList, error)
type ETradeOrder ¶
func CreateETradeOrder ¶
func CreateETradeOrder(responseMap jsonmap.JsonMap) (ETradeOrder, error)
type ETradeOrderList ¶
type ETradeOrderList interface { GetAllOrders() []ETradeOrder GetOrderById(orderID int64) ETradeOrder NextPage() string AddPage(responseMap jsonmap.JsonMap) error AddPageFromResponse(response []byte) error AsJsonMap() jsonmap.JsonMap }
func CreateETradeOrderList ¶
func CreateETradeOrderList(responseMap jsonmap.JsonMap) (ETradeOrderList, error)
func CreateETradeOrderListFromResponse ¶
func CreateETradeOrderListFromResponse(response []byte) ( ETradeOrderList, error, )
type ETradePosition ¶
type ETradePosition interface { GetId() int64 AddLots(responseMap jsonmap.JsonMap) error AddLotsFromResponse(response []byte) error AsJsonMap() jsonmap.JsonMap }
func CreateETradePosition ¶
func CreateETradePosition(responseMap jsonmap.JsonMap) (ETradePosition, error)
type ETradePositionList ¶
type ETradePositionList interface { GetAllPositions() []ETradePosition GetPositionById(positionID int64) ETradePosition NextPage() string AddPage(responseMap jsonmap.JsonMap) error AddPageFromResponse(response []byte) error AsJsonMap() jsonmap.JsonMap }
func CreateETradePositionList ¶
func CreateETradePositionList(responseMap jsonmap.JsonMap) (ETradePositionList, error)
func CreateETradePositionListFromResponse ¶
func CreateETradePositionListFromResponse(response []byte) (ETradePositionList, error)
type ETradeQuote ¶
func CreateETradeQuote ¶
func CreateETradeQuote(responseMap jsonmap.JsonMap) (ETradeQuote, error)
type ETradeQuoteList ¶
type ETradeQuoteList interface { GetAllQuotes() []ETradeQuote AsJsonMap() jsonmap.JsonMap }
func CreateETradeQuoteList ¶
func CreateETradeQuoteList(responseMap jsonmap.JsonMap) (ETradeQuoteList, error)
func CreateETradeQuoteListFromResponse ¶
func CreateETradeQuoteListFromResponse(response []byte) (ETradeQuoteList, error)
type ETradeStatus ¶
type ETradeStatus interface { IsSuccess() bool GetErrorMessage() string AsJsonMap() jsonmap.JsonMap }
func CreateETradeStatus ¶
func CreateETradeStatus(responseMap jsonmap.JsonMap) ( ETradeStatus, error, )
func CreateETradeStatusFromResponse ¶
func CreateETradeStatusFromResponse(response []byte) (ETradeStatus, error)
type ETradeTransaction ¶
func CreateETradeTransaction ¶
func CreateETradeTransaction(responseMap jsonmap.JsonMap) (ETradeTransaction, error)
type ETradeTransactionDetails ¶
func CreateETradeTransactionDetails ¶
func CreateETradeTransactionDetails(responseMap jsonmap.JsonMap) (ETradeTransactionDetails, error)
func CreateETradeTransactionDetailsFromResponse ¶
func CreateETradeTransactionDetailsFromResponse(response []byte) (ETradeTransactionDetails, error)
type ETradeTransactionList ¶
type ETradeTransactionList interface { GetAllTransactions() []ETradeTransaction GetTransactionById(transactionID string) ETradeTransaction NextPage() string AddPage(responseMap jsonmap.JsonMap) error AddPageFromResponse(response []byte) error AsJsonMap() jsonmap.JsonMap }
func CreateETradeTransactionList ¶
func CreateETradeTransactionList(responseMap jsonmap.JsonMap) (ETradeTransactionList, error)
func CreateETradeTransactionListFromResponse ¶
func CreateETradeTransactionListFromResponse(response []byte) ( ETradeTransactionList, error, )
Source Files ¶
- etrade_account.go
- etrade_accountlist.go
- etrade_alert.go
- etrade_alertdetails.go
- etrade_alertlist.go
- etrade_authentication_status.go
- etrade_balances.go
- etrade_delete_alerts.go
- etrade_lookupresult.go
- etrade_lookupresultlist.go
- etrade_optionchainpair.go
- etrade_optionchainpairlist.go
- etrade_optionexpiredate.go
- etrade_optionexpiredatelist.go
- etrade_order.go
- etrade_orderlist.go
- etrade_position.go
- etrade_positionlist.go
- etrade_quote.go
- etrade_quotelist.go
- etrade_status.go
- etrade_transaction.go
- etrade_transactiondetails.go
- etrade_transactionlist.go
- normalized_json_map.go