Documentation ¶
Index ¶
- Variables
- func IsAuthFailed(err error) bool
- func NewStatusMap(status string, keysAndValues ...string) jsonmap.JsonMap
- func NewStatusResponse(status string, keysAndValues ...string) []byte
- type ETradeClient
- type ETradeClientMock
- func (c *ETradeClientMock) Authenticate() ([]byte, error)
- func (c *ETradeClientMock) DeleteAlerts(alertIds []string) ([]byte, error)
- func (c *ETradeClientMock) GetAccountBalances(accountIdKey string, realTimeNAV bool) ([]byte, error)
- func (c *ETradeClientMock) GetKeys() (consumerKey string, consumerSecret string, accessToken string, ...)
- func (c *ETradeClientMock) GetOptionChains(symbol string, ...) ([]byte, error)
- func (c *ETradeClientMock) GetOptionExpireDates(symbol string, expiryType constants.OptionExpiryType) ([]byte, error)
- func (c *ETradeClientMock) GetQuotes(symbols []string, detailFlag constants.QuoteDetailFlag, ...) ([]byte, error)
- func (c *ETradeClientMock) ListAccounts() ([]byte, error)
- func (c *ETradeClientMock) ListAlertDetails(alertId string, htmlTags bool) ([]byte, error)
- func (c *ETradeClientMock) ListAlerts(count int, category constants.AlertCategory, status constants.AlertStatus, ...) ([]byte, error)
- func (c *ETradeClientMock) ListOrders(accountIdKey string, marker string, count int, status constants.OrderStatus, ...) ([]byte, error)
- func (c *ETradeClientMock) ListPositionLotsDetails(accountIdKey string, positionId int64) ([]byte, error)
- func (c *ETradeClientMock) ListTransactionDetails(accountIdKey string, transactionId string) ([]byte, error)
- func (c *ETradeClientMock) ListTransactions(accountIdKey string, startDate *time.Time, endDate *time.Time, ...) ([]byte, error)
- func (c *ETradeClientMock) LookupProduct(search string) ([]byte, error)
- func (c *ETradeClientMock) Verify(verifyKey string) ([]byte, error)
- func (c *ETradeClientMock) ViewPortfolio(accountIdKey string, count int, sortBy constants.PortfolioSortBy, ...) ([]byte, error)
- type EndpointUrls
- type HttpClient
- type OAuthConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrETradeAuthFailed = errors.New("authentication failed")
Functions ¶
func IsAuthFailed ¶
func NewStatusResponse ¶
Types ¶
type ETradeClient ¶
type ETradeClient interface { Authenticate() ([]byte, error) Verify(verifyKey string) ([]byte, error) GetKeys() (consumerKey string, consumerSecret string, accessToken string, accessSecret string) ListAccounts() ([]byte, error) GetAccountBalances(accountIdKey string, realTimeNAV bool) ([]byte, error) ListTransactions( accountIdKey string, startDate *time.Time, endDate *time.Time, sortOrder constants.SortOrder, marker string, count int, ) ([]byte, error) ListTransactionDetails(accountIdKey string, transactionId string) ([]byte, error) ViewPortfolio( accountIdKey string, count int, sortBy constants.PortfolioSortBy, sortOrder constants.SortOrder, pageNumber string, marketSession constants.MarketSession, totalsRequired bool, lotsRequired bool, view constants.PortfolioView, ) ([]byte, error) ListPositionLotsDetails(accountIdKey string, positionId int64) ([]byte, error) ListAlerts( count int, category constants.AlertCategory, status constants.AlertStatus, sort constants.SortOrder, search string, ) ([]byte, error) ListAlertDetails(alertId string, htmlTags bool) ([]byte, error) DeleteAlerts(alertIds []string) ([]byte, error) GetQuotes( symbols []string, detailFlag constants.QuoteDetailFlag, requireEarningsDate bool, skipMiniOptionsCheck bool, ) ([]byte, error) LookupProduct(search string) ([]byte, error) GetOptionChains( symbol string, expiryYear int, expiryMonth int, expiryDay int, strikePriceNear int, noOfStrikes int, includeWeekly bool, skipAdjusted bool, optionCategory constants.OptionCategory, chainType constants.OptionChainType, priceType constants.OptionPriceType, ) ([]byte, error) GetOptionExpireDates(symbol string, expiryType constants.OptionExpiryType) ([]byte, error) ListOrders( accountIdKey string, marker string, count int, status constants.OrderStatus, fromDate *time.Time, toDate *time.Time, symbols []string, securityType constants.OrderSecurityType, transactionType constants.OrderTransactionType, marketSession constants.MarketSession, ) ([]byte, error) }
type ETradeClientMock ¶
func (*ETradeClientMock) Authenticate ¶
func (c *ETradeClientMock) Authenticate() ([]byte, error)
func (*ETradeClientMock) DeleteAlerts ¶
func (c *ETradeClientMock) DeleteAlerts(alertIds []string) ([]byte, error)
func (*ETradeClientMock) GetAccountBalances ¶
func (c *ETradeClientMock) GetAccountBalances(accountIdKey string, realTimeNAV bool) ([]byte, error)
func (*ETradeClientMock) GetKeys ¶
func (c *ETradeClientMock) GetKeys() ( consumerKey string, consumerSecret string, accessToken string, accessSecret string, )
func (*ETradeClientMock) GetOptionChains ¶
func (c *ETradeClientMock) GetOptionChains( symbol string, expiryYear, expiryMonth, expiryDay, strikePriceNear, noOfStrikes int, includeWeekly, skipAdjusted bool, optionCategory constants.OptionCategory, chainType constants.OptionChainType, priceType constants.OptionPriceType, ) ([]byte, error)
func (*ETradeClientMock) GetOptionExpireDates ¶
func (c *ETradeClientMock) GetOptionExpireDates(symbol string, expiryType constants.OptionExpiryType) ([]byte, error)
func (*ETradeClientMock) GetQuotes ¶
func (c *ETradeClientMock) GetQuotes( symbols []string, detailFlag constants.QuoteDetailFlag, requireEarningsDate bool, skipMiniOptionsCheck bool, ) ([]byte, error)
func (*ETradeClientMock) ListAccounts ¶
func (c *ETradeClientMock) ListAccounts() ([]byte, error)
func (*ETradeClientMock) ListAlertDetails ¶
func (c *ETradeClientMock) ListAlertDetails(alertId string, htmlTags bool) ([]byte, error)
func (*ETradeClientMock) ListAlerts ¶
func (c *ETradeClientMock) ListAlerts( count int, category constants.AlertCategory, status constants.AlertStatus, sort constants.SortOrder, search string, ) ([]byte, error)
func (*ETradeClientMock) ListOrders ¶
func (c *ETradeClientMock) ListOrders( accountIdKey string, marker string, count int, status constants.OrderStatus, fromDate *time.Time, toDate *time.Time, symbols []string, securityType constants.OrderSecurityType, transactionType constants.OrderTransactionType, marketSession constants.MarketSession, ) ([]byte, error)
func (*ETradeClientMock) ListPositionLotsDetails ¶
func (c *ETradeClientMock) ListPositionLotsDetails(accountIdKey string, positionId int64) ([]byte, error)
func (*ETradeClientMock) ListTransactionDetails ¶
func (c *ETradeClientMock) ListTransactionDetails(accountIdKey string, transactionId string) ([]byte, error)
func (*ETradeClientMock) ListTransactions ¶
func (*ETradeClientMock) LookupProduct ¶
func (c *ETradeClientMock) LookupProduct(search string) ([]byte, error)
func (*ETradeClientMock) Verify ¶
func (c *ETradeClientMock) Verify(verifyKey string) ([]byte, error)
func (*ETradeClientMock) ViewPortfolio ¶
func (c *ETradeClientMock) ViewPortfolio( accountIdKey string, count int, sortBy constants.PortfolioSortBy, sortOrder constants.SortOrder, pageNumber string, marketSession constants.MarketSession, totalsRequired bool, lotsRequired bool, view constants.PortfolioView, ) ([]byte, error)
type EndpointUrls ¶
type EndpointUrls interface { GetRequestTokenUrl() string AuthorizeApplicationUrl() string GetAccessTokenUrl() string RenewAccessTokenUrl() string RevokeAccessTokenUrl() string ListAccountsUrl() string GetAccountBalancesUrl(accountIdKey string) string ListTransactionsUrl(accountIdKey string) string ListTransactionDetailsUrl(accountIdKey string, transactionId string) string ViewPortfolioUrl(accountIdKey string) string ListPositionLotsDetailsUrl(accountIdKey string, positionId int64) string ListAlertsUrl() string ListAlertDetailsUrl(alertId string) string DeleteAlertUrl(alertIdList string) string GetQuotesUrl(symbols string) string LookUpProductUrl(search string) string GetOptionChainsUrl() string GetOptionExpireDatesUrl() string ListOrdersUrl(accountIdKey string) string PreviewOrderUrl(accountIdKey string) string PlaceOrderUrl(accountIdKey string) string CancelOrderUrl(accountIdKey string) string ChangePreviewedOrderUrl(accountIdKey string, orderId string) string PlaceChangedOrderUrl(accountIdKey string, orderId string) string }
func GetEndpointUrls ¶
func GetEndpointUrls(production bool) EndpointUrls
type OAuthConfig ¶
type OAuthConfig interface { Client(ctx context.Context, t *oauth1.Token) *http.Client RequestToken() (requestToken, requestSecret string, err error) AuthorizationURL(requestToken string) (*url.URL, error) AccessToken(requestToken, requestSecret, verifier string) (accessToken, accessSecret string, err error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.