Class BrokerClientIBBase
Base class for IB broker client.
Inheritance
object
BrokerClientIBBase
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 BrokerClientIBBase : EWrapper
Constructors
|
Improve this Doc
View Source
BrokerClientIBBase()
Declaration
public BrokerClientIBBase()
Fields
|
Improve this Doc
View Source
ClientSocket
Declaration
protected readonly EClientSocket ClientSocket
Field Value
Type |
Description |
IBApi.EClientSocket |
|
|
Improve this Doc
View Source
NextOrderId
Declaration
protected volatile int NextOrderId
Field Value
|
Improve this Doc
View Source
Signal
Declaration
protected readonly EReaderSignal Signal
Field Value
Type |
Description |
IBApi.EReaderSignal |
|
Methods
|
Improve this Doc
View Source
accountDownloadEnd(string)
Declaration
public virtual void accountDownloadEnd(string account)
Parameters
Type |
Name |
Description |
string |
account |
|
|
Improve this Doc
View Source
accountSummary(int, string, string, string, string)
Declaration
public virtual 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 |
|
|
Improve this Doc
View Source
accountSummaryEnd(int)
Declaration
public virtual void accountSummaryEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
accountUpdateMulti(int, string, string, string, string, string)
Declaration
public virtual void accountUpdateMulti(int reqId, string account, string modelCode, string key, string value, string currency)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
account |
|
string |
modelCode |
|
string |
key |
|
string |
value |
|
string |
currency |
|
|
Improve this Doc
View Source
accountUpdateMultiEnd(int)
Declaration
public virtual void accountUpdateMultiEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
bondContractDetails(int, ContractDetails)
Declaration
public virtual void bondContractDetails(int requestId, ContractDetails contractDetails)
Parameters
Type |
Name |
Description |
int |
requestId |
|
IBApi.ContractDetails |
contractDetails |
|
|
Improve this Doc
View Source
commissionReport(CommissionReport)
Declaration
public virtual void commissionReport(CommissionReport commissionReport)
Parameters
Type |
Name |
Description |
IBApi.CommissionReport |
commissionReport |
|
|
Improve this Doc
View Source
connectAck()
Declaration
|
Improve this Doc
View Source
connectionClosed()
Declaration
public virtual void connectionClosed()
|
Improve this Doc
View Source
contractDetails(int, ContractDetails)
Declaration
public virtual void contractDetails(int reqId, ContractDetails contractDetails)
Parameters
Type |
Name |
Description |
int |
reqId |
|
IBApi.ContractDetails |
contractDetails |
|
|
Improve this Doc
View Source
contractDetailsEnd(int)
Declaration
public virtual void contractDetailsEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
currentTime(long)
Declaration
public virtual void currentTime(long time)
Parameters
Type |
Name |
Description |
long |
time |
|
|
Improve this Doc
View Source
deltaNeutralValidation(int, UnderComp)
Declaration
public virtual void deltaNeutralValidation(int reqId, UnderComp underComp)
Parameters
Type |
Name |
Description |
int |
reqId |
|
IBApi.UnderComp |
underComp |
|
|
Improve this Doc
View Source
displayGroupList(int, string)
Declaration
public virtual void displayGroupList(int reqId, string groups)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
groups |
|
|
Improve this Doc
View Source
displayGroupUpdated(int, string)
Declaration
public virtual void displayGroupUpdated(int reqId, string contractInfo)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
contractInfo |
|
|
Improve this Doc
View Source
error(Exception)
Declaration
public virtual void error(Exception e)
Parameters
Type |
Name |
Description |
System.Exception |
e |
|
|
Improve this Doc
View Source
error(int, int, string)
Declaration
public virtual void error(int id, int errorCode, string errorMsg)
Parameters
Type |
Name |
Description |
int |
id |
|
int |
errorCode |
|
string |
errorMsg |
|
|
Improve this Doc
View Source
error(string)
Declaration
public virtual void error(string str)
Parameters
Type |
Name |
Description |
string |
str |
|
|
Improve this Doc
View Source
execDetails(int, Contract, Execution)
Declaration
public virtual void execDetails(int reqId, Contract contract, Execution execution)
Parameters
Type |
Name |
Description |
int |
reqId |
|
IBApi.Contract |
contract |
|
IBApi.Execution |
execution |
|
|
Improve this Doc
View Source
execDetailsEnd(int)
Declaration
public virtual void execDetailsEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
fundamentalData(int, string)
Declaration
public virtual void fundamentalData(int reqId, string data)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
data |
|
|
Improve this Doc
View Source
historicalData(int, string, double, double, double, double, int, int, double, bool)
Declaration
public virtual void historicalData(int reqId, string date, double open, double high, double low, double close, int volume, int count, double WAP, bool hasGaps)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
date |
|
double |
open |
|
double |
high |
|
double |
low |
|
double |
close |
|
int |
volume |
|
int |
count |
|
double |
WAP |
|
bool |
hasGaps |
|
|
Improve this Doc
View Source
historicalDataEnd(int, string, string)
Declaration
public virtual void historicalDataEnd(int reqId, string startDate, string endDate)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
startDate |
|
string |
endDate |
|
|
Improve this Doc
View Source
managedAccounts(string)
Declaration
public virtual void managedAccounts(string accountsList)
Parameters
Type |
Name |
Description |
string |
accountsList |
|
|
Improve this Doc
View Source
marketDataType(int, int)
Declaration
public virtual void marketDataType(int reqId, int marketDataType)
Parameters
Type |
Name |
Description |
int |
reqId |
|
int |
marketDataType |
|
|
Improve this Doc
View Source
nextValidId(int)
Declaration
public virtual void nextValidId(int orderId)
Parameters
Type |
Name |
Description |
int |
orderId |
|
|
Improve this Doc
View Source
openOrder(int, Contract, Order, OrderState)
Declaration
public virtual void openOrder(int orderId, Contract contract, Order order, OrderState orderState)
Parameters
Type |
Name |
Description |
int |
orderId |
|
IBApi.Contract |
contract |
|
IBApi.Order |
order |
|
IBApi.OrderState |
orderState |
|
|
Improve this Doc
View Source
openOrderEnd()
Declaration
public virtual void openOrderEnd()
|
Improve this Doc
View Source
orderStatus(int, string, double, double, double, int, int, double, int, string)
Declaration
public virtual void orderStatus(int orderId, string status, double filled, double remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, string whyHeld)
Parameters
Type |
Name |
Description |
int |
orderId |
|
string |
status |
|
double |
filled |
|
double |
remaining |
|
double |
avgFillPrice |
|
int |
permId |
|
int |
parentId |
|
double |
lastFillPrice |
|
int |
clientId |
|
string |
whyHeld |
|
|
Improve this Doc
View Source
position(string, Contract, double, double)
Declaration
public virtual void position(string account, Contract contract, double pos, double avgCost)
Parameters
Type |
Name |
Description |
string |
account |
|
IBApi.Contract |
contract |
|
double |
pos |
|
double |
avgCost |
|
|
Improve this Doc
View Source
positionEnd()
Declaration
public virtual void positionEnd()
|
Improve this Doc
View Source
positionMulti(int, string, string, Contract, double, double)
Declaration
public virtual void positionMulti(int reqId, string account, string modelCode, Contract contract, double pos, double avgCost)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
account |
|
string |
modelCode |
|
IBApi.Contract |
contract |
|
double |
pos |
|
double |
avgCost |
|
|
Improve this Doc
View Source
positionMultiEnd(int)
Declaration
public virtual void positionMultiEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
realtimeBar(int, long, double, double, double, double, long, double, int)
Declaration
public virtual void realtimeBar(int reqId, long time, double open, double high, double low, double close, long volume, double WAP, int count)
Parameters
Type |
Name |
Description |
int |
reqId |
|
long |
time |
|
double |
open |
|
double |
high |
|
double |
low |
|
double |
close |
|
long |
volume |
|
double |
WAP |
|
int |
count |
|
|
Improve this Doc
View Source
receiveFA(int, string)
Declaration
public virtual void receiveFA(int faDataType, string faXmlData)
Parameters
Type |
Name |
Description |
int |
faDataType |
|
string |
faXmlData |
|
|
Improve this Doc
View Source
scannerData(int, int, ContractDetails, string, string, string, string)
Declaration
public virtual void scannerData(int reqId, int rank, ContractDetails contractDetails, string distance, string benchmark, string projection, string legsStr)
Parameters
Type |
Name |
Description |
int |
reqId |
|
int |
rank |
|
IBApi.ContractDetails |
contractDetails |
|
string |
distance |
|
string |
benchmark |
|
string |
projection |
|
string |
legsStr |
|
|
Improve this Doc
View Source
scannerDataEnd(int)
Declaration
public virtual void scannerDataEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
scannerParameters(string)
Declaration
public virtual void scannerParameters(string xml)
Parameters
Type |
Name |
Description |
string |
xml |
|
|
Improve this Doc
View Source
securityDefinitionOptionParameter(int, string, int, string, string, HashSet<string>, HashSet<double>)
Declaration
public virtual void securityDefinitionOptionParameter(int reqId, string exchange, int underlyingConId, string tradingClass, string multiplier, HashSet<string> expirations, HashSet<double> strikes)
Parameters
Type |
Name |
Description |
int |
reqId |
|
string |
exchange |
|
int |
underlyingConId |
|
string |
tradingClass |
|
string |
multiplier |
|
System.Collections.Generic.HashSet<T><string> |
expirations |
|
System.Collections.Generic.HashSet<T><double> |
strikes |
|
|
Improve this Doc
View Source
securityDefinitionOptionParameterEnd(int)
Declaration
public virtual void securityDefinitionOptionParameterEnd(int reqId)
Parameters
Type |
Name |
Description |
int |
reqId |
|
|
Improve this Doc
View Source
softDollarTiers(int, SoftDollarTier[])
Declaration
public void softDollarTiers(int reqId, SoftDollarTier[] tiers)
Parameters
Type |
Name |
Description |
int |
reqId |
|
SoftDollarTier[] |
tiers |
|
|
Improve this Doc
View Source
tickEFP(int, int, double, string, double, int, string, double, double)
Declaration
public virtual void tickEFP(int tickerId, int tickType, double basisPoints, string formattedBasisPoints, double impliedFuture, int holdDays, string futureLastTradeDate, double dividendImpact, double dividendsToLastTradeDate)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
tickType |
|
double |
basisPoints |
|
string |
formattedBasisPoints |
|
double |
impliedFuture |
|
int |
holdDays |
|
string |
futureLastTradeDate |
|
double |
dividendImpact |
|
double |
dividendsToLastTradeDate |
|
|
Improve this Doc
View Source
tickGeneric(int, int, double)
Declaration
public virtual void tickGeneric(int tickerId, int field, double value)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
field |
|
double |
value |
|
|
Improve this Doc
View Source
tickOptionComputation(int, int, double, double, double, double, double, double, double, double)
Declaration
public virtual 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 |
|
|
Improve this Doc
View Source
tickPrice(int, int, double, int)
Declaration
public virtual void tickPrice(int tickerId, int field, double price, int canAutoExecute)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
field |
|
double |
price |
|
int |
canAutoExecute |
|
|
Improve this Doc
View Source
tickSize(int, int, int)
Declaration
public virtual void tickSize(int tickerId, int field, int size)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
field |
|
int |
size |
|
|
Improve this Doc
View Source
tickSnapshotEnd(int)
Declaration
public virtual void tickSnapshotEnd(int tickerId)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
|
Improve this Doc
View Source
tickString(int, int, string)
Declaration
public virtual void tickString(int tickerId, int tickType, string value)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
tickType |
|
string |
value |
|
|
Improve this Doc
View Source
updateAccountTime(string)
Declaration
public virtual void updateAccountTime(string timestamp)
Parameters
Type |
Name |
Description |
string |
timestamp |
|
|
Improve this Doc
View Source
updateAccountValue(string, string, string, string)
Declaration
public virtual void updateAccountValue(string key, string value, string currency, string accountName)
Parameters
Type |
Name |
Description |
string |
key |
|
string |
value |
|
string |
currency |
|
string |
accountName |
|
|
Improve this Doc
View Source
updateMktDepth(int, int, int, int, double, int)
Declaration
public virtual void updateMktDepth(int tickerId, int position, int operation, int side, double price, int size)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
position |
|
int |
operation |
|
int |
side |
|
double |
price |
|
int |
size |
|
|
Improve this Doc
View Source
updateMktDepthL2(int, int, string, int, int, double, int)
Declaration
public virtual void updateMktDepthL2(int tickerId, int position, string marketMaker, int operation, int side, double price, int size)
Parameters
Type |
Name |
Description |
int |
tickerId |
|
int |
position |
|
string |
marketMaker |
|
int |
operation |
|
int |
side |
|
double |
price |
|
int |
size |
|
|
Improve this Doc
View Source
updateNewsBulletin(int, int, string, string)
Declaration
public virtual void updateNewsBulletin(int msgId, int msgType, string message, string origExchange)
Parameters
Type |
Name |
Description |
int |
msgId |
|
int |
msgType |
|
string |
message |
|
string |
origExchange |
|
|
Improve this Doc
View Source
updatePortfolio(Contract, double, double, double, double, double, double, string)
Declaration
public virtual void updatePortfolio(Contract contract, double position, double marketPrice, double marketValue, double averageCost, double unrealisedPNL, double realisedPNL, string accountName)
Parameters
Type |
Name |
Description |
IBApi.Contract |
contract |
|
double |
position |
|
double |
marketPrice |
|
double |
marketValue |
|
double |
averageCost |
|
double |
unrealisedPNL |
|
double |
realisedPNL |
|
string |
accountName |
|
|
Improve this Doc
View Source
verifyAndAuthCompleted(bool, string)
Declaration
public virtual void verifyAndAuthCompleted(bool isSuccessful, string errorText)
Parameters
Type |
Name |
Description |
bool |
isSuccessful |
|
string |
errorText |
|
|
Improve this Doc
View Source
verifyAndAuthMessageAPI(string, string)
Declaration
public virtual void verifyAndAuthMessageAPI(string apiData, string xyzChallenge)
Parameters
Type |
Name |
Description |
string |
apiData |
|
string |
xyzChallenge |
|
|
Improve this Doc
View Source
verifyCompleted(bool, string)
Declaration
public virtual void verifyCompleted(bool isSuccessful, string errorText)
Parameters
Type |
Name |
Description |
bool |
isSuccessful |
|
string |
errorText |
|
|
Improve this Doc
View Source
verifyMessageAPI(string)
Declaration
public virtual void verifyMessageAPI(string apiData)
Parameters
Type |
Name |
Description |
string |
apiData |
|
Implements
IBApi.EWrapper