-
-
Save kardasis/30fbfc76577d362999597301bc35926c to your computer and use it in GitHub Desktop.
API for The 0cean
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice start! Some comments below:
a) The return value is just the amountCancelled. However, I may POST an array of orders to cancel, I think the return value should be of the same magnitude (array with each element contains order hash and amountCancelled). I would also add a bool there to say whether the order is now gone completely.
b) Do you also want to allow amending the order ‘upwards’?
c) Name of this method is could be misunderstood for cancelling orders.
d) What are the semantics of sending request for an existing order but tokenAmount=0?
I think that when using names, only do this if it is meaningful in the context of the application or data. The names tokenA and tokenB returned in the response don’t seem to mean anything outside the context of the response. Consider returning this as an array with no named structures inside it. If an asset_pair describes a maker/taker relationship - why not call it maker and taker? If the asset_pair describes a 2-way maker/taker relationship - then how does this work?
Cheers!