Documentation ¶
Index ¶
- type Account
- type AccountMaster
- type Accounts
- type Allocation
- type AllocationItems0
- type AllocationItems0AssetClass
- type AllocationItems0AssetClassLong
- type AllocationItems0AssetClassShort
- type AllocationItems0Group
- type AllocationItems0GroupLong
- type AllocationItems0GroupShort
- type AllocationItems0Sector
- type AllocationItems0SectorLong
- type AllocationItems0SectorShort
- type AuthStatus
- type CalendarRequest
- type CalendarRequestDate
- type CalendarRequestFilters
- type Contract
- type ContractRules
- type Events
- type EventsItems0
- type Futures
- type FuturesItems0
- type HistoryData
- type HistoryDataDataItems0
- type HistoryResult
- type HistoryResultBars
- type Inds
- type IndsItems0
- type Ledger
- type MarketData
- type ModifyOrder
- type Notifications
- type NotificationsItems0
- type Order
- type OrderRequest
- type Performance
- type PerformanceCps
- type PerformanceCpsDataItems0
- type PerformanceNav
- type PerformanceNavDataItems0
- type PerformanceTpps
- type PerformanceTppsDataItems0
- type Position
- type PositionItems0
- type ScannerParams
- type ScannerParamsFilterItems0
- type ScannerResult
- type ScannerResultContracts
- type ScannerResultContractsContractItems0
- type Secdef
- type SecdefItems0
- type SetAccount
- type StatsData
- type Summary
- type Trade
- type Wagers
- type WagersItems0
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // account alias AccountAlias string `json:"accountAlias,omitempty"` // account Id AccountID string `json:"accountId,omitempty"` // account status AccountStatus float64 `json:"accountStatus,omitempty"` // account title AccountTitle string `json:"accountTitle,omitempty"` // account van AccountVan string `json:"accountVan,omitempty"` // covestor Covestor bool `json:"covestor,omitempty"` // currency Currency string `json:"currency,omitempty"` // desc Desc string `json:"desc,omitempty"` // display name DisplayName string `json:"displayName,omitempty"` // faclient Faclient bool `json:"faclient,omitempty"` // id ID string `json:"id,omitempty"` // master Master *AccountMaster `json:"master,omitempty"` // parent Parent string `json:"parent,omitempty"` // trading type TradingType string `json:"tradingType,omitempty"` // type Type string `json:"type,omitempty"` }
Account account information swagger:model account
func (*Account) MarshalBinary ¶
MarshalBinary interface implementation
func (*Account) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type AccountMaster ¶
type AccountMaster struct { // official title OfficialTitle string `json:"officialTitle,omitempty"` // title Title string `json:"title,omitempty"` }
AccountMaster account master swagger:model AccountMaster
func (*AccountMaster) MarshalBinary ¶
func (m *AccountMaster) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AccountMaster) UnmarshalBinary ¶
func (m *AccountMaster) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Allocation ¶
type Allocation []*AllocationItems0
Allocation allocation swagger:model allocation
type AllocationItems0 ¶
type AllocationItems0 struct { // asset class AssetClass *AllocationItems0AssetClass `json:"assetClass,omitempty"` // group Group *AllocationItems0Group `json:"group,omitempty"` // sector Sector *AllocationItems0Sector `json:"sector,omitempty"` }
AllocationItems0 allocation swagger:model AllocationItems0
func (*AllocationItems0) MarshalBinary ¶
func (m *AllocationItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0) UnmarshalBinary ¶
func (m *AllocationItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0AssetClass ¶
type AllocationItems0AssetClass struct { // long Long *AllocationItems0AssetClassLong `json:"long,omitempty"` // short Short *AllocationItems0AssetClassShort `json:"short,omitempty"` }
AllocationItems0AssetClass portfolio allocation by asset class swagger:model AllocationItems0AssetClass
func (*AllocationItems0AssetClass) MarshalBinary ¶
func (m *AllocationItems0AssetClass) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0AssetClass) UnmarshalBinary ¶
func (m *AllocationItems0AssetClass) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0AssetClassLong ¶
type AllocationItems0AssetClassLong struct { // b o n d BOND float64 `json:"BOND,omitempty"` // c a s h CASH float64 `json:"CASH,omitempty"` // f u t FUT float64 `json:"FUT,omitempty"` // o p t OPT float64 `json:"OPT,omitempty"` // s t k STK float64 `json:"STK,omitempty"` // w a r WAR float64 `json:"WAR,omitempty"` }
AllocationItems0AssetClassLong long positions allocation swagger:model AllocationItems0AssetClassLong
func (*AllocationItems0AssetClassLong) MarshalBinary ¶
func (m *AllocationItems0AssetClassLong) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0AssetClassLong) UnmarshalBinary ¶
func (m *AllocationItems0AssetClassLong) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0AssetClassShort ¶
type AllocationItems0AssetClassShort struct { // b o n d BOND float64 `json:"BOND,omitempty"` // c a s h CASH float64 `json:"CASH,omitempty"` // f u t FUT float64 `json:"FUT,omitempty"` // o p t OPT float64 `json:"OPT,omitempty"` // s t k STK float64 `json:"STK,omitempty"` // w a r WAR float64 `json:"WAR,omitempty"` }
AllocationItems0AssetClassShort short positions allocation swagger:model AllocationItems0AssetClassShort
func (*AllocationItems0AssetClassShort) MarshalBinary ¶
func (m *AllocationItems0AssetClassShort) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0AssetClassShort) UnmarshalBinary ¶
func (m *AllocationItems0AssetClassShort) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0Group ¶
type AllocationItems0Group struct { // long Long *AllocationItems0GroupLong `json:"long,omitempty"` // short Short *AllocationItems0GroupShort `json:"short,omitempty"` }
AllocationItems0Group portfolio allocation by group swagger:model AllocationItems0Group
func (*AllocationItems0Group) MarshalBinary ¶
func (m *AllocationItems0Group) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0Group) UnmarshalBinary ¶
func (m *AllocationItems0Group) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0GroupLong ¶
type AllocationItems0GroupLong struct { // apparel Apparel float64 `json:"Apparel,omitempty"` // chemicals Chemicals float64 `json:"Chemicals,omitempty"` // communications Communications float64 `json:"Communications,omitempty"` // computers Computers float64 `json:"Computers,omitempty"` // others Others float64 `json:"Others,omitempty"` // semiconductors Semiconductors float64 `json:"Semiconductors,omitempty"` }
AllocationItems0GroupLong long positions allocation swagger:model AllocationItems0GroupLong
func (*AllocationItems0GroupLong) MarshalBinary ¶
func (m *AllocationItems0GroupLong) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0GroupLong) UnmarshalBinary ¶
func (m *AllocationItems0GroupLong) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0GroupShort ¶
type AllocationItems0GroupShort struct { // airlines Airlines float64 `json:"Airlines,omitempty"` // banks Banks float64 `json:"Banks,omitempty"` // internet Internet float64 `json:"Internet,omitempty"` }
AllocationItems0GroupShort short positions allocation swagger:model AllocationItems0GroupShort
func (*AllocationItems0GroupShort) MarshalBinary ¶
func (m *AllocationItems0GroupShort) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0GroupShort) UnmarshalBinary ¶
func (m *AllocationItems0GroupShort) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0Sector ¶
type AllocationItems0Sector struct { // long Long *AllocationItems0SectorLong `json:"long,omitempty"` // short Short *AllocationItems0SectorShort `json:"short,omitempty"` }
AllocationItems0Sector portfolio allocation by sector swagger:model AllocationItems0Sector
func (*AllocationItems0Sector) MarshalBinary ¶
func (m *AllocationItems0Sector) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0Sector) UnmarshalBinary ¶
func (m *AllocationItems0Sector) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0SectorLong ¶
type AllocationItems0SectorLong struct { // communications Communications float64 `json:"Communications,omitempty"` // energy Energy float64 `json:"Energy,omitempty"` // financial Financial float64 `json:"Financial,omitempty"` // others Others float64 `json:"Others,omitempty"` // technology Technology float64 `json:"Technology,omitempty"` // utilities Utilities float64 `json:"Utilities,omitempty"` }
AllocationItems0SectorLong long positions allocation swagger:model AllocationItems0SectorLong
func (*AllocationItems0SectorLong) MarshalBinary ¶
func (m *AllocationItems0SectorLong) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0SectorLong) UnmarshalBinary ¶
func (m *AllocationItems0SectorLong) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AllocationItems0SectorShort ¶
type AllocationItems0SectorShort struct { // consumer Consumer float64 `json:"Consumer,omitempty"` // diversified Diversified float64 `json:"Diversified,omitempty"` // industrial Industrial float64 `json:"Industrial,omitempty"` }
AllocationItems0SectorShort short positions allocation swagger:model AllocationItems0SectorShort
func (*AllocationItems0SectorShort) MarshalBinary ¶
func (m *AllocationItems0SectorShort) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AllocationItems0SectorShort) UnmarshalBinary ¶
func (m *AllocationItems0SectorShort) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AuthStatus ¶
type AuthStatus struct { // Brokerage session is authenticated Authenticated bool `json:"authenticated,omitempty"` // Brokerage session is competing, e.g. user is logged in to IBKR Mobile, WebTrader, TWS or other trading platforms. Competing bool `json:"competing,omitempty"` // Connected to backend Connected bool `json:"connected,omitempty"` // Authentication failed, why. Fail string `json:"fail,omitempty"` // System messages that may affect trading Message string `json:"message,omitempty"` // Prompt messages that may affect trading or the account Prompts []string `json:"prompts"` }
AuthStatus auth status swagger:model authStatus
func (*AuthStatus) MarshalBinary ¶
func (m *AuthStatus) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AuthStatus) UnmarshalBinary ¶
func (m *AuthStatus) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CalendarRequest ¶
type CalendarRequest struct { // date Date *CalendarRequestDate `json:"date,omitempty"` // filters Filters *CalendarRequestFilters `json:"filters,omitempty"` }
CalendarRequest calendar request swagger:model calendar_request
func (*CalendarRequest) MarshalBinary ¶
func (m *CalendarRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CalendarRequest) UnmarshalBinary ¶
func (m *CalendarRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CalendarRequestDate ¶
type CalendarRequestDate struct { // end date of a period. for example 20180808-0400 End string `json:"end,omitempty"` // start date of a period. for example 20180808-0400 Start string `json:"start,omitempty"` }
CalendarRequestDate calendar request date swagger:model CalendarRequestDate
func (*CalendarRequestDate) MarshalBinary ¶
func (m *CalendarRequestDate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CalendarRequestDate) UnmarshalBinary ¶
func (m *CalendarRequestDate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CalendarRequestFilters ¶
type CalendarRequestFilters struct { // value can be 'true' or 'false'. DivExDates string `json:"DivExDates,omitempty"` // value can be 'true' or 'false'. CorporateEarnings string `json:"corporate_earnings,omitempty"` // value can be 'true' or 'false'. CorporateEvents string `json:"corporate_events,omitempty"` // default is 'All'. Country string `json:"country,omitempty"` // value can be 'true' or 'false'. EconomicEvents string `json:"economic_events,omitempty"` // value can be 'true' or 'false'. Ipo string `json:"ipo,omitempty"` // default is '250'. Limit string `json:"limit,omitempty"` // default is '50'. LimitRegion string `json:"limit_region,omitempty"` // value can be 'true' or 'false'. OptionShowMonthly string `json:"option_show_monthly,omitempty"` // value can be 'true' or 'false'. OptionShowWeekly string `json:"option_show_weekly,omitempty"` // value can be 'true' or 'false'. RecentlyHeld string `json:"recently_held,omitempty"` // value can be 'true' or 'false'. Splits string `json:"splits,omitempty"` }
CalendarRequestFilters calendar request filters swagger:model CalendarRequestFilters
func (*CalendarRequestFilters) MarshalBinary ¶
func (m *CalendarRequestFilters) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CalendarRequestFilters) UnmarshalBinary ¶
func (m *CalendarRequestFilters) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Contract ¶
type Contract struct { // category Category string `json:"category,omitempty"` // company name CompanyName string `json:"companyName,omitempty"` // company name Company_Name string `json:"company_name,omitempty"` // same as that in request ConID string `json:"con_id,omitempty"` // currency Currency string `json:"currency,omitempty"` // exchange Exchange string `json:"exchange,omitempty"` // industry Industry string `json:"industry,omitempty"` // for example STK InstrumentType string `json:"instrument_type,omitempty"` // for exmple FB LocalSymbol string `json:"local_symbol,omitempty"` // true means you can trade outside RTH(regular trading hours) Rth bool `json:"r_t_h,omitempty"` // rules Rules *ContractRules `json:"rules,omitempty"` }
Contract Contains all details of the contract, including rules you can use when placing orders swagger:model contract
func (*Contract) MarshalBinary ¶
MarshalBinary interface implementation
func (*Contract) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ContractRules ¶
type ContractRules struct { // default quantity you can use to place an order DefaultSize float64 `json:"defaultSize,omitempty"` // display size DisplaySize string `json:"displaySize,omitempty"` // increment Increment string `json:"increment,omitempty"` // default limit price you can use to prefill your order LimitPrice float64 `json:"limitPrice,omitempty"` // order types OrderTypes []string `json:"orderTypes"` // order types outside OrderTypesOutside []string `json:"orderTypesOutside"` // if you can preview the order or not with the whatif end-point Preview bool `json:"preview,omitempty"` // size increment SizeIncrement float64 `json:"sizeIncrement,omitempty"` // default stop price you can use to prefill your order Stopprice float64 `json:"stopprice,omitempty"` // tif types TifTypes []string `json:"tifTypes"` }
ContractRules contract rules swagger:model ContractRules
func (*ContractRules) MarshalBinary ¶
func (m *ContractRules) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ContractRules) UnmarshalBinary ¶
func (m *ContractRules) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type EventsItems0 ¶
type EventsItems0 struct { // conids Conids []string `json:"conids"` // will be different for different event types Data interface{} `json:"data,omitempty"` // for example 11662135 EventKey string `json:"event_key,omitempty"` // event type EventType string `json:"event_type,omitempty"` // for exmple 20180817T040000+0000 IndexDate string `json:"index_date,omitempty"` // index date type IndexDateType string `json:"index_date_type,omitempty"` // for example RSE Source string `json:"source,omitempty"` // status Status string `json:"status,omitempty"` // tooltips Tooltips interface{} `json:"tooltips,omitempty"` }
EventsItems0 events items0 swagger:model EventsItems0
func (*EventsItems0) MarshalBinary ¶
func (m *EventsItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EventsItems0) UnmarshalBinary ¶
func (m *EventsItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FuturesItems0 ¶
type FuturesItems0 struct { // conid of the future contract Conid int64 `json:"conid,omitempty"` // expiration date ExpirationDate string `json:"expirationDate,omitempty"` // last trading day Ltd string `json:"ltd,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` // underlying conid UnderlyingConid int64 `json:"underlyingConid,omitempty"` }
FuturesItems0 future contract information swagger:model FuturesItems0
func (*FuturesItems0) MarshalBinary ¶
func (m *FuturesItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FuturesItems0) UnmarshalBinary ¶
func (m *FuturesItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HistoryData ¶
type HistoryData struct { // bar length BarLength int64 `json:"barLength,omitempty"` // data Data []*HistoryDataDataItems0 `json:"data"` // delay Delay int64 `json:"delay,omitempty"` // price/volume/... High string `json:"high,omitempty"` // price/volume/... Low string `json:"low,omitempty"` // Market Data Availability. The field may contain two chars. The first char is the primary code: R = Realtime, D = Delayed, // Z = Frozen, Y = Frozen Delayed. The second char is the secondary code: P = Snapshot Available, p = Consolidated. // MdAvailability string `json:"mdAvailability,omitempty"` // total number of points Points float64 `json:"points,omitempty"` // start date time Start string `json:"start,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` // text Text string `json:"text,omitempty"` // tick num TickNum string `json:"tickNum,omitempty"` // time period TimePeriod string `json:"timePeriod,omitempty"` // travel time TravelTime float64 `json:"travelTime,omitempty"` }
HistoryData history data swagger:model history-data
func (*HistoryData) MarshalBinary ¶
func (m *HistoryData) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HistoryData) UnmarshalBinary ¶
func (m *HistoryData) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HistoryDataDataItems0 ¶
type HistoryDataDataItems0 struct { // close price C float64 `json:"c,omitempty"` // high price H float64 `json:"h,omitempty"` // low price L float64 `json:"l,omitempty"` // open price O float64 `json:"o,omitempty"` // unix time stamp T float64 `json:"t,omitempty"` // volume V float64 `json:"v,omitempty"` }
HistoryDataDataItems0 history data data items0 swagger:model HistoryDataDataItems0
func (*HistoryDataDataItems0) MarshalBinary ¶
func (m *HistoryDataDataItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HistoryDataDataItems0) UnmarshalBinary ¶
func (m *HistoryDataDataItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HistoryResult ¶
type HistoryResult struct { // bars Bars *HistoryResultBars `json:"bars,omitempty"` }
HistoryResult history result swagger:model history-result
func (*HistoryResult) MarshalBinary ¶
func (m *HistoryResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HistoryResult) UnmarshalBinary ¶
func (m *HistoryResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HistoryResultBars ¶
type HistoryResultBars struct { // close Close float64 `json:"close,omitempty"` // count Count float64 `json:"count,omitempty"` // end time EndTime string `json:"endTime,omitempty"` // high High float64 `json:"high,omitempty"` // low Low float64 `json:"low,omitempty"` // open Open float64 `json:"open,omitempty"` // time Time string `json:"time,omitempty"` // volume Volume float64 `json:"volume,omitempty"` // weighted avg WeightedAvg float64 `json:"weightedAvg,omitempty"` }
HistoryResultBars history result bars swagger:model HistoryResultBars
func (*HistoryResultBars) MarshalBinary ¶
func (m *HistoryResultBars) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HistoryResultBars) UnmarshalBinary ¶
func (m *HistoryResultBars) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type IndsItems0 ¶
type IndsItems0 struct { // conid Conid float64 `json:"conid,omitempty"` }
IndsItems0 inds items0 swagger:model IndsItems0
func (*IndsItems0) MarshalBinary ¶
func (m *IndsItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*IndsItems0) UnmarshalBinary ¶
func (m *IndsItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Ledger ¶
type Ledger struct { // acctcode Acctcode string `json:"acctcode,omitempty"` // cashbalance Cashbalance float64 `json:"cashbalance,omitempty"` // commoditymarketvalue Commoditymarketvalue float64 `json:"commoditymarketvalue,omitempty"` // corporatebondsmarketvalue Corporatebondsmarketvalue float64 `json:"corporatebondsmarketvalue,omitempty"` // currency Currency string `json:"currency,omitempty"` // exchangerate Exchangerate float64 `json:"exchangerate,omitempty"` // funds Funds float64 `json:"funds,omitempty"` // futuremarketvalue Futuremarketvalue float64 `json:"futuremarketvalue,omitempty"` // interest Interest float64 `json:"interest,omitempty"` // issueroptionsmarketvalue Issueroptionsmarketvalue float64 `json:"issueroptionsmarketvalue,omitempty"` // key Key string `json:"key,omitempty"` // moneyfunds Moneyfunds float64 `json:"moneyfunds,omitempty"` // netliquidationvalue Netliquidationvalue float64 `json:"netliquidationvalue,omitempty"` // realizedpnl Realizedpnl float64 `json:"realizedpnl,omitempty"` // sessionid Sessionid int64 `json:"sessionid,omitempty"` // settledcash Settledcash float64 `json:"settledcash,omitempty"` // severity Severity int64 `json:"severity,omitempty"` // stockmarketvalue Stockmarketvalue float64 `json:"stockmarketvalue,omitempty"` // timestamp Timestamp int64 `json:"timestamp,omitempty"` // unrealizedpnl Unrealizedpnl float64 `json:"unrealizedpnl,omitempty"` // warrantsmarketvalue Warrantsmarketvalue float64 `json:"warrantsmarketvalue,omitempty"` }
Ledger ledger swagger:model ledger
func (*Ledger) MarshalBinary ¶
MarshalBinary interface implementation
func (*Ledger) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type MarketData ¶
type MarketData struct { // ask Ask float64 `json:"Ask,omitempty"` // ask size AskSize float64 `json:"AskSize,omitempty"` // bid Bid float64 `json:"Bid,omitempty"` // bid size BidSize float64 `json:"BidSize,omitempty"` // IBKR Contract ID Conid float64 `json:"Conid,omitempty"` // Exchange Exchange string `json:"Exchange,omitempty"` // last Last float64 `json:"Last,omitempty"` // last size LastSize float64 `json:"LastSize,omitempty"` // min tick MinTick float64 `json:"minTick,omitempty"` }
MarketData market data swagger:model market-data
func (*MarketData) MarshalBinary ¶
func (m *MarketData) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MarketData) UnmarshalBinary ¶
func (m *MarketData) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ModifyOrder ¶
type ModifyOrder struct { // acct Id AcctID string `json:"acctId,omitempty"` // aux price AuxPrice float64 `json:"auxPrice,omitempty"` // conid Conid int64 `json:"conid,omitempty"` // optional, not required ListingExchange string `json:"listingExchange,omitempty"` // customer orderid OrderID int64 `json:"orderId,omitempty"` // for example LMT OrderType string `json:"orderType,omitempty"` // outside r t h OutsideRTH bool `json:"outsideRTH,omitempty"` // price Price float64 `json:"price,omitempty"` // usually integer, for some special cases can be float numbers Quantity float64 `json:"quantity,omitempty"` // SELL or BUY Side string `json:"side,omitempty"` // ticker Ticker string `json:"ticker,omitempty"` // for example DAY Tif string `json:"tif,omitempty"` }
ModifyOrder modify order swagger:model modify-order
func (*ModifyOrder) MarshalBinary ¶
func (m *ModifyOrder) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ModifyOrder) UnmarshalBinary ¶
func (m *ModifyOrder) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Notifications ¶
type Notifications []*NotificationsItems0
Notifications notifications swagger:model notifications
type NotificationsItems0 ¶
type NotificationsItems0 struct { // notification date D string `json:"D,omitempty"` // FYI code, we can use it to find whether the disclaimer is accepted or not in settings FC string `json:"FC,omitempty"` // unique way to reference this notification ID string `json:"ID,omitempty"` // content of notification MD string `json:"MD,omitempty"` // title of notification MS string `json:"MS,omitempty"` // 0-unread, 1-read R string `json:"R,omitempty"` }
NotificationsItems0 notification swagger:model NotificationsItems0
func (*NotificationsItems0) MarshalBinary ¶
func (m *NotificationsItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NotificationsItems0) UnmarshalBinary ¶
func (m *NotificationsItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Order ¶
type Order struct { // account id Acct string `json:"acct,omitempty"` // back-ground color BgColor string `json:"bgColor,omitempty"` // company name CompanyName string `json:"companyName,omitempty"` // conid Conid int64 `json:"conid,omitempty"` // description1 Description1 string `json:"description1,omitempty"` // fg color FgColor string `json:"fgColor,omitempty"` // filled quantity FilledQuantity string `json:"filledQuantity,omitempty"` // for example NASDAQ.NMS ListingExchange string `json:"listingExchange,omitempty"` // order desc OrderDesc string `json:"orderDesc,omitempty"` // order Id OrderID int64 `json:"orderId,omitempty"` // User defined string used to identify the order. Value is set using "cOID" field while placing an order. OrderRef string `json:"order_ref,omitempty"` // for example Limit OrigOrderType string `json:"origOrderType,omitempty"` // Only exists in child order of bracket ParentID int64 `json:"parentId,omitempty"` // price Price float64 `json:"price,omitempty"` // remaining quantity RemainingQuantity string `json:"remainingQuantity,omitempty"` // for example STK SecType string `json:"secType,omitempty"` // BUY or SELL Side string `json:"side,omitempty"` // PendingSubmit - Indicates the order was sent, but confirmation has not been received that it has been received by the destination. // Occurs most commonly if an exchange is closed. // PendingCancel - Indicates that a request has been sent to cancel an order but confirmation has not been received of its cancellation. PreSubmitted - Indicates that a simulated order type has been accepted by the IBKR system and that this order has yet to be elected. // The order is held in the IBKR system until the election criteria are met. At that time the order is transmitted to the order destination as specified. // Submitted - Indicates that the order has been accepted at the order destination and is working. Cancelled - Indicates that the balance of the order has been confirmed cancelled by the IB system. // This could occur unexpectedly when IB or the destination has rejected the order. // Filled - Indicates that the order has been completely filled. Inactive - Indicates the order is not working, for instance if the order was invalid and triggered an error message, // or if the order was to short a security and shares have not yet been located. // Status string `json:"status,omitempty"` // for exmple FB Ticker string `json:"ticker,omitempty"` }
Order contains all the order related info swagger:model order
func (*Order) MarshalBinary ¶
MarshalBinary interface implementation
func (*Order) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type OrderRequest ¶
type OrderRequest struct { // acctId is optional. It should be one of the accounts returned by // /iserver/accounts. If not passed, the first one in the list is selected. // AcctID string `json:"acctId,omitempty"` // Customer Order ID. An arbitraty string that can be used to identify the order, e.g "my-fb-order". The // value must be unique for a 24h span. Please do not set this value for child orders when placing a bracket order. // COID string `json:"cOID,omitempty"` // conid is the identifier of the security you want to trade, you can find the // conid with /iserver/secdef/search. // Conid int64 `json:"conid,omitempty"` // listingExchange is optional. By default we use "SMART" routing. Possible values are available via this end // point: /v1/portal/iserver/contract/{{conid}}/info, see valid_exchange: e.g: SMART,AMEX,NYSE, // CBOE,ISE,CHX,ARCA,ISLAND,DRCTEDGE,BEX,BATS,EDGEA,CSFBALGO,JE FFALGO,BYX,IEX,FOXRIVER,TPLUS1,NYSENAT,PSX // ListingExchange string `json:"listingExchange,omitempty"` // orderType can be one of MKT (Market), LMT (Limit), STP (Stop) or STP_LIMIT (stop limit) // OrderType string `json:"orderType,omitempty"` // set to true if the order can be executed outside regular trading hours. // OutsideRTH bool `json:"outsideRTH,omitempty"` // When placing bracket orders, the child parentId must be equal to the cOId (customer order id) of the parent. // ParentID string `json:"parentId,omitempty"` // optional if order is MKT, for LMT, this is the limit price. For STP this is the stop price. // Price float64 `json:"price,omitempty"` // usually integer, for some special cases can be float numbers Quantity float64 `json:"quantity,omitempty"` // for example QuickTrade Referrer string `json:"referrer,omitempty"` // conid:type for example 265598:STK SecType string `json:"secType,omitempty"` // SELL or BUY Side string `json:"side,omitempty"` // ticker Ticker string `json:"ticker,omitempty"` // GTC (Good Till Cancel) or DAY. DAY orders are automatically cancelled at the end of the Day or Trading hours. // Tif string `json:"tif,omitempty"` // If true, the system will use the Adaptive Algo to submit the order // https://www.interactivebrokers.com/en/index.php?f=19091 // UseAdaptive bool `json:"useAdaptive,omitempty"` }
OrderRequest order request swagger:model order-request
func (*OrderRequest) MarshalBinary ¶
func (m *OrderRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*OrderRequest) UnmarshalBinary ¶
func (m *OrderRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Performance ¶
type Performance struct { // cps Cps *PerformanceCps `json:"cps,omitempty"` // currency type CurrencyType string `json:"currencyType,omitempty"` // id ID string `json:"id,omitempty"` // included Included []string `json:"included"` Nav *PerformanceNav `json:"nav,omitempty"` // pm Pm string `json:"pm,omitempty"` // rc Rc int64 `json:"rc,omitempty"` // tpps Tpps *PerformanceTpps `json:"tpps,omitempty"` }
Performance performance swagger:model performance
func (*Performance) MarshalBinary ¶
func (m *Performance) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Performance) UnmarshalBinary ¶
func (m *Performance) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PerformanceCps ¶
type PerformanceCps struct { // data Data []*PerformanceCpsDataItems0 `json:"data"` // array of dates, the length should be same as the length of returns inside data. Dates []string `json:"dates"` // D means Day Freq string `json:"freq,omitempty"` }
PerformanceCps Cumulative performance data swagger:model PerformanceCps
func (*PerformanceCps) MarshalBinary ¶
func (m *PerformanceCps) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerformanceCps) UnmarshalBinary ¶
func (m *PerformanceCps) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PerformanceCpsDataItems0 ¶
type PerformanceCpsDataItems0 struct { // base currency BaseCurrency string `json:"baseCurrency,omitempty"` // end date-- yyyyMMdd End string `json:"end,omitempty"` // id ID string `json:"id,omitempty"` // for example-- acctid IDType string `json:"idType,omitempty"` // each value stands for price change percent of corresponding date in dates array Returns []float64 `json:"returns"` // start date-- yyyyMMdd Start string `json:"start,omitempty"` }
PerformanceCpsDataItems0 performance cps data items0 swagger:model PerformanceCpsDataItems0
func (*PerformanceCpsDataItems0) MarshalBinary ¶
func (m *PerformanceCpsDataItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerformanceCpsDataItems0) UnmarshalBinary ¶
func (m *PerformanceCpsDataItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PerformanceNav ¶
type PerformanceNav struct { PerformanceNavDataItems0 `json:"data"` Dates []string `json:"dates"` Freq string `json:"freq,omitempty"` }Data []*
PerformanceNav Net asset value data for the account or consolidated accounts. NAV data is not applicable to benchmarks. swagger:model PerformanceNav
func (*PerformanceNav) MarshalBinary ¶
func (m *PerformanceNav) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerformanceNav) UnmarshalBinary ¶
func (m *PerformanceNav) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PerformanceNavDataItems0 ¶
type PerformanceNavDataItems0 struct { string `json:"baseCurrency,omitempty"` End string `json:"end,omitempty"` ID string `json:"id,omitempty"` IDType string `json:"idType,omitempty"` Returns []float64 `json:"returns"` Start string `json:"start,omitempty"` }BaseCurrency
PerformanceNavDataItems0 performance nav data items0 swagger:model PerformanceNavDataItems0
func (*PerformanceNavDataItems0) MarshalBinary ¶
func (m *PerformanceNavDataItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerformanceNavDataItems0) UnmarshalBinary ¶
func (m *PerformanceNavDataItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PerformanceTpps ¶
type PerformanceTpps struct { // data Data []*PerformanceTppsDataItems0 `json:"data"` // array of dates, the length should be same as the length of returns inside data. Dates []string `json:"dates"` // M means Month Freq string `json:"freq,omitempty"` }
PerformanceTpps Time period performance data swagger:model PerformanceTpps
func (*PerformanceTpps) MarshalBinary ¶
func (m *PerformanceTpps) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerformanceTpps) UnmarshalBinary ¶
func (m *PerformanceTpps) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PerformanceTppsDataItems0 ¶
type PerformanceTppsDataItems0 struct { // base currency BaseCurrency string `json:"baseCurrency,omitempty"` // end date-- yyyyMMdd End string `json:"end,omitempty"` // id ID string `json:"id,omitempty"` // for example-- acctid IDType string `json:"idType,omitempty"` // each value stands for price change percent of corresponding date in dates array Returns []float64 `json:"returns"` // start date-- yyyyMMdd Start string `json:"start,omitempty"` }
PerformanceTppsDataItems0 performance tpps data items0 swagger:model PerformanceTppsDataItems0
func (*PerformanceTppsDataItems0) MarshalBinary ¶
func (m *PerformanceTppsDataItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PerformanceTppsDataItems0) UnmarshalBinary ¶
func (m *PerformanceTppsDataItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PositionItems0 ¶
type PositionItems0 struct { // acct Id AcctID string `json:"acctId,omitempty"` // asset class AssetClass string `json:"assetClass,omitempty"` // avg cost AvgCost float64 `json:"avgCost,omitempty"` // avg price AvgPrice float64 `json:"avgPrice,omitempty"` // base avg cost BaseAvgCost float64 `json:"baseAvgCost,omitempty"` // base avg price BaseAvgPrice float64 `json:"baseAvgPrice,omitempty"` // base mkt price BaseMktPrice float64 `json:"baseMktPrice,omitempty"` // base mkt value BaseMktValue float64 `json:"baseMktValue,omitempty"` // base realized pnl BaseRealizedPnl float64 `json:"baseRealizedPnl,omitempty"` // base unrealized pnl BaseUnrealizedPnl float64 `json:"baseUnrealizedPnl,omitempty"` // con exch map ConExchMap []string `json:"conExchMap"` // conid Conid int64 `json:"conid,omitempty"` // contract desc ContractDesc string `json:"contractDesc,omitempty"` // currency Currency string `json:"currency,omitempty"` // exchs Exchs string `json:"exchs,omitempty"` // exercise style ExerciseStyle string `json:"exerciseStyle,omitempty"` // expiry Expiry string `json:"expiry,omitempty"` // full name FullName string `json:"fullName,omitempty"` // group Group string `json:"group,omitempty"` // last trading day LastTradingDay string `json:"lastTradingDay,omitempty"` // mkt price MktPrice float64 `json:"mktPrice,omitempty"` // mkt value MktValue float64 `json:"mktValue,omitempty"` // model Model string `json:"model,omitempty"` // multiplier Multiplier float64 `json:"multiplier,omitempty"` // name Name string `json:"name,omitempty"` // page size PageSize int64 `json:"pageSize,omitempty"` // position Position float64 `json:"position,omitempty"` // put or call PutOrCall string `json:"putOrCall,omitempty"` // realized pnl RealizedPnl float64 `json:"realizedPnl,omitempty"` // sector Sector string `json:"sector,omitempty"` // sector group SectorGroup string `json:"sectorGroup,omitempty"` // strike Strike float64 `json:"strike,omitempty"` // ticker Ticker string `json:"ticker,omitempty"` // und comp UndComp string `json:"undComp,omitempty"` // und conid UndConid int64 `json:"undConid,omitempty"` // und sym UndSym string `json:"undSym,omitempty"` // unrealized pnl UnrealizedPnl float64 `json:"unrealizedPnl,omitempty"` }
PositionItems0 Account Information swagger:model PositionItems0
func (*PositionItems0) MarshalBinary ¶
func (m *PositionItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PositionItems0) UnmarshalBinary ¶
func (m *PositionItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ScannerParams ¶
type ScannerParams struct { // filter Filter []*ScannerParamsFilterItems0 `json:"filter"` // for example-STK Instrument string `json:"instrument,omitempty"` // location Location string `json:"location,omitempty"` // size Size string `json:"size,omitempty"` // for example-TOP_PERC_GAIN Type string `json:"type,omitempty"` }
ScannerParams scanner params swagger:model scanner-params
func (*ScannerParams) MarshalBinary ¶
func (m *ScannerParams) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ScannerParams) UnmarshalBinary ¶
func (m *ScannerParams) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ScannerParamsFilterItems0 ¶
type ScannerParamsFilterItems0 struct { // code Code string `json:"code,omitempty"` // value Value float64 `json:"value,omitempty"` }
ScannerParamsFilterItems0 scanner params filter items0 swagger:model ScannerParamsFilterItems0
func (*ScannerParamsFilterItems0) MarshalBinary ¶
func (m *ScannerParamsFilterItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ScannerParamsFilterItems0) UnmarshalBinary ¶
func (m *ScannerParamsFilterItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ScannerResult ¶
type ScannerResult struct { // contracts Contracts *ScannerResultContracts `json:"Contracts,omitempty"` // id ID float64 `json:"id,omitempty"` // offset Offset int64 `json:"offset,omitempty"` // position Position string `json:"position,omitempty"` // scan time ScanTime string `json:"scanTime,omitempty"` // size Size int64 `json:"size,omitempty"` // total Total int64 `json:"total,omitempty"` }
ScannerResult scanner result swagger:model scanner-result
func (*ScannerResult) MarshalBinary ¶
func (m *ScannerResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ScannerResult) UnmarshalBinary ¶
func (m *ScannerResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ScannerResultContracts ¶
type ScannerResultContracts struct { // contract Contract []*ScannerResultContractsContractItems0 `json:"Contract"` }
ScannerResultContracts Contains list of contracts matching the scanner query swagger:model ScannerResultContracts
func (*ScannerResultContracts) MarshalBinary ¶
func (m *ScannerResultContracts) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ScannerResultContracts) UnmarshalBinary ¶
func (m *ScannerResultContracts) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ScannerResultContractsContractItems0 ¶
type ScannerResultContractsContractItems0 struct { // contract ID ContractID int64 `json:"contractID,omitempty"` // distance Distance int64 `json:"distance,omitempty"` // in scan time InScanTime string `json:"inScanTime,omitempty"` }
ScannerResultContractsContractItems0 scanner result contracts contract items0 swagger:model ScannerResultContractsContractItems0
func (*ScannerResultContractsContractItems0) MarshalBinary ¶
func (m *ScannerResultContractsContractItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ScannerResultContractsContractItems0) UnmarshalBinary ¶
func (m *ScannerResultContractsContractItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SecdefItems0 ¶
type SecdefItems0 struct { // asset class AssetClass string `json:"assetClass,omitempty"` // conid Conid int64 `json:"conid,omitempty"` // expiry Expiry string `json:"expiry,omitempty"` // full name FullName string `json:"fullName,omitempty"` // group Group string `json:"group,omitempty"` // last trading day LastTradingDay string `json:"lastTradingDay,omitempty"` // name Name string `json:"name,omitempty"` // page size PageSize int64 `json:"pageSize,omitempty"` // put or call PutOrCall string `json:"putOrCall,omitempty"` // sector Sector string `json:"sector,omitempty"` // sector group SectorGroup string `json:"sectorGroup,omitempty"` // strike Strike float64 `json:"strike,omitempty"` // ticker Ticker string `json:"ticker,omitempty"` // und conid UndConid int64 `json:"undConid,omitempty"` }
SecdefItems0 security definition information swagger:model SecdefItems0
func (*SecdefItems0) MarshalBinary ¶
func (m *SecdefItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SecdefItems0) UnmarshalBinary ¶
func (m *SecdefItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SetAccount ¶
type SetAccount struct { // Account ID AcctID string `json:"acctId,omitempty"` }
SetAccount set account swagger:model set-account
func (*SetAccount) MarshalBinary ¶
func (m *SetAccount) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SetAccount) UnmarshalBinary ¶
func (m *SetAccount) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type StatsData ¶
type StatsData struct { // conid Conid float64 `json:"Conid,omitempty"` // exchange Exchange string `json:"Exchange,omitempty"` // Object, payload depends on event type. See confluence page for IGEvntUpd. P string `json:"P,omitempty"` // t T float64 `json:"T,omitempty"` // t t TT float64 `json:"TT,omitempty"` // v V float64 `json:"V,omitempty"` }
StatsData stats data swagger:model stats-data
func (*StatsData) MarshalBinary ¶
MarshalBinary interface implementation
func (*StatsData) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Summary ¶
type Summary struct { // amount Amount float64 `json:"amount,omitempty"` // currency Currency string `json:"currency,omitempty"` // is null IsNull bool `json:"isNull,omitempty"` // timestamp Timestamp int64 `json:"timestamp,omitempty"` // value Value string `json:"value,omitempty"` }
Summary summary swagger:model summary
func (*Summary) MarshalBinary ¶
MarshalBinary interface implementation
func (*Summary) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Trade ¶
type Trade struct { // account Account string `json:"account,omitempty"` // clearing id ClearingID string `json:"clearing_id,omitempty"` // clearing name ClearingName string `json:"clearing_name,omitempty"` // comission Comission float64 `json:"comission,omitempty"` // company name CompanyName string `json:"company_name,omitempty"` // conidex Conidex string `json:"conidex,omitempty"` // contract description 1 ContractDescription1 string `json:"contract_description_1,omitempty"` // exchange Exchange string `json:"exchange,omitempty"` // execution id ExecutionID string `json:"execution_id,omitempty"` // net amount NetAmount float64 `json:"net_amount,omitempty"` // order description OrderDescription string `json:"order_description,omitempty"` // User defined string used to identify the order. Value is set using "cOID" field while placing an order. OrderRef string `json:"order_ref,omitempty"` // position Position string `json:"position,omitempty"` // price Price string `json:"price,omitempty"` // sec type SecType string `json:"sec_type,omitempty"` // side Side string `json:"side,omitempty"` // size Size string `json:"size,omitempty"` // submitter Submitter string `json:"submitter,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` // trade time TradeTime string `json:"trade_time,omitempty"` // trade time r TradeTimer float64 `json:"trade_time_r,omitempty"` }
Trade trade swagger:model trade
func (*Trade) MarshalBinary ¶
MarshalBinary interface implementation
func (*Trade) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type WagersItems0 ¶
type WagersItems0 struct { // conid Conid float64 `json:"conid,omitempty"` // curr Curr string `json:"curr,omitempty"` // desc Desc string `json:"desc,omitempty"` // part Part string `json:"part,omitempty"` }
WagersItems0 List of wagers swagger:model WagersItems0
func (*WagersItems0) MarshalBinary ¶
func (m *WagersItems0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WagersItems0) UnmarshalBinary ¶
func (m *WagersItems0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Source Files ¶
- account.go
- accounts.go
- allocation.go
- auth_status.go
- calendar_request.go
- contract.go
- events.go
- futures.go
- history_data.go
- history_result.go
- inds.go
- ledger.go
- market_data.go
- modify_order.go
- notifications.go
- order.go
- order_request.go
- performance.go
- position.go
- scanner_params.go
- scanner_result.go
- secdef.go
- set_account.go
- stats_data.go
- summary.go
- trade.go
- wagers.go