Create a Limit Order
0x Limit Orders are represented as JSON objects ( limit order format). In order to create a valid 0x Limit Order, you can use the @0x/protocol-utils TypeScript/Javascript library. The TypeScript library will help you:
- Generate an order in the proper format
- Generating a proper hash for the order contents
- Sign the order hash using your keys (which makes the order valid)
Below is a basic code demo of how to create, sign and submit 0x Limit Orders on a testnet. View in Code Sandbox.
Code Examples​
Typescript - 0x Starter Project comes with a number of limit order scenarios including the Create and sign a ERC20 limit order scenario.
Python - Python RFQ Guide covers how to create, hash, sign, fill, get state, and cancel a 0x RFQ Order. Note that the code can be modified by making minor modifications, to also work for 0x Limit Orders.