Skip to content

Instantly share code, notes, and snippets.

@joshuarossi
Last active September 15, 2016 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuarossi/20446cf43fc87c49b591cbdac423027e to your computer and use it in GitHub Desktop.
Save joshuarossi/20446cf43fc87c49b591cbdac423027e to your computer and use it in GitHub Desktop.
def order_new
api_user, payload, api_key = Api.request(request, true, true)
Api.ensure_key payload, 'symbol', :string # The name of the symbol (see `/symbols`).
Api.ensure_key payload, 'amount', :decimal # Order size: how much to buy or sell.
Api.ensure_key payload, 'price', :price # Price to buy or sell at. May omit if a market order.
Api.ensure_key payload, 'side', :string # Either "buy" or "sell".
Api.ensure_key payload, 'type', :string # Either "market" / "limit" / "stop" / "trailing-stop".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment