How to place orders
Last updated
Last updated
When opening the order page, you can trade with additional settings. Orders differ from normal trades in a sense that trades are either executed right away or not executed at all. Orders are placed in a list and at the end of every block, the protocol tries to execute every order. Orders have a trade amount, a maximum price and a maximum validity. An order is removed either when a given amount of assets has been traded completely or when its validity has expired.
When creating a buy order, you determine which token you want to receive and which token you want to give in exchange. In the image's example, 10 XKP are bought for a price of 0.1774 kUSD per 1 XKP. That means, the protocol is executing a trade whenever the price of 1 XKP is less than 0.1774 kUSD. Since there is a fee involved, the total price to get 10 XKP is estimated to be 1.78 kUSD. That estimate of 1.78 kUSD is sent to the order pool and are locked as long as the order is valid. When the order is expired, left-over funds are returned. This is also the case when less kUSD has been used to buy the requested 10 XKP.
When creating a sell order, you determine which token you want to give and which token you want to receive in exchange. In the image's example, 10 XKP are sold for a price of 0.1767 kUSD per 1 XKP. That means, the protocol is executing a trade whenever you receive at least 0.1767 kUSD per unit of XKP sold. Since there is a fee involved, the total estimated amount you are about to receive is at least 1.76 kUSD. The 10 XKP to be sold are send to the order pool and are locked for as long as the order is valid. When the order is expired, left-over funds are returned.
When you are trading large amounts, it might affect the market price in a way that is not favorable to you. By setting a maximum trade amount per block, the protocol does not trade all given assets at once but only the amount you set. For example, if you want to buy XKP by selling 1000 USDC with a maximum trade amount of 100 USDC, the protocol will try selling 100 USDC per block at maximum, meaning your order will be executed in at least ten trades.
Setting an execution interval makes it so that the order is not tried to be executed at every block but only at certain blocks. The set value is converted to seconds and then when checking, there is a assumed blockspeed of one second per block. For example, when you set an order to be executed once every minute, it is executed every 60 blocks.
With option you can define when your order will expire. If an order is expired and there are unsold assets left, those assets will be returned to you. The maximum time an order can be valid is 14 days.