Skip to content

Instantly share code, notes, and snippets.

@gabriel-dehan
Created December 18, 2017 15:23
Show Gist options
  • Save gabriel-dehan/daa077f26aebe36f8b9dd889010f008b to your computer and use it in GitHub Desktop.
Save gabriel-dehan/daa077f26aebe36f8b9dd889010f008b to your computer and use it in GitHub Desktop.
compute = (allocation, price, force_price: false) ->
if force_price
Math.max(Math.max(force_price, MINIMUM_QUOTE_ORDER_AMOUNT/price), MINIMUM_BASE_ORDER_AMOUNT)
else
Math.max(Math.max(allocation/price, MINIMUM_QUOTE_ORDER_AMOUNT/price), MINIMUM_BASE_ORDER_AMOUNT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment