Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Java API, ordering question
marinindextrader
Market Order Price Values are ignored or not required...
toggle quoted message
Show quoted text
A proper MKT order call looks like this in a literal sense: Call PlaceNewOrder("BUY", 1, "ES", "FUT", "200209", 0, "", "GLOBEX", "", "MKT", 0, 0) This is a MKT order call for one contract of September ES on the Globex Exchange. Of course one can use variables of proper type in lieu of literals... In order to asses the results of your Market Order you will need to use: Call reqExecutions The data will then be fed back through the openOrder1(), openOrder2 (), and orderStatus() Events where they can be captured, analyzed and diseminated... Begin by reading the TWS API help files. Though brief in nature, they are concise and indespensible in understanding how all of the events and methods tie together... Events Syntax: X_Other/activexevents.htm Methods Syntax: X_Other/activexmethods.htm Properties Syntax: X_Other/activexproperties.htm Scott --- In twsapi@y..., usernew <no_reply@y...> wrote:
When I say qty=500, and market order type, price = 20.00, |
usernew
I have read the APIs but I am still not sure how things work hence
these questions. When I submit an order of type MKT, it will sell stocks at whatever the market bid price happens to be when I submit the order ? and it will buy stocks at whatever the market ask price happens to be ? Also, I am still curious about what happens if it is not able to find all the stocks I am requesting at one price. I assume it will do partial fills with different prices. I can tell this because there is the average price coming in to orderStatus() event. Is it possible to tell how many of the stocks were purchased at what price without doing any guessing ? Thanks. --- In twsapi@y..., "marinindextrader" <marinindextrader@y...> wrote: Market Order Price Values are ignored or not required...and diseminated...they are concise and indespensible in understanding how all of theevents and methods tie together... X_Other/activexevents.htm X_Other/activexmethods.htm X_Other/activexproperties.htmusing MKT order type. |
to navigate to use esc to dismiss