Last active
September 15, 2016 18:10
-
-
Save joshuarossi/20446cf43fc87c49b591cbdac423027e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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