diff --git a/Project.toml b/Project.toml index baa4e8f..8c0bad7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Jib" uuid = "f310f2d2-a263-11e8-3998-47bd686f18f7" authors = ["Luca Billi "] -version = "0.19.1" +version = "0.19.2" [deps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" diff --git a/src/process.jl b/src/process.jl index 1ef0315..75e22d9 100644 --- a/src/process.jl +++ b/src/process.jl @@ -661,7 +661,12 @@ const process = Dict{Int,Function}( # TODO Use a Tuple instead? nd::Int = pop(it) - ContractDescription(c, collect(String, take(it, nd))) + dst = collect(String, take(it, nd)) + + ver ≥ Client.BOND_ISSUERID && slurp!(c, (:description, + :issuerId), it) + + ContractDescription(c, dst) end w.symbolSamples(reqId, cd) diff --git a/src/requests.jl b/src/requests.jl index 48357f1..a8fd645 100644 --- a/src/requests.jl +++ b/src/requests.jl @@ -292,6 +292,8 @@ function reqContractDetails(ib::Connection, reqId::Int, contract::Contract) reqId, splat(contract, 1:15)) + ib.version ≥ Client.BOND_ISSUERID && o(contract.issuerId) + sendmsg(ib, o) end diff --git a/src/types_mutable.jl b/src/types_mutable.jl index 0271fd8..434408f 100644 --- a/src/types_mutable.jl +++ b/src/types_mutable.jl @@ -14,6 +14,8 @@ mutable struct Contract includeExpired::Bool secIdType::String secId::String + description::String + issuerId::String comboLegsDescrip::String comboLegs::Vector{ComboLeg} deltaNeutralContract::Union{DeltaNeutralContract,Nothing} @@ -25,7 +27,7 @@ Contract(; conId= 0, currency= ns, localSymbol= ns) = Contract(conId, symbol, secType, ns, 0.0, ns, ns, exchange, ns, currency, localSymbol, ns, - false, ns, ns, ns, [], nothing) + false, ns, ns, ns, ns, ns, [], nothing) mutable struct Order diff --git a/src/versions.jl b/src/versions.jl index 2c1c832..66cc6fe 100644 --- a/src/versions.jl +++ b/src/versions.jl @@ -11,5 +11,6 @@ WSH_EVENT_DATA_FILTERS_DATE = 173 INSTRUMENT_TIMEZONE = 174 HMDS_MARKET_DATA_IN_SHARES = 175 + BOND_ISSUERID = 176 end