Orders Types

I've scanned the API docs and I can not find an example of placing a Limit order . I see this snippet of code order_id = order.algo_buy(self.symbol, "market", intent="init", order_quantity=100) which suggest to me that "market" is a parameter .
??? Sorry if I am asking a question that has already been addressed else where. ty Devon

Comments

  • ptunneyptunney Posts: 246

    Page 0 of the docs, the landing page is always the best place to start if you know what you are looking for. It is well worth a read through just to familiarise yourself with an overview of most of the commands in the CloudQuant language.
    A quick find on that page for the word limit will return a number of hits, one of which is...

    order.algo_buy(self.symbol, algorithm="limit", intent="init",price=md.L1.bid -0.15,order_quantity=100,collect=self.data_collection)

    It also has a link to the relevant documentation page.
    You don't have to include all parameters. When starting out, intent can be "none" and collect is entirely optional (used for data collection into your trades.csv file).

    Underneath the order commands on page 0 are some examples of "Order Algos" with a link to their documentation.

    You can get very specific as to which type of order algo you wish to use, sending Limit orders to particular algos on particular exchanges.
    Most of these are only really needed as you get closer to taking your model live.

    In addition there are some specific order commands for unusual order types that need more information (such as TWAP and VWAP).

    But when starting out with any script you can always just default back to a simple "market" or "limit" order. Just remember that a limit order always needs a price.

    So the bare minimum would look something like this...

    order.algo_buy(self.symbol, "limit", "init", price=md.L1.ask)

    Hope this helps!

    Paul

  • dk490971dk490971 Posts: 7

    Paul
    Thank you for the quick response. I should have seen that on my own - my bad. I plan on deep diving into this platform and, I'll be sure to read all the docs - front to cover first.
    I just wanted to confirm this one issue before I invested too much time doing that. This should get me on the fast track!
    Best
    Devon

Sign In or Register to comment.