Skip to content

Latest commit

 

History

History
 
 

android

openapi-android-client

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>org.openapitools</groupId>
    <artifactId>openapi-android-client</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "org.openapitools:openapi-android-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/openapi-android-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import org.openapitools.client.api.AccountManagementApi;

public class AccountManagementApiExample {

    public static void main(String[] args) {
        AccountManagementApi apiInstance = new AccountManagementApi();
        Integer sid = null; // Integer | The user id for the subaccount
        String name = newUserName; // String | The new user name
        try {
            Object result = apiInstance.privateChangeSubaccountNameGet(sid, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountManagementApi#privateChangeSubaccountNameGet");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://www.deribit.com/api/v2

Class Method HTTP request Description
AccountManagementApi privateChangeSubaccountNameGet GET /private/change_subaccount_name Change the user name for a subaccount
AccountManagementApi privateCreateSubaccountGet GET /private/create_subaccount Create a new subaccount
AccountManagementApi privateDisableTfaForSubaccountGet GET /private/disable_tfa_for_subaccount Disable two factor authentication for a subaccount.
AccountManagementApi privateGetAccountSummaryGet GET /private/get_account_summary Retrieves user account summary.
AccountManagementApi privateGetEmailLanguageGet GET /private/get_email_language Retrieves the language to be used for emails.
AccountManagementApi privateGetNewAnnouncementsGet GET /private/get_new_announcements Retrieves announcements that have not been marked read by the user.
AccountManagementApi privateGetPositionGet GET /private/get_position Retrieve user position.
AccountManagementApi privateGetPositionsGet GET /private/get_positions Retrieve user positions.
AccountManagementApi privateGetSubaccountsGet GET /private/get_subaccounts Get information about subaccounts
AccountManagementApi privateSetAnnouncementAsReadGet GET /private/set_announcement_as_read Marks an announcement as read, so it will not be shown in `get_new_announcements`.
AccountManagementApi privateSetEmailForSubaccountGet GET /private/set_email_for_subaccount Assign an email address to a subaccount. User will receive an email with confirmation link.
AccountManagementApi privateSetEmailLanguageGet GET /private/set_email_language Changes the language to be used for emails.
AccountManagementApi privateSetPasswordForSubaccountGet GET /private/set_password_for_subaccount Set the password for the subaccount
AccountManagementApi privateToggleNotificationsFromSubaccountGet GET /private/toggle_notifications_from_subaccount Enable or disable sending of notifications for the subaccount.
AccountManagementApi privateToggleSubaccountLoginGet GET /private/toggle_subaccount_login Enable or disable login for a subaccount. If login is disabled and a session for the subaccount exists, this session will be terminated.
AccountManagementApi publicGetAnnouncementsGet GET /public/get_announcements Retrieves announcements from the last 30 days.
AuthenticationApi publicAuthGet GET /public/auth Authenticate
InternalApi privateAddToAddressBookGet GET /private/add_to_address_book Adds new entry to address book of given type
InternalApi privateDisableTfaWithRecoveryCodeGet GET /private/disable_tfa_with_recovery_code Disables TFA with one time recovery code
InternalApi privateGetAddressBookGet GET /private/get_address_book Retrieves address book of given type
InternalApi privateRemoveFromAddressBookGet GET /private/remove_from_address_book Adds new entry to address book of given type
InternalApi privateSubmitTransferToSubaccountGet GET /private/submit_transfer_to_subaccount Transfer funds to a subaccount.
InternalApi privateSubmitTransferToUserGet GET /private/submit_transfer_to_user Transfer funds to a another user.
InternalApi privateToggleDepositAddressCreationGet GET /private/toggle_deposit_address_creation Enable or disable deposit address creation
InternalApi publicGetFooterGet GET /public/get_footer Get information to be displayed in the footer of the website.
InternalApi publicGetOptionMarkPricesGet GET /public/get_option_mark_prices Retrives market prices and its implied volatility of options instruments
InternalApi publicValidateFieldGet GET /public/validate_field Method used to introduce the client software connected to Deribit platform over websocket. Provided data may have an impact on the maintained connection and will be collected for internal statistical purposes. In response, Deribit will also introduce itself.
MarketDataApi publicGetBookSummaryByCurrencyGet GET /public/get_book_summary_by_currency Retrieves the summary information such as open interest, 24h volume, etc. for all instruments for the currency (optionally filtered by kind).
MarketDataApi publicGetBookSummaryByInstrumentGet GET /public/get_book_summary_by_instrument Retrieves the summary information such as open interest, 24h volume, etc. for a specific instrument.
MarketDataApi publicGetContractSizeGet GET /public/get_contract_size Retrieves contract size of provided instrument.
MarketDataApi publicGetCurrenciesGet GET /public/get_currencies Retrieves all cryptocurrencies supported by the API.
MarketDataApi publicGetFundingChartDataGet GET /public/get_funding_chart_data Retrieve the latest user trades that have occurred for PERPETUAL instruments in a specific currency symbol and within given time range.
MarketDataApi publicGetHistoricalVolatilityGet GET /public/get_historical_volatility Provides information about historical volatility for given cryptocurrency.
MarketDataApi publicGetIndexGet GET /public/get_index Retrieves the current index price for the instruments, for the selected currency.
MarketDataApi publicGetInstrumentsGet GET /public/get_instruments Retrieves available trading instruments. This method can be used to see which instruments are available for trading, or which instruments have existed historically.
MarketDataApi publicGetLastSettlementsByCurrencyGet GET /public/get_last_settlements_by_currency Retrieves historical settlement, delivery and bankruptcy events coming from all instruments within given currency.
MarketDataApi publicGetLastSettlementsByInstrumentGet GET /public/get_last_settlements_by_instrument Retrieves historical public settlement, delivery and bankruptcy events filtered by instrument name.
MarketDataApi publicGetLastTradesByCurrencyAndTimeGet GET /public/get_last_trades_by_currency_and_time Retrieve the latest trades that have occurred for instruments in a specific currency symbol and within given time range.
MarketDataApi publicGetLastTradesByCurrencyGet GET /public/get_last_trades_by_currency Retrieve the latest trades that have occurred for instruments in a specific currency symbol.
MarketDataApi publicGetLastTradesByInstrumentAndTimeGet GET /public/get_last_trades_by_instrument_and_time Retrieve the latest trades that have occurred for a specific instrument and within given time range.
MarketDataApi publicGetLastTradesByInstrumentGet GET /public/get_last_trades_by_instrument Retrieve the latest trades that have occurred for a specific instrument.
MarketDataApi publicGetOrderBookGet GET /public/get_order_book Retrieves the order book, along with other market values for a given instrument.
MarketDataApi publicGetTradeVolumesGet GET /public/get_trade_volumes Retrieves aggregated 24h trade volumes for different instrument types and currencies.
MarketDataApi publicGetTradingviewChartDataGet GET /public/get_tradingview_chart_data Publicly available market data used to generate a TradingView candle chart.
MarketDataApi publicTickerGet GET /public/ticker Get ticker for an instrument.
PrivateApi privateAddToAddressBookGet GET /private/add_to_address_book Adds new entry to address book of given type
PrivateApi privateBuyGet GET /private/buy Places a buy order for an instrument.
PrivateApi privateCancelAllByCurrencyGet GET /private/cancel_all_by_currency Cancels all orders by currency, optionally filtered by instrument kind and/or order type.
PrivateApi privateCancelAllByInstrumentGet GET /private/cancel_all_by_instrument Cancels all orders by instrument, optionally filtered by order type.
PrivateApi privateCancelAllGet GET /private/cancel_all This method cancels all users orders and stop orders within all currencies and instrument kinds.
PrivateApi privateCancelGet GET /private/cancel Cancel an order, specified by order id
PrivateApi privateCancelTransferByIdGet GET /private/cancel_transfer_by_id Cancel transfer
PrivateApi privateCancelWithdrawalGet GET /private/cancel_withdrawal Cancels withdrawal request
PrivateApi privateChangeSubaccountNameGet GET /private/change_subaccount_name Change the user name for a subaccount
PrivateApi privateClosePositionGet GET /private/close_position Makes closing position reduce only order .
PrivateApi privateCreateDepositAddressGet GET /private/create_deposit_address Creates deposit address in currency
PrivateApi privateCreateSubaccountGet GET /private/create_subaccount Create a new subaccount
PrivateApi privateDisableTfaForSubaccountGet GET /private/disable_tfa_for_subaccount Disable two factor authentication for a subaccount.
PrivateApi privateDisableTfaWithRecoveryCodeGet GET /private/disable_tfa_with_recovery_code Disables TFA with one time recovery code
PrivateApi privateEditGet GET /private/edit Change price, amount and/or other properties of an order.
PrivateApi privateGetAccountSummaryGet GET /private/get_account_summary Retrieves user account summary.
PrivateApi privateGetAddressBookGet GET /private/get_address_book Retrieves address book of given type
PrivateApi privateGetCurrentDepositAddressGet GET /private/get_current_deposit_address Retrieve deposit address for currency
PrivateApi privateGetDepositsGet GET /private/get_deposits Retrieve the latest users deposits
PrivateApi privateGetEmailLanguageGet GET /private/get_email_language Retrieves the language to be used for emails.
PrivateApi privateGetMarginsGet GET /private/get_margins Get margins for given instrument, amount and price.
PrivateApi privateGetNewAnnouncementsGet GET /private/get_new_announcements Retrieves announcements that have not been marked read by the user.
PrivateApi privateGetOpenOrdersByCurrencyGet GET /private/get_open_orders_by_currency Retrieves list of user's open orders.
PrivateApi privateGetOpenOrdersByInstrumentGet GET /private/get_open_orders_by_instrument Retrieves list of user's open orders within given Instrument.
PrivateApi privateGetOrderHistoryByCurrencyGet GET /private/get_order_history_by_currency Retrieves history of orders that have been partially or fully filled.
PrivateApi privateGetOrderHistoryByInstrumentGet GET /private/get_order_history_by_instrument Retrieves history of orders that have been partially or fully filled.
PrivateApi privateGetOrderMarginByIdsGet GET /private/get_order_margin_by_ids Retrieves initial margins of given orders
PrivateApi privateGetOrderStateGet GET /private/get_order_state Retrieve the current state of an order.
PrivateApi privateGetPositionGet GET /private/get_position Retrieve user position.
PrivateApi privateGetPositionsGet GET /private/get_positions Retrieve user positions.
PrivateApi privateGetSettlementHistoryByCurrencyGet GET /private/get_settlement_history_by_currency Retrieves settlement, delivery and bankruptcy events that have affected your account.
PrivateApi privateGetSettlementHistoryByInstrumentGet GET /private/get_settlement_history_by_instrument Retrieves public settlement, delivery and bankruptcy events filtered by instrument name
PrivateApi privateGetSubaccountsGet GET /private/get_subaccounts Get information about subaccounts
PrivateApi privateGetTransfersGet GET /private/get_transfers Adds new entry to address book of given type
PrivateApi privateGetUserTradesByCurrencyAndTimeGet GET /private/get_user_trades_by_currency_and_time Retrieve the latest user trades that have occurred for instruments in a specific currency symbol and within given time range.
PrivateApi privateGetUserTradesByCurrencyGet GET /private/get_user_trades_by_currency Retrieve the latest user trades that have occurred for instruments in a specific currency symbol.
PrivateApi privateGetUserTradesByInstrumentAndTimeGet GET /private/get_user_trades_by_instrument_and_time Retrieve the latest user trades that have occurred for a specific instrument and within given time range.
PrivateApi privateGetUserTradesByInstrumentGet GET /private/get_user_trades_by_instrument Retrieve the latest user trades that have occurred for a specific instrument.
PrivateApi privateGetUserTradesByOrderGet GET /private/get_user_trades_by_order Retrieve the list of user trades that was created for given order
PrivateApi privateGetWithdrawalsGet GET /private/get_withdrawals Retrieve the latest users withdrawals
PrivateApi privateRemoveFromAddressBookGet GET /private/remove_from_address_book Adds new entry to address book of given type
PrivateApi privateSellGet GET /private/sell Places a sell order for an instrument.
PrivateApi privateSetAnnouncementAsReadGet GET /private/set_announcement_as_read Marks an announcement as read, so it will not be shown in `get_new_announcements`.
PrivateApi privateSetEmailForSubaccountGet GET /private/set_email_for_subaccount Assign an email address to a subaccount. User will receive an email with confirmation link.
PrivateApi privateSetEmailLanguageGet GET /private/set_email_language Changes the language to be used for emails.
PrivateApi privateSetPasswordForSubaccountGet GET /private/set_password_for_subaccount Set the password for the subaccount
PrivateApi privateSubmitTransferToSubaccountGet GET /private/submit_transfer_to_subaccount Transfer funds to a subaccount.
PrivateApi privateSubmitTransferToUserGet GET /private/submit_transfer_to_user Transfer funds to a another user.
PrivateApi privateToggleDepositAddressCreationGet GET /private/toggle_deposit_address_creation Enable or disable deposit address creation
PrivateApi privateToggleNotificationsFromSubaccountGet GET /private/toggle_notifications_from_subaccount Enable or disable sending of notifications for the subaccount.
PrivateApi privateToggleSubaccountLoginGet GET /private/toggle_subaccount_login Enable or disable login for a subaccount. If login is disabled and a session for the subaccount exists, this session will be terminated.
PrivateApi privateWithdrawGet GET /private/withdraw Creates a new withdrawal request
PublicApi publicAuthGet GET /public/auth Authenticate
PublicApi publicGetAnnouncementsGet GET /public/get_announcements Retrieves announcements from the last 30 days.
PublicApi publicGetBookSummaryByCurrencyGet GET /public/get_book_summary_by_currency Retrieves the summary information such as open interest, 24h volume, etc. for all instruments for the currency (optionally filtered by kind).
PublicApi publicGetBookSummaryByInstrumentGet GET /public/get_book_summary_by_instrument Retrieves the summary information such as open interest, 24h volume, etc. for a specific instrument.
PublicApi publicGetContractSizeGet GET /public/get_contract_size Retrieves contract size of provided instrument.
PublicApi publicGetCurrenciesGet GET /public/get_currencies Retrieves all cryptocurrencies supported by the API.
PublicApi publicGetFundingChartDataGet GET /public/get_funding_chart_data Retrieve the latest user trades that have occurred for PERPETUAL instruments in a specific currency symbol and within given time range.
PublicApi publicGetHistoricalVolatilityGet GET /public/get_historical_volatility Provides information about historical volatility for given cryptocurrency.
PublicApi publicGetIndexGet GET /public/get_index Retrieves the current index price for the instruments, for the selected currency.
PublicApi publicGetInstrumentsGet GET /public/get_instruments Retrieves available trading instruments. This method can be used to see which instruments are available for trading, or which instruments have existed historically.
PublicApi publicGetLastSettlementsByCurrencyGet GET /public/get_last_settlements_by_currency Retrieves historical settlement, delivery and bankruptcy events coming from all instruments within given currency.
PublicApi publicGetLastSettlementsByInstrumentGet GET /public/get_last_settlements_by_instrument Retrieves historical public settlement, delivery and bankruptcy events filtered by instrument name.
PublicApi publicGetLastTradesByCurrencyAndTimeGet GET /public/get_last_trades_by_currency_and_time Retrieve the latest trades that have occurred for instruments in a specific currency symbol and within given time range.
PublicApi publicGetLastTradesByCurrencyGet GET /public/get_last_trades_by_currency Retrieve the latest trades that have occurred for instruments in a specific currency symbol.
PublicApi publicGetLastTradesByInstrumentAndTimeGet GET /public/get_last_trades_by_instrument_and_time Retrieve the latest trades that have occurred for a specific instrument and within given time range.
PublicApi publicGetLastTradesByInstrumentGet GET /public/get_last_trades_by_instrument Retrieve the latest trades that have occurred for a specific instrument.
PublicApi publicGetOrderBookGet GET /public/get_order_book Retrieves the order book, along with other market values for a given instrument.
PublicApi publicGetTimeGet GET /public/get_time Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.
PublicApi publicGetTradeVolumesGet GET /public/get_trade_volumes Retrieves aggregated 24h trade volumes for different instrument types and currencies.
PublicApi publicGetTradingviewChartDataGet GET /public/get_tradingview_chart_data Publicly available market data used to generate a TradingView candle chart.
PublicApi publicTestGet GET /public/test Tests the connection to the API server, and returns its version. You can use this to make sure the API is reachable, and matches the expected version.
PublicApi publicTickerGet GET /public/ticker Get ticker for an instrument.
PublicApi publicValidateFieldGet GET /public/validate_field Method used to introduce the client software connected to Deribit platform over websocket. Provided data may have an impact on the maintained connection and will be collected for internal statistical purposes. In response, Deribit will also introduce itself.
SupportingApi publicGetTimeGet GET /public/get_time Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.
SupportingApi publicTestGet GET /public/test Tests the connection to the API server, and returns its version. You can use this to make sure the API is reachable, and matches the expected version.
TradingApi privateBuyGet GET /private/buy Places a buy order for an instrument.
TradingApi privateCancelAllByCurrencyGet GET /private/cancel_all_by_currency Cancels all orders by currency, optionally filtered by instrument kind and/or order type.
TradingApi privateCancelAllByInstrumentGet GET /private/cancel_all_by_instrument Cancels all orders by instrument, optionally filtered by order type.
TradingApi privateCancelAllGet GET /private/cancel_all This method cancels all users orders and stop orders within all currencies and instrument kinds.
TradingApi privateCancelGet GET /private/cancel Cancel an order, specified by order id
TradingApi privateClosePositionGet GET /private/close_position Makes closing position reduce only order .
TradingApi privateEditGet GET /private/edit Change price, amount and/or other properties of an order.
TradingApi privateGetMarginsGet GET /private/get_margins Get margins for given instrument, amount and price.
TradingApi privateGetOpenOrdersByCurrencyGet GET /private/get_open_orders_by_currency Retrieves list of user's open orders.
TradingApi privateGetOpenOrdersByInstrumentGet GET /private/get_open_orders_by_instrument Retrieves list of user's open orders within given Instrument.
TradingApi privateGetOrderHistoryByCurrencyGet GET /private/get_order_history_by_currency Retrieves history of orders that have been partially or fully filled.
TradingApi privateGetOrderHistoryByInstrumentGet GET /private/get_order_history_by_instrument Retrieves history of orders that have been partially or fully filled.
TradingApi privateGetOrderMarginByIdsGet GET /private/get_order_margin_by_ids Retrieves initial margins of given orders
TradingApi privateGetOrderStateGet GET /private/get_order_state Retrieve the current state of an order.
TradingApi privateGetSettlementHistoryByCurrencyGet GET /private/get_settlement_history_by_currency Retrieves settlement, delivery and bankruptcy events that have affected your account.
TradingApi privateGetSettlementHistoryByInstrumentGet GET /private/get_settlement_history_by_instrument Retrieves public settlement, delivery and bankruptcy events filtered by instrument name
TradingApi privateGetUserTradesByCurrencyAndTimeGet GET /private/get_user_trades_by_currency_and_time Retrieve the latest user trades that have occurred for instruments in a specific currency symbol and within given time range.
TradingApi privateGetUserTradesByCurrencyGet GET /private/get_user_trades_by_currency Retrieve the latest user trades that have occurred for instruments in a specific currency symbol.
TradingApi privateGetUserTradesByInstrumentAndTimeGet GET /private/get_user_trades_by_instrument_and_time Retrieve the latest user trades that have occurred for a specific instrument and within given time range.
TradingApi privateGetUserTradesByInstrumentGet GET /private/get_user_trades_by_instrument Retrieve the latest user trades that have occurred for a specific instrument.
TradingApi privateGetUserTradesByOrderGet GET /private/get_user_trades_by_order Retrieve the list of user trades that was created for given order
TradingApi privateSellGet GET /private/sell Places a sell order for an instrument.
WalletApi privateAddToAddressBookGet GET /private/add_to_address_book Adds new entry to address book of given type
WalletApi privateCancelTransferByIdGet GET /private/cancel_transfer_by_id Cancel transfer
WalletApi privateCancelWithdrawalGet GET /private/cancel_withdrawal Cancels withdrawal request
WalletApi privateCreateDepositAddressGet GET /private/create_deposit_address Creates deposit address in currency
WalletApi privateGetAddressBookGet GET /private/get_address_book Retrieves address book of given type
WalletApi privateGetCurrentDepositAddressGet GET /private/get_current_deposit_address Retrieve deposit address for currency
WalletApi privateGetDepositsGet GET /private/get_deposits Retrieve the latest users deposits
WalletApi privateGetTransfersGet GET /private/get_transfers Adds new entry to address book of given type
WalletApi privateGetWithdrawalsGet GET /private/get_withdrawals Retrieve the latest users withdrawals
WalletApi privateRemoveFromAddressBookGet GET /private/remove_from_address_book Adds new entry to address book of given type
WalletApi privateSubmitTransferToSubaccountGet GET /private/submit_transfer_to_subaccount Transfer funds to a subaccount.
WalletApi privateSubmitTransferToUserGet GET /private/submit_transfer_to_user Transfer funds to a another user.
WalletApi privateToggleDepositAddressCreationGet GET /private/toggle_deposit_address_creation Enable or disable deposit address creation
WalletApi privateWithdrawGet GET /private/withdraw Creates a new withdrawal request

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author