Portfolio margin

Portfolio Margin uses a risk-based model that determines margin requirements based on historical volatility by valuing a specific portfolio over a range of underlying price and volatility moves.

This Portfolio Margin risk-based model takes into consideration positions in futures and options combined, which may help reduce the margin requirement of your portfolio.

Portfolio Margin accounts offer these potential benefits to traders and market makers who maintain a balanced portfolio of hedged positions:

  • Lower margin requirements
  • Increased leverage

Requirements:

  • To qualify for Portfolio Margin, you must maintain a minimum net equity of 1 BTC.
  • Trader needs to have some experience trading options and declare to have understanding about the concept of portfolio margin

Please contact support at support@deribit.com if you would like to have portfolio margin calculations activated in your account.

 

 

 


newannouncements

Get new announcements for the logged user. After request, those announcements are marked as read.
URI: https://www.deribit.com/api/v1/private/newannouncements
URI Path: /api/v1/private/newannouncements
Result as JSON object:
{
    "success": true,         // true or false
    "message": "",           // empty
    "result": [              //list of objects: 
        {
            "date": 1499945664000,          // timestamp, announcement publication date
            "title": "New Announcement",    // string, announcement title
            "body": "<2>Announcement</h2>" // string, announcement body, html
        }
    ]
}

getannouncements

Get announcements from last 30 days.
URI: https://www.deribit.com/api/v1/public/getannouncements
URI Path: /api/v1/public/getannouncements
Parameters: none
Method: GET
Result is JSON object:
{
    "success": true,    // true or false
    "message": "",      // empty
    "result": [         // list of objects:
        {
            "date": 1499940765000,           // timestamp, announcement publication date
            "title": "New Announcement",     // string, announcement title
            "body": "Announcement string"    // announcement body, html 
        } 
      ] 
   }

orderstate

Get order state by order id. (Authorization is required)
URI: https://www.deribit.com/api/v1/private/orderstate
URI Path: /api/v1/private/orderstate
Parameters:
    "orderId": 362878 // order identifier
Method: GET
Result is JSON object:
{
    "success": true,          // true or false
    "result": {
        "orderId": 54435915,    // order identifier
        "instrument": "BTC-30JUN17-2000-C", // instrument
        "direction": "buy",  // "buy" or "sell"
        "price": 0.0581,     // price of the order
        "quantity": 5,       
        "filledQuantity": 0, 
        "avgPrice": 0,        // average price
        "commission": 0,      // commission in BTC
        "created": 1495184819641, // creation timestamp
        "lastUpdate": 1495186129205, // last change timestamp
        "state": "open",           // order state
        "postOnly": false,          // true or false
        "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"
    },
    "msIn": 1495186147445,
    "msOut": 1495186147445
}

stats

Get some statistics
URI: https://www.deribit.com/api/v1/public/stats
URI Path: /api/v1/public/stats
Parameters: none
Method: GET
Result is JSON object:
{
    "success": true,
    "testnet": false,
    "message": "",
    "result": {
        "btc_usd": // BTC - USD stats
            {
                "futuresVolume": 324.0, // in BTC, futures 24h volume 
                "putsVolume": 100.24,   // in BTC, options-puts 24h volume
                "callsVolume": 130.23   // in BTC, options-calls 24h volume
            },
        "created": "2017-06-16 12:10:57 GMT"
    },
    "msIn": 1497615057294,
    "msOut": 1497615057294
}

test

Test request returns api build number.
URI: https://www.deribit.com/api/v1/public/test
URI Path: /api/v1/public/test
Parameters: none
Method: GET
Result is JSON object:
{
  "success": true,  // false or true
  "testnet": false, // false for production server, true for test server
  "message": "public API test",    // empty or text message
  "apiBuild": "1.2.17" // api build version, refer api-release-changes.txt above
}

Settlements

