I am looking at https://0x.org/docs/api#post-orderbookv1order

It talks about sending signed order to the API, but I was unable find the documentation on how to sign the order this api.

Can anyone point me in the right direction ?

3 Answers 3


There have been a couple of changes lately related to the 0x API. E.g., the POST/GET urls have changed (i.e. there sra endpoint is no longer available), APIs on Ropsten have been discontinued, and also three additional fields (takerTokenFeeAmount, sender, feeRecipient) are required in the order object. The example on Ropsten that @kimpers shared doesn't work anymore. I have updated my repo which shows some basic examples how to use 0x. I am not part of the 0x team and created those examples myself. There is certainly room for improvement but I hope it's still useful to get you strated.



Here's an updated gist that shows how to sign orders for 0x v4. Do note that it demonstrates via RFQ orders but the method to sign limit orders (orderbook) will be the same, just the payload is different: https://gist.github.com/PirosB3/8141b51fbb307bca265866ef1cef564f


You can refer to this code sandbox as a very basic example of how you can create, sign and submit orders on Ropsten https://codesandbox.io/s/recursing-bell-ydbxb. This is not production ready code but it should be enough to get you started!

  • Thanks. Will check it out soon.
    – NRJ
    Commented Nov 15, 2021 at 2:42
  • Sorry I was looking for a way that does not involve UI/Metamask
    – NRJ
    Commented Nov 16, 2021 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.