Skip to content

Commit

Permalink
Merged upstream branch and bumped version.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviermilla committed Mar 17, 2024
2 parents 373882a + d42801e commit 4bc513c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "InteractiveBrokers"
uuid = "f310f2d2-a263-11e8-3998-47bd686f18f7"
authors = ["Luca Billi <[email protected]>", "Olivier Milla <[email protected]>"]
version = "0.20.5"
version = "0.20.6"

[deps]
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand Down
4 changes: 4 additions & 0 deletions src/process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ const process = Dict(
:midOffsetAtWhole,
:midOffsetAtHalf), it)

ver Client.CUSTOMER_ACCOUNT && (o.customerAccount = pop(it))

w.openOrder(o.orderId, c, o, os)
end,

Expand Down Expand Up @@ -1032,6 +1034,8 @@ const process = Dict(
:midOffsetAtWhole,
:midOffsetAtHalf), it)

ver Client.CUSTOMER_ACCOUNT && (o.customerAccount = pop(it))

w.completedOrder(c, o, os)
end,

Expand Down
6 changes: 5 additions & 1 deletion src/requests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ function placeOrder(ib::Connection, id::Int, contract::Contract, order::Order)
order.midOffsetAtHalf)
end

ib.version Client.CUSTOMER_ACCOUNT && o(order.customerAccount)

sendmsg(ib, o)
end

Expand Down Expand Up @@ -372,7 +374,7 @@ function reqHistoricalData(ib::Connection, tickerId::Int, contract::Contract, en
sendmsg(ib, o)
end

function exerciseOptions(ib::Connection, tickerId::Int, contract::Contract, exerciseAction::Int, exerciseQuantity::Int, account::String, override::Int, manualOrderTime::String)
function exerciseOptions(ib::Connection, tickerId::Int, contract::Contract, exerciseAction::Int, exerciseQuantity::Int, account::String, override::Int, manualOrderTime::String, customerAccount::String)

o = enc()

Expand All @@ -386,6 +388,8 @@ function exerciseOptions(ib::Connection, tickerId::Int, contract::Contract, exer

ib.version Client.MANUAL_ORDER_TIME_EXERCISE_OPTIONS && o(manualOrderTime)

ib.version Client.CUSTOMER_ACCOUNT && o(customerAccount)

sendmsg(ib, o)
end

Expand Down
3 changes: 2 additions & 1 deletion src/types_mutable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ mutable struct Order
competeAgainstBestOffset::Union{Float64,Nothing}
midOffsetAtWhole::Union{Float64,Nothing}
midOffsetAtHalf::Union{Float64,Nothing}
customerAccount::String
end
Order() = Order(0, 0, 0, ns, 0, ns, nothing, nothing, ns, ns, ns, ns, 0, ns, true, 0,
false, false, nothing, 0, false, false, ns, ns, ns, false, nothing, nothing,
Expand All @@ -178,7 +179,7 @@ Order() = Order(0, 0, 0, ns, 0, ns, nothing, nothing, ns, ns, ns, ns, 0, ns, tru
fill(nothing, 4)..., 0, nothing, [], false, false, ns, SoftDollarTier(),
nothing, ns, ns, ns, ns, false, false, false, ns, nothing, nothing,
false, ns, false, false, fill(nothing, 4)..., ns, ns,
fill(nothing, 5)...)
fill(nothing, 5)..., ns)


mutable struct ScannerSubscription
Expand Down
1 change: 1 addition & 0 deletions src/versions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
MANUAL_ORDER_TIME_EXERCISE_OPTIONS = 180
OPEN_ORDER_AD_STRATEGY = 181
LAST_TRADE_DATE = 182
CUSTOMER_ACCOUNT = 183

end

0 comments on commit 4bc513c

Please sign in to comment.