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/8141b51fbb307bca265866ef1cef564https://gist.github.com/PirosB3/8141b51fbb307bca265866ef1cef564f