The limit-order-sdk is a TypeScript library developed by 1inch that enables developers to build, sign, and manage off-chain limit orders, fully compatible with the 1inch Limit Order Protocol.
Key Benefits
- Gasless Order Creation - Sign orders off-chain with EIP-712, only pay gas for token approval
- Orderbook Discovery - Submit signed orders to the 1inch Orderbook for resolvers to fill
- Multi-Token Support - Trade ERC-20, ERC-721, and ERC-1155 tokens
- Permit Support - Use permits for gasless approvals
How It Works
- Approve Tokens - Grant the Limit Order Protocol contract permission to spend your tokens (one-time gas cost)
- Create Order - Use the SDK to build a properly formatted order with assets, amounts, and expiration
- Sign Order - Sign the order off-chain using EIP-712 typed data (no gas required)
- Submit to Orderbook - Send the signed order to the 1inch Orderbook API (free)
- Resolver Fills - Resolvers discover and fill your order on-chain
Interactive Code Example
Explore the complete implementation — this example demonstrates creating, signing, and submitting a limit order:
Advanced usage
In addition to publishing limit orders to the 1inch Orderbook, the Limit Order SDK can also be used for more advanced and customized workflows that operate independently of the Orderbook API. To learn more about this use case, see Advanced usage for custom protocol integration.