Documentation Index
Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Limit orders are a native feature of THORChain and MAYAChain — they’re stored as memo-encoded transactions on the source chain, and the protocol’s outbound vault settles them when the target price is met. The SDK exposes both the high-level client methods (recommended) and the low-level building blocks (for custom flows).LIMIT_ORDER_NATIVE_ASSETS lists the assets eligible as the order’s source/destination. Currently this includes RUNE, BTC.BTC, ETH.ETH, ETH.USDC, BCH.BCH, LTC.LTC, DOGE.DOGE, AVAX.AVAX, BSC.BNB, MAYA.CACAO, and others.
High-Level API
Submit
Cancel
Low-Level Utilities
For custom flows where you don’t want the SDK to sign or broadcast:toBaseUnits (under the limit-orders namespace) is a thin wrapper that handles THORChain’s 1e8 normalization correctly across decimals — use it instead of generic amount math when building memos by hand.
Types
| Type | Description |
|---|---|
LimitQuoteParams | Input to fetchLimitQuote / submitLimitOrder |
LimitQuoteResponse | Quote details + recommended slippage |
LimitOrderStatus | Lifecycle state + fill details |
CancelLimitOrderParams | Input to cancelLimitOrder / buildCancelMemo |
leokit-sdk entry point.
Notes
- Limit orders only work for protocols that support them (THORChain, MAYAChain). Other protocols throw on
submitLimitOrder. - The SDK handles asset normalization (THORChain uses
ASSET~suffix in some memos); you don’t need to format the memo yourself when usingsubmitLimitOrder/cancelLimitOrder. - Use
getLimitOrderStatus(orsdk.watchTransaction(orderId, ...)if your status feed exposes the order id) for fill tracking.