-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Justin Tirrell edited this page Sep 29, 2020
·
2 revisions
All messages sent to and received from IB will be a map which has an ::ib/op
key which corresponds to the name of the EClient/EWrapper method names. It will also contain an unqualified keyword+value pair for each parameter, with the keyword corresponding to the name used in the Java Client source. See EWrapper for received messages and EClient for send messages.
You can use ib/req->params
and ib/recv->params
to look up parameter names for a given method.
(ib/req->params :reqHistoricalData)
;;=>
[:tickerId
:contract
:endDateTime
:durationStr
:barSizeSetting
:whatToShow
:useRTH
:formatDate
:keepUpToDate
:chartOptions]
IB data types such as Contract
and Order
can be specified as maps with keywords which correspond to getters and setters, which additionall need an ::ib/type
key with a value corresponding to the non-qualified class name, such as :Contract or :Order.
{:symbol sym
:secType "STK"
:localSymbol "SPY"
:currency "USD"
:exchange "SMART"
::ib/type :Contract}