Skip to content

Commit

Permalink
Update to API v160
Browse files Browse the repository at this point in the history
  • Loading branch information
lbilli committed Jun 2, 2021
1 parent 40be941 commit 32e8e4f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Jib"
uuid = "f310f2d2-a263-11e8-3998-47bd686f18f7"
authors = ["Luca Billi <[email protected]>"]
version = "0.12.1"
version = "0.12.2"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down
2 changes: 2 additions & 0 deletions src/process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ const process = Dict{Int,Function}( # TODO Use a Tuple instead?

ver Client.DURATION && (o.duration = pop(it))

ver Client.POST_TO_ATS && (o.postToAts = pop(it))

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

Expand Down
2 changes: 2 additions & 0 deletions src/requests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ function placeOrder(ib::Connection, id::Int, contract::Contract, order::Order)

ib.version Client.DURATION && o(order.duration)

ib.version Client.POST_TO_ATS && o(order.postToAts)

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 @@ -157,6 +157,7 @@ mutable struct Order
parentPermId::Union{Int,Nothing}
usePriceMgmtAlgo::Union{Bool,Nothing}
duration::Union{Int,Nothing}
postToAts::Union{Int,Nothing}
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 @@ -167,7 +168,7 @@ Order() = Order(0, 0, 0, ns, 0, ns, nothing, nothing, ns, ns, ns, ns, 0, ns, tru
(;), (;), ns, false, false, false, ns, [], (;), 0, 0, false, 0, ns, ns,
fill(nothing, 4)..., 0, nothing, [], false, false, ns, SoftDollarTier(),
nothing, ns, ns, ns, ns, false, false, false, ns, nothing, nothing,
false, ns, false, false, nothing, nothing, nothing)
false, ns, false, false, nothing, nothing, nothing, nothing)


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 @@ -5,5 +5,6 @@
REPLACE_FA_END = 157
DURATION = 158
MARKET_DATA_IN_SHARES = 159
POST_TO_ATS = 160

end

0 comments on commit 32e8e4f

Please sign in to comment.