Jump to content
Medved Trader Forums
  • 0

API for Trade Ticket...


Trader_V

Question

5 answers to this question

Recommended Posts

  • 0

actually, there is but not documented yet. we will however be updating our API at which time lots of things will change.  In general, our API docs are at https://medvedtrader.com/api

the command in question is FillTradeTicket and is done as a POST to:

http://127.0.0.1:16239/req?FillTradeTicket(SYMBOL, UpdateType, ForceNewInstance)

(UpdateType and ForceNewInstance can be omitted, in which case they will be ReplaceAll and false respectively)


SYMBOL: obvious
UpdateType: there are a bunch of options but basically should just use ReplaceAll, meaning that everything on the trade ticket will be replaced with newly provided values
ForceNewInstance: if true, then always create a new TradeTicket window. Otherwise, it will reuse existing one if there is one

POST DATA should  be JSON or XML like this:
<Order>
    <CommandType>NewOrder</CommandType>
    <ConditionalType>None</ConditionalType>
    <Legs>
        <Symbol>NFLX</Symbol>
        <Quantity>100</Quantity>
        <Action>Buy</Action>
        <OrderType>Limit</OrderType>
        <LimitPrice>420.00</LimitPrice>
        <Routing>NSDQ</Routing>
        <DisplaySize>200</DisplaySize>
        <TIF>Day</TIF>
        <TIFDate>2020-10-19</TIFDate>
    </Legs>
</Order>

Fill in the values accordingly. If JSON, same structure as above

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...