I think x12path should go later, assuming that in general the path will be picked up automatically and doesn't have to be given on each function call.
maxorder and maxdiff look like higher priority arguments to me.

(spot check: I haven't looked at more than the signature, and whether it's really a function)