sell

Place a sell order in an instrument. (Authorization is required).
URI: https://www.deribit.com/api/v1/private/sell
URI Path: /api/v1/private/sell
Parameters: shown as JQuery data for POST
{
    "instrument": "BTC-29JAN16-450-C",  // name 
    "quantity": "1",			// quantity, in contracts ($10 per contract for futures, ฿1 — for options)
    "price": "0.2"			// float, USD for futures, BTC for options
    "label": "1"                       // optional parameter, user defined label for the order
                                       // (up to 32 characters)
    "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)
    "adv": "usd"                  // optional parameter, can be "implv", "usd", or absent (advanced order type)
}
  • In case of “adv”=”implv”, field “price” must be a value of Implied Volatility (in percentages), e.g., “price”=100, means implied volatility of 100%
  • In case of “adv”=”usd”, field “price” must be the option price value in USD
  • it is not allowed to combine “adv”=”implv”,”usd” parameter with “post_only”=true
  • “adv” parameter is not applicable to futures, ignored
Method: POST
Result is JSON object:
{
    "success": true,
    "result": {
        "order": {
            "orderId": 894,   // id of created order if success = true
            "instrument": "BTC-29JAN16-450-C", //instrument name of the order
            "direction": "sell", // direction, sell
            "price": 0.2,    // price, float, USD for futures, BTC for options
            "quantity": 10,  // quantity, in contracts ($10 per contract for futures, ฿1 — for options)
            "label": "",     // user defined label (up to 32 characters)
            "filledQuantity": 1, //filled quantity, in contracts ($10 per contract for futures, ฿1 — for options)
            "avgPrice": 0,            // average fill price of the order 
            "commission": 0,  // commision in btc
            "created": 1453399515235,  // creation timestamp
            "lastUpdate": 1453399515235, // timestamp of the last order state update
            "state": "open",
            "postOnly": false,            // true for post-only orders only
            "adv": false              // advanced type (false, or "usd" or "implv") 

             // for advanced orders could be:
            "implv": 250  // implied volatility in %, if "adv"="implv"
            "usd": 50     // usd price, if "adv"="usd"
        },
        "trades": [ // list of immediate trades, if they have happened
            {
                "quantity": 1, // quantity, in contracts ($10 per contract for futures, ฿1 — for options)
                "price": 415   // price, float, USD for futures, BTC for options
            }
		]
    },
    "message": ""
}

 

buy
edit