Class BrokerClientIB
Broker client class for Interactive Brokers.
Inheritance
object
BrokerClientIB
Implements
IBApi.EWrapper
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TuringTrader.Simulator
Assembly: TuringTrader.Simulator.dll
Syntax
public class BrokerClientIB : BrokerClientIBBase, EWrapper
Properties
|
Improve this Doc
View Source
ManagedAcccounts
Declaration
public HashSet<string> ManagedAcccounts { get; }
Property Value
Type |
Description |
System.Collections.Generic.HashSet<T><string> |
|
Methods
|
Improve this Doc
View Source
accountSummary(int, string, string, string, string)
Declaration
public override void accountSummary(int reqId, string account, string tag, string value, string currency)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
account |
|
string |
tag |
|
string |
value |
|
string |
currency |
|
Overrides
|
Improve this Doc
View Source
AccountSummary(string)
Declaration
public Dictionary<string, double> AccountSummary(string account)
Parameters
Type |
Name |
Description |
string |
account |
|
Returns
Type |
Description |
System.Collections.Generic.Dictionary<TKey, TValue><string, double> |
|
|
Improve this Doc
View Source
accountSummaryEnd(int)
Declaration
public override void accountSummaryEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
Overrides
|
Improve this Doc
View Source
CancelMarketData(InstrumentInfo)
Declaration
public void CancelMarketData(BrokerClientIB.InstrumentInfo info)
Parameters
|
Improve this Doc
View Source
Connect(string, string, int, string)
Declaration
public void Connect(string username, string password, int port = 7497, string ip = "127.0.0.1")
Parameters
Type |
Name |
Description |
string |
username |
|
string |
password |
|
int |
port |
|
string |
ip |
|
|
Improve this Doc
View Source
contractDetails(int, ContractDetails)
Declaration
public override void contractDetails(int reqId, ContractDetails contractDetails)
Parameters
Type |
Name |
Description |
int |
reqId |
|
IBApi.ContractDetails |
contractDetails |
|
Overrides
|
Improve this Doc
View Source
ContractDetails(string, string, string, string)
Declaration
public HashSet<BrokerClientIB.InstrumentInfo> ContractDetails(string symbol, string secType = "STK", string exchange = "SMART", string currency = "USD")
Parameters
Type |
Name |
Description |
string |
symbol |
|
string |
secType |
|
string |
exchange |
|
string |
currency |
|
Returns
|
Improve this Doc
View Source
contractDetailsEnd(int)
Declaration
public override void contractDetailsEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
Overrides
|
Improve this Doc
View Source
Disconnect()
Declaration
|
Improve this Doc
View Source
error(Exception)
Declaration
public override void error(Exception e)
Parameters
Type |
Name |
Description |
System.Exception |
e |
|
Overrides
|
Improve this Doc
View Source
error(int, int, string)
Declaration
public override void error(int id, int errorCode, string errorMsg)
Parameters
Type |
Name |
Description |
int |
id |
|
int |
errorCode |
|
string |
errorMsg |
|
Overrides
|
Improve this Doc
View Source
error(string)
Declaration
public override void error(string str)
Parameters
Type |
Name |
Description |
string |
str |
|
Overrides
|
Improve this Doc
View Source
managedAccounts(string)
Declaration
public override void managedAccounts(string accountsList)
Parameters
Type |
Name |
Description |
string |
accountsList |
|
Overrides
|
Improve this Doc
View Source
marketDataType(int, int)
Declaration
public override void marketDataType(int reqId, int marketDataType)
Parameters
Type |
Name |
Description |
int |
reqId |
|
int |
marketDataType |
|
Overrides
|
Improve this Doc
View Source
nextValidId(int)
IB callback: Set next valid order id.
Declaration
public override void nextValidId(int orderId)
Parameters
Type |
Name |
Description |
int |
orderId |
|
Overrides
|
Improve this Doc
View Source
position(string, Contract, double, double)
Declaration
public override void position(string account, Contract contract, double pos, double avgCost)
Parameters
Type |
Name |
Description |
string |
account |
|
IBApi.Contract |
contract |
|
double |
pos |
|
double |
avgCost |
|
Overrides
|
Improve this Doc
View Source
positionEnd()
Declaration
public override void positionEnd()
Overrides
|
Improve this Doc
View Source
Positions(string)
Declaration
public Dictionary<Contract, double> Positions(string account)
Parameters
Type |
Name |
Description |
string |
account |
|
Returns
Type |
Description |
System.Collections.Generic.Dictionary<TKey, TValue><IBApi.Contract, double> |
|
|
Improve this Doc
View Source
RequestMarketData(InstrumentInfo, AutoResetEvent)
Declaration
public void RequestMarketData(BrokerClientIB.InstrumentInfo info, AutoResetEvent sync = null)
Parameters
|
Improve this Doc
View Source
tickOptionComputation(int, int, double, double, double, double, double, double, double, double)
Declaration
public override void tickOptionComputation(int tickerId, int field, double impliedVolatility, double delta, double optPrice, double pvDividend, double gamma, double vega, double theta, double undPrice)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
field |
|
double |
impliedVolatility |
|
double |
delta |
|
double |
optPrice |
|
double |
pvDividend |
|
double |
gamma |
|
double |
vega |
|
double |
theta |
|
double |
undPrice |
|
Overrides
|
Improve this Doc
View Source
tickPrice(int, int, double, int)
Declaration
public override void tickPrice(int tickerId, int field, double price, int canAutoExecute)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
field |
|
double |
price |
|
int |
canAutoExecute |
|
Overrides
|
Improve this Doc
View Source
tickSize(int, int, int)
Declaration
public override void tickSize(int tickerId, int field, int size)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
field |
|
int |
size |
|
Overrides
|
Improve this Doc
View Source
tickString(int, int, string)
Declaration
public override void tickString(int tickerId, int tickType, string value)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
tickType |
|
string |
value |
|
Overrides
Implements
IBApi.EWrapper