Skip to main content

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:

  1. Generate an order in the proper format
  2. Generating a proper hash for the order contents
  3. 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​