All futures and options positions settle daily at 8.00 UTC using Deribit index price around 8.00 UTC (provided market is non volatile at that moment.). To calculate daily profits and losses for options Deribit uses market price (averages between bid and ask),

As for futures positions, at settlement, unrealised and realised session profits and losses are transferred to your BTC cash balance. (a session is a period of 24h from one settlement to other).

Any options trade results immediately in the transfer of cash out of the account if buying options, or transfer of cash into the account in case of selling options.

In the frontend you find Session UPL and Session RPL in your account summary, future summary, and options summary. Those are the profits and losses accumulated since last settlement.

Any trading profits are immediately available as trading margin, but will only be available for withdrawal after settlement.

At settlement Deribit risk management system will check if there were any bankruptcies in the session, and if the insurance fund covers for all those losses. If this is not the case and the insurance fund is not sufficient to cover for losses, the remaining losses will get “socialised” among the net winners of the session. In the 1 year we are currently operative we never had to socialise losses with winning accounts or force close any position (other than liquidating positions due to their margin requirements), but some day in the future it could happen, though it is our goal to not have any bankruptcies on the platform and we will adjust margin requirements accordingly to market circumstances.

 

 


tradehistory

Get private trade history of the account. (Authorization is required). The result is ordered by trade identifiers (trade id-s).
URI: https://www.deribit.com/api/v1/private/tradehistory
URI Path: /api/v1/private/tradehistory
Parameters:
          istrument – string [mandatory], name of instrumentm, example “BTC-19DEC14”, also aliases “all”, “futures”, “options” are allowed.
          count – integer[optional], number of results to fetch, example 50, default 20
          startTradeId – integer[optional], startTradeId is used for pagination of requests, example – 3328. With this paraneter, it is possible to fetch all trades page by page. The request will return “count” trades with trade id-s less than “startTradeId”.

Method: GET

Result is JSON object:
{
    "success": true,
    "result": [ // list of account trades  
        {
            "tradeId": 28436,           // trade id
            "instrument": "BTC-31MAR17",// instrument name  
            "timeStamp": 1487876771886, // Unix timestamp
            "quantity": 4,              // quantity, in contracts ($10 per contract for futures, ฿1 — for options)
            "price": 1133.93,           // float, USD for futures, BTC for options
            "side": "sell",             // side of the account order (it describes what the account does, "sell" or "buy")
            "orderId": 5349283,         // account order id (the user order)
            "liquidity": "T",           // "T" - taker, "M" - maker
            "fee": 0,                   // fee (comission for the trade, as for the account, if negative - rebate)
            "feeCurrency": "BTC",       // fee-comission currency
            "tickDirection": 3,         // Direction of the "tick". Valid values: 
                                        // 0 = Plus Tick; 1 = Zero-Plus Tick; 2 = Minus Tick; 3 = Zero-Minus Tick
            "matchingId": 5349289,      // matching order ID
            "indexPrice": 1164.29       // index price
       },
        ....
    ]
 }

Order types (futures)

Currently our matching engine handles “limit orders” and “post-only” orders.

By placing a post-only order, your order will not match immediately with the orderbook under any circumstance, such that in case of execution of the order, the trader will receive a rebate or pay lower transaction costs.

Examples:
You place a “post-only” buy order for USD 800, but in the orderbook is a sales order for USD 799. In this case, the matching engine will adjust the price of your order to 798.99. Your order will not execute immediately and if executed you will receive a rebate instead of paying commissions.

You place a “post-only” sales order for USD 800, but in the orderbook is a buy order for USD 801. In this case, the matching engine will adjust the price of your sales order to USD 801.01.

If your original order would enter the order book immediately without any matching, the order goes in the orderbook with the original price given in the order, as if it was a normal limit order.


Historical volatility chart

Following this link you can see a chart of the development of the annualised 15 days historical volatility of the Deribit bitcoin index.
Volatility is calculated by taking once a day at a fixed time the value of the index. The (annualised) bitcoin historical volatility is calculated over a period of 15 days.