buy

Place a buy order in an instrument. (Authorization is required)
URI: https://www.deribit.com/api/v1/private/buy
URI Path: /api/v1/private/buy
Parameters: shown as JQuery data for POST
{
    "instrument": "BTC-19DEC14",  // name 
    "quantity": 1,                // quantity, in contracts ($10 per contract for futures, ฿1 — for options)
    "price": "380.0",             // float, USD for futures, BTC for options
    "label": "1"                  // optional parameter, user defined maximum 32-char label for the order
    "post_only": true             // optional parameter, if true then the order will be POST ONLY
                                  // (adjusted to always enter the order book as a maker order without
                                  // immediate matching with lower fee or rebate, see the docs for more details) 
}
Method: POST
Result is JSON object:
{
    "success": true, // true or false
    "result": {
        "order": {
            "orderId": 889, 	// id of created order if success = true
            "instrument": "BTC-22JAN16", 	//instrument name of the order
            "direction": "buy", 	// direction, buy
            "price": 417, 	// price, float, USD for futures, BTC for options
            "quantity": 1, 	// quantity, in contracts ($10 per contract for futures, ฿1 — for options)
            "label": "",        // user defined label (up to 32 characters)
            "filledQuantity": 0, 	//filled quantity, in contracts ($10 per contract for futures, ฿1 — for options)
            "avgPrice": 0,            // average fill price of the order
            "commission": 0, 	// commission in btc
            "created": 1453398857489, // creation timestamp
            "lastUpdate": 1453398857489, // timestamp of the last order state update
            "state": "open"   // order state
            "postOnly": false            // true for post-only orders only
            },
         "trades": [] // the list of immediate trades if them have happened 
        }, 
    "message": "" // empty or text message, e.g. error message }
account
sell