Tutorial : Placing Orders
Last updated
Last updated
You can think of as a toolbox: it's got everything you need to tackle order execution.
Create a new
instance of the .
Set a default using .
Generate an compatible object.
Pass in the object to .
The object has an execution
key that determines how the SDK will handle the . Each execution
will interact with the in different ways. Algodex supports the following executions: , , .
A Maker Order will always be placed into the . They can be either Buy or Sell order types.
A Maker Order is an order that does not execute instantly. A maker order has no active takers, therefore it "makes" its own order to be fulfilled at a later date.
When a user places an order, if no one immediately agrees to the terms of the order, the order is considered a Maker Order.
The order is now visible to other users of Algodex and will be fulfilled when another user agrees to "take" the order.
There must be at least one existing order in the order book that fulfills the user's criteria. Therefore, the user "takes" from an existing order.
The user submitted order changes the state of the Order book in 1 of 3 ways:
The user does not "take" the entire order. The remainder of the order remains open.
The user takes the entire order removing it from the order book.
The user takes multiple orders, removing them from the order book.
Some users find it clunky to lug around a toolbox if they only need one or two tools.
There are no existing orders in the that fulfill the user's criteria so they decide to "make" their own order.
The users submitted order is added to the .
A Taker Order will always execute existing orders in the . They can be either Buy or Sell order types.
A Taker Order is an order that executes instantly. A taker order closes or modifies an existing order in the .
Maker/Taker will first check the for existing orders that match the current order.
If you are curious about the internal processes of placing an order and how they relate to the different execution types, the is a great place to start.
If that sounds like you, we recommend checking out the & modules to get a better sense of what methods fit your use case.