Skip to content

trying to get reqMktData working with CONTFUT but getting Error 321 #30

Answered by lbilli
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

It's not clear what Wrap.contractDetails() does exactly in this example.

Anyway, in the following pattern:

for (idx, s) in ...
    contract = Jib.Contract(...)
    Jib.reqContractDetails(ib, idx, contract)
    Jib.reqMktData(ib, idx, contract, "", false)
end

there is only one contract and it is fed to both reqContractDetails() and reqMktData().
reqContractDetails() doesn't return anything and doesn't change its arguments nor any sorrounding variables.

Also, the communication with TWS happens asynchronously, i.e.: Wrap.contractDetails() is called only when TWS responses are received and you don't have any control on when, if or how many times it is ever executed.
If it is indeed executed t…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@ghost
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant