Versions in this module Expand all Collapse all v0 v0.3.1 Mar 2, 2026 v0.3.0 Feb 21, 2026 Changes in this version + var OrderTemplateTest = ... type Agent + func (agent *Agent) GetQuotes(symbols string) ([]Quote, error) + func (agent *Agent) SubmitMultiLegOrder(hashValue string, order *MultiLegOrder) error v0.2.0 Feb 20, 2026 Changes in this version type SingleLegOrder + Price string v0.1.1 Feb 19, 2026 Changes in this version type SingleLegOrder + ActivationPrice float32 v0.1.0 Feb 19, 2026 v0.0.1 Feb 19, 2026 Changes in this version + var APPKEY string + var CBURL string + var ErrForbidden = errors.New("url is forbidden to client") + var ErrNeedReAuthorization = errors.New("need to reinitalize or account not available to caller") + var ErrNotFound = errors.New("url not found") + var ErrTemporaryServer = errors.New("server is taking a tylenol, brb") + var ErrUnexpectedServer = errors.New("server is freaking out") + var ErrValidation = errors.New("validation error - non fatal from Schwab") + var LegTemplate = ... + var LegTemplateLast = ... + var OrderTemplate = ... + var PATH string + var SECRET string + type Account struct + AggregatedBalance AggregatedBalance + SecuritiesAccount SecuritiesAccount + type AccountInstrument struct + AssetType string + Cusip string + Description string + InstrumentID int + NetChange float64 + Symbol string + type AccountNumbers struct + AccountNumber string + HashValue string + type Agent struct + Client *o.AuthorizedClient + Tokens Token + func Initiate() *Agent + func Reinitiate() *Agent + func (agent *Agent) GetAccount(id string, fields ...string) (Account, error) + func (agent *Agent) GetAccountNumbers() ([]AccountNumbers, error) + func (agent *Agent) GetAccountOrders(accountNumber, fromEnteredTime, toEnteredTime string) ([]FullOrder, error) + func (agent *Agent) GetAccounts(fields ...string) ([]Account, error) + func (agent *Agent) GetAllOrders(fromEnteredTime, toEnteredTime string) ([]FullOrder, error) + func (agent *Agent) GetChains(symbol string) (Chain, error) + func (agent *Agent) GetMovers(index, direction, change string) ([]Screener, error) + func (agent *Agent) GetOrder(accountNumber, orderID string) (FullOrder, error) + func (agent *Agent) GetPriceHistory(...) ([]Candle, error) + func (agent *Agent) GetQuote(symbol string) (Quote, error) + func (agent *Agent) GetTransaction(accountNumber, transactionId string) (Transaction, error) + func (agent *Agent) Handler(req *http.Request) (*http.Response, error) + func (agent *Agent) Refresh() + func (agent *Agent) SearchInstrumentFundamental(symbol string) (FundamentalInstrument, error) + func (agent *Agent) SearchInstrumentSimple(symbols string) (SimpleInstrument, error) + func (agent *Agent) Single(symbol, contractType, strikeRange, strikeCount, toDate string) (Chain, error) + func (agent *Agent) SubmitSingleLegOrder(hashValue string, order *SingleLegOrder) error + type AggregatedBalance struct + CurrentLiquidationValue float64 + LiquidationValue float64 + type Candle struct + Close float64 + Hi float64 + Lo float64 + Open float64 + Time int + Volume int + type Chain struct + CallExpDateMap map[string]map[string][]OptionContract + DaysToExpiration float64 + InterestRate float64 + Interval float64 + IsDelayed bool + IsIndex bool + PutExpDateMap map[string]map[string][]OptionContract + Status string + Strategy string + Symbol string + Underlying Underlying + UnderlyingPrice float64 + Volatility float64 + type CurrentBalance struct + AccruedInterest float64 + AvailableFunds float64 + AvailableFundsNonMarginableTrade float64 + BondValue float64 + BuyingPower float64 + BuyingPowerNonMarginableTrade float64 + CashBalance float64 + CashReceipts float64 + DayTradingBuyingPower float64 + Equity float64 + EquityPercentage float64 + LiquidationValue float64 + LongMarginValue float64 + LongMarketValue float64 + LongOptionMarketValue float64 + MaintenanceCall float64 + MaintenanceRequirement float64 + MarginBalance float64 + MoneyMarketFund float64 + MutualFundValues float64 + PendingDeposits float64 + RegTCall float64 + SMA float64 + Savings float64 + ShortBalance float64 + ShortMarginValue float64 + ShortMarketValue float64 + ShortOptionMarketValue float64 + type FullExecutionLeg struct + InstrumentId int + LegId int + MismarkedQuantity int + Price int + Quantity int + Time string + type FullOrder struct + AccountNumber int + ActivationPrice int + CancelTime string + Cancelable bool + ChildOrderStrategies string + CloseTime string + ComplexOrderStrategyType string + DestinationLinkName string + Duration string + Editable bool + EnteredTime string + FilledQuantity int + OrderActivityCollection []FullOrderActivity + OrderId int + OrderLegCollection []FullOrderLeg + OrderStrategyType string + OrderType string + Price string + Quantity int + ReleaseTime string + RemainingQuantity int + ReplacingOrderCollection string + RequestedDestination string + Session string + SpecialInstruction string + Status string + StatusDescription string + StopPrice int + StopPriceLinkBasis string + StopPriceLinkType string + StopPriceOffset int + StopType string + Tag string + TaxLotMethod string + type FullOrderActivity struct + ActivityType string + ExecutionLegs []FullExecutionLeg + ExecutionType string + OrderRemainingQuantity int + Quantity int + type FullOrderLeg struct + DivCapGains string + Instruction string + Instrument InstrumentRef + LegId int + OrderLegType string + PositionEffect string + Quantity int + QuantityType string + ToSymbol string + type FundamentalInstrument struct + AssetType string + Avg10DaysVolume int + Avg1DayVolume int + Avg3MonthVolume int + Beta float64 + BookValuePerShare float64 + CurrentRatio float64 + Cusip string + DeclarationDate string + Description string + DividendAmount float64 + DividendDate string + DividendFreq int + DividendGrowthRate3Year float64 + DividendPayAmount float64 + DividendPayDate string + DividendYield float64 + DtnVolume int + Eps float64 + EpsChange float64 + EpsChangePercentTTM float64 + EpsChangeYear float64 + EpsTTM float64 + Exchange string + FundLeverageFactor float64 + GrossMarginMRQ float64 + GrossMarginTTM float64 + Hi52 float64 + InterestCoverage float64 + Lo52 float64 + LtDebtToEquity float64 + MarketCap float64 + MarketCapFloat float64 + NetMarginTTM float64 + NetProfitMarginMRQ float64 + NextDividendDate string + NextDividendPayDate string + OperatingMarginMRQ float64 + OperatingMarginTTM float64 + PB float64 + PCF float64 + PE float64 + PEG float64 + PR float64 + QuickRatio float64 + ROA float64 + ROE float64 + ROI float64 + RevChangeIn float64 + RevChangeTTM float64 + RevChangeYear float64 + SharesOutstanding float64 + ShortIntDayToCover float64 + ShortIntToFloat float64 + Symbol string + TotalDebtToCapital float64 + TotalDebtToEquity float64 + Vol10DayAvg float64 + Vol1DayAvg float64 + Vol3MonthAvg float64 + type InitialBalance struct + AccountValue float64 + AccruedInterest float64 + AvailableFundsNonMarginableTrade float64 + BondValue float64 + BuyingPower float64 + CashAvailableForTrading float64 + CashBalance float64 + CashReceipts float64 + DayTradingBuyingPower float64 + DayTradingBuyingPowerCall float64 + DayTradingEquityCall float64 + Equity float64 + EquityPercentage float64 + IsInCall bool + LiquidationValue float64 + LongMarginValue float64 + LongOptionMarketValue float64 + LongStockValue float64 + MaintenanceCall float64 + MaintenanceRequirement float64 + Margin float64 + MarginBalance float64 + MarginEquity float64 + MoneyMarketFund float64 + MutualFundValue float64 + PendingDeposits float64 + RegTCall float64 + ShortBalance float64 + ShortMarginValue float64 + ShortOptionMarketValue float64 + ShortStockValue float64 + TotalCash float64 + UnsettledCash float64 + type InstrumentRef struct + Cusip string + Description string + InstrumentId int + NetChange int + Symbol string + Type string + type MultiLegOrder struct + Duration string + OrderLegCollection []SimpleOrderLeg + OrderType string + Session string + Strategy string + type MultiLegSimpleOrderComposition func(order *MultiLegOrder) + type OptionContract struct + Ask float64 + AskSize int64 + Bid float64 + BidSize int64 + ClosePrice float64 + DaysToExpiration int64 + DeliverableNote string + Delta float64 + Description string + ExchangeName string + ExerciseType string + ExpirationDate string + ExpirationType string + ExtrinsicValue float64 + Gamma float64 + Hi52 float64 + HighPrice float64 + InTheMoney bool + IntrinsicValue float64 + Last float64 + LastSize int64 + LastTradingDay int64 + Lo52 float64 + LowPrice float64 + Mark float64 + MarkChange float64 + MarkPercentChange float64 + Mini bool + Multiplier float64 + NetChange float64 + NonStandard bool + OpenInterest float64 + OpenPrice float64 + OptionDeliverablesList []OptionDeliverables + OptionRoot string + PennyPilot bool + PercentChange float64 + PutCall string + QuoteTimeInLong int64 + RHO float64 + SettlementType string + StrikePrice float64 + Symbol string + TheoreticalOptionValue float64 + TheoreticalVolatility float64 + Theta float64 + TimeValue float64 + TotalVolume int64 + TradeTimeInLong int64 + Vega float64 + Volatility float64 + type OptionDeliverables struct + AssetType string + DeliverableUnits float64 + Symbol string + type Position struct + AgedQuantity float64 + AverageLongPrice float64 + AveragePrice float64 + AverageShortPrice float64 + CurrentDayCost float64 + CurrentDayProfitLoss float64 + CurrentDayProfitLossPercentage float64 + Instrument AccountInstrument + LongOpenProfitLoss float64 + LongQuantity float64 + MaintenanceRequirement float64 + MarketValue float64 + PreviousSessionLongQuantity float64 + PreviousSessionShortQuantity float64 + SettledLongQuantity float64 + SettledShortQuantity float64 + ShortOpenProfitLoss float64 + ShortQuantity float64 + TaxLotAverageLongPrice float64 + TaxLotAverageShortPrice float64 + type ProjectedBalance struct + AvailableFunds float64 + AvailableFundsNonMarginableTrade float64 + BuyingPower float64 + BuyingPowerNonMarginableTrade float64 + DayTradingBuyingPower float64 + DayTradingBuyingPowerCall float64 + Equity float64 + EquityPercentage float64 + IsInCall bool + LongMarginValue float64 + MaintenanceCall float64 + MaintenanceRequirement float64 + MarginBalance float64 + OptionBuyingPower float64 + RegTCall float64 + SMA float64 + ShortBalance float64 + ShortMarginValue float64 + StockBuyingPower float64 + type Quote struct + AskMICId string + AskPrice float64 + AskSize int + AskTime int + AssetMainType string + AssetSubType string + BidMICId string + BidPrice float64 + BidSize int + BidTime int + Close float64 + Hi52 float64 + HiPrice float64 + LastMICId string + LastPrice float64 + LastSize int + Lo52 float64 + LoPrice float64 + Mark float64 + MarkChange float64 + MarkPercentChange float64 + NetChange float64 + NetPercentChange float64 + Open float64 + PostMarketChange float64 + PostMarketPercentChange float64 + QuoteTime int + QuoteType string + RealTime bool + SSID int + SecurityStatus string + Symbol string + TotalVolume int + TradeTime int + type Screener struct + Description string + LastPrice float64 + MarketShare float64 + NetChange float64 + NetPercentChange float64 + Symbol string + TotalVolume int + Trades int + Volume int + type SecuritiesAccount struct + AccountNumber string + CurrentBalances CurrentBalance + InitialBalances InitialBalance + IsClosingOnlyRestricted bool + IsDayTrader bool + PFCBFlag bool + Positions []Position + ProjectedBalances ProjectedBalance + RoundTrips int + Type string + type SimpleInstrument struct + AssetType string + Cusip string + Description string + Exchange string + Symbol string + type SimpleOrderInstrument struct + AssetType string + Symbol string + type SimpleOrderLeg struct + Instruction string + Instrument SimpleOrderInstrument + Quantity float32 + type SingleLegOrder struct + Duration string + Instruction string + Instrument SimpleOrderInstrument + OrderType string + Quantity float32 + Session string + Strategy string + func CreateSingleLegOrder(opts ...SingleLegOrderComposition) *SingleLegOrder + type SingleLegOrderComposition func(order *SingleLegOrder) + func Duration(duration string) SingleLegOrderComposition + func Instruction(instruction string) SingleLegOrderComposition + func Instrument(instrument SimpleOrderInstrument) SingleLegOrderComposition + func OrderType(t string) SingleLegOrderComposition + func Quantity(quantity float32) SingleLegOrderComposition + func Session(session string) SingleLegOrderComposition + func Strategy(strategy string) SingleLegOrderComposition + type Token struct + Bearer string + BearerExpiration time.Time + Refresh string + RefreshExpiration time.Time + type Transaction struct + AccountNumber string + ActivityId int + ActivityType string + Description string + NetAmount int + OrderId int + PositionId int + SettlementDate string + Status string + SubAccount string + Time string + TradeDate string + TransferItems TransferItems + Type string + User User + type TransferItems struct + Amount int + Cost int + FeeType string + Instrument InstrumentRef + PositionEffect string + Price int + type Underlying struct + Ask float64 + AskSize float64 + Bid float64 + BidSize float64 + Change float64 + Close float64 + Delayed bool + Description string + ExchangeName string + Hi52 float64 + HiPrice float64 + Lo52 float64 + LoPrice float64 + Mark float64 + MarkPercentChange float64 + OpenPrice float64 + PercentChange float64 + QuoteTime int64 + Symbol string + TotalVolume int64 + TradeTime int64 + type User struct + BrokerRepCode string + CdDomainId string + FirstName string + LastName string + Login string + SystemUserName string + Type string + UserId int