Custom Algos
Since Dexible views algos as a name plus a collection of policies, you have tremendous flexibility over order execution. Every algo requires the gasPolicy and slippage policies. Beyond that, the Limit, StopLimit, and TWAP algos have specific policy requirements as well (namely, LimitPrice, StopPrice, and BoundedDelay). If you truly want to start from scratch, you can apply policies to a Market algo to express to Dexible how you want the order to execute.
PriceRange Market Order
Suppose you want to simply specify a price range for an order. Unlike limit, you want to execute if the price is above or below a certain price point (often called price 'bands'). Here is what you can do:
Even though this is labeled as a "market" order, it will not behave like a market order because we've added specific policies that tell Dexible how to execute. It will restrict the execution to a specific price band.
Order Matters
The order of the policies array is the exact order of evaluation within Dexible's infrastructure. The first non-passing policy will stop evaluation for the order. In certain cases, the policy will force a cancel. We recommend putting those policies ahead of others to short circuit evaluation.
Extending Policies
We will add more policy types as we expand Dexible. If you find that you need a policy that is missing, please contact us and we will evaluate your use case and add policies accordingly.
Last updated