Interface DeribitAuthenticated


  • @Path("/api/v2/private")
    @Produces("application/json")
    public interface DeribitAuthenticated
    • Method Detail

      • getAccountSummary

        @GET
        @Path("get_account_summary")
        DeribitResponse<AccountSummary> getAccountSummary​(@QueryParam("currency")
                                                          String currency,
                                                          @QueryParam("extended")
                                                          Boolean extended,
                                                          @HeaderParam("Authorization")
                                                          si.mazi.rescu.ParamsDigest auth)
                                                   throws DeribitException,
                                                          IOException
        Retrieves user account summary. https://docs.deribit.com/v2/#private-get_account_summary
        Parameters:
        currency - required, The currency symbol, BTC or ETH
        extended - Include additional fields
        Throws:
        DeribitException
        IOException
      • buy

        @GET
        @Path("buy")
        DeribitResponse<OrderPlacement> buy​(@QueryParam("instrument_name")
                                            String instrumentName,
                                            @QueryParam("amount")
                                            BigDecimal amount,
                                            @QueryParam("type")
                                            OrderType type,
                                            @QueryParam("label")
                                            String label,
                                            @QueryParam("price")
                                            BigDecimal price,
                                            @QueryParam("time_in_force")
                                            TimeInForce timeInForce,
                                            @QueryParam("max_show")
                                            BigDecimal maxShow,
                                            @QueryParam("post_only")
                                            Boolean postOnly,
                                            @QueryParam("reduce_only")
                                            Boolean reduceOnly,
                                            @QueryParam("stop_price")
                                            BigDecimal stopPrice,
                                            @QueryParam("trigger")
                                            Trigger trigger,
                                            @QueryParam("advanced")
                                            AdvancedOptions advanced,
                                            @HeaderParam("Authorization")
                                            si.mazi.rescu.ParamsDigest auth)
                                     throws DeribitException,
                                            IOException
        https://docs.deribit.com/v2/#private-buy
        Parameters:
        instrumentName - required, Instrument name
        amount - required, It represents the requested order size. For perpetual and futures the amount is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g., BTC or ETH
        type - optional, The order type, default: "limit"
        label - optional, user defined label for the order (maximum 32 characters)
        price - optional, The order price in base currency (Only for limit and stop_limit orders) When adding order with advanced=usd, the field price should be the option price value in USD. When adding order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%
        timeInForce - optional, Specifies how long the order remains in effect. Default "good_til_cancelled" "good_til_cancelled" - unfilled order remains in order book until cancelled "fill_or_kill" - execute a transaction immediately and completely or not at all "immediate_or_cancel" - execute a transaction immediately, and any portion of the order that cannot be immediately filled is cancelled
        maxShow - optional, Maximum amount within an order to be shown to other customers, 0 for invisible order
        postOnly - optional, If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the bid. Only valid in combination with time_in_force="good_til_cancelled"
        reduceOnly - optional, If true, the order is considered reduce-only which is intended to only reduce a current position
        stopPrice - optional, Stop price, required for stop limit orders (Only for stop orders)
        trigger - optional, Defines trigger type, required for "stop_limit" order type
        advanced - optional, Advanced option order type. (Only for options)
        Throws:
        DeribitException
        IOException
      • getOpenOrdersByInstrument

        @GET
        @Path("get_open_orders_by_instrument")
        DeribitResponse<List<Order>> getOpenOrdersByInstrument​(@QueryParam("instrument_name")
                                                               String instrumentName,
                                                               @QueryParam("type")
                                                               String type,
                                                               @HeaderParam("Authorization")
                                                               si.mazi.rescu.ParamsDigest auth)
                                                        throws DeribitException,
                                                               IOException
        https://docs.deribit.com/v2/#private-get_open_orders_by_instrument
        Parameters:
        instrumentName - required, Instrument name
        type - optional, Order type, one of (all, limit, stop_all, stop_limit, stop_market), default - all
        Throws:
        DeribitException
        IOException
      • getUserTradesByInstrument

        @GET
        @Path("get_user_trades_by_instrument")
        DeribitResponse<UserTrades> getUserTradesByInstrument​(@QueryParam("instrument_name")
                                                              String instrumentName,
                                                              @QueryParam("start_seq")
                                                              Integer startSeq,
                                                              @QueryParam("end_seq")
                                                              Integer endSeq,
                                                              @QueryParam("count")
                                                              Integer count,
                                                              @QueryParam("include_old")
                                                              Boolean includeOld,
                                                              @QueryParam("sorting")
                                                              String sorting,
                                                              @HeaderParam("Authorization")
                                                              si.mazi.rescu.ParamsDigest auth)
                                                       throws DeribitException,
                                                              IOException
        https://docs.deribit.com/v2/#private-get_user_trades_by_instrument
        Parameters:
        instrumentName - required Instrument name
        startSeq - optional The sequence number of the first trade to be returned
        endSeq - optional The sequence number of the last trade to be returned
        count - optional Number of requested items, default - 10
        includeOld - optional Include trades older than 7 days, default - false
        sorting - optional ( asc, desc, default) Direction of results sorting (default value means no sorting, results will be returned in order in which they left the database)
        Throws:
        DeribitException
        IOException
      • getUserTradesByInstrumentAndTime

        @GET
        @Path("get_user_trades_by_instrument_and_time")
        DeribitResponse<UserTrades> getUserTradesByInstrumentAndTime​(@QueryParam("instrument_name")
                                                                     String instrumentName,
                                                                     @QueryParam("start_timestamp")
                                                                     long startTimestamp,
                                                                     @QueryParam("end_timestamp")
                                                                     long endTimestamp,
                                                                     @QueryParam("count")
                                                                     Integer count,
                                                                     @QueryParam("include_old")
                                                                     Boolean includeOld,
                                                                     @QueryParam("sorting")
                                                                     String sorting,
                                                                     @HeaderParam("Authorization")
                                                                     si.mazi.rescu.ParamsDigest auth)
                                                              throws DeribitException,
                                                                     IOException
        https://docs.deribit.com/v2/#private-get_user_trades_by_instrument_and_time
        Parameters:
        instrumentName - required Instrument name
        startTimestamp - required The earliest timestamp to return result for
        endTimestamp - required The most recent timestamp to return result for
        count - optional Number of requested items, default - 10
        includeOld - optional Include trades older than 7 days, default - false
        sorting - optional ( asc, desc, default) Direction of results sorting (default value means no sorting, results will be returned in order in which they left the database)
        Throws:
        DeribitException
        IOException
      • getSettlementHistoryByInstrument

        @GET
        @Path("get_settlement_history_by_instrument")
        DeribitResponse<UserSettlements> getSettlementHistoryByInstrument​(@QueryParam("instrument_name")
                                                                          String instrumentName,
                                                                          @QueryParam("type")
                                                                          SettlementType type,
                                                                          @QueryParam("count")
                                                                          Integer count,
                                                                          @HeaderParam("Authorization")
                                                                          si.mazi.rescu.ParamsDigest auth)
                                                                   throws DeribitException,
                                                                          IOException
        https://docs.deribit.com/v2/#private-get_settlement_history_by_instrument
        Parameters:
        instrumentName - required - Instrument name
        count - optional - Number of requested items, default - 20
        type - optional - Settlement type
        Throws:
        DeribitException
        IOException