Skip to content
API clients for the Deribit API in various programming languages
Branch: master
Clone or download
lacksfish Merge pull request #11 from psollberger/VS2019-Open
Delete Comments in csproj files that prohibit to open in VS 2019
Latest commit 7ae49f6 Jun 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android Readd C++ Qt5 client and other client improvements Jun 3, 2019
aspnetcore Readd C++ Qt5 client and other client improvements Jun 3, 2019
c Readd C++ Qt5 client and other client improvements Jun 3, 2019
clojure Readd C++ Qt5 client and other client improvements Jun 3, 2019
cpp-qt5-client Readd C++ Qt5 client and other client improvements Jun 3, 2019
cpp-restsdk Readd C++ Qt5 client and other client improvements Jun 3, 2019
csharp Allowing VS 2019 Community Edition to open the Solution with all Proj… Jun 15, 2019
erlang-client Readd C++ Qt5 client and other client improvements Jun 3, 2019
go Readd C++ Qt5 client and other client improvements Jun 3, 2019
java Readd C++ Qt5 client and other client improvements Jun 3, 2019
javascript Readd C++ Qt5 client and other client improvements Jun 3, 2019
kotlin Readd C++ Qt5 client and other client improvements Jun 3, 2019
objc Readd C++ Qt5 client and other client improvements Jun 3, 2019
php Readd C++ Qt5 client and other client improvements Jun 3, 2019
python Readd C++ Qt5 client and other client improvements Jun 3, 2019
r Readd C++ Qt5 client and other client improvements Jun 3, 2019
ruby Readd C++ Qt5 client and other client improvements Jun 3, 2019
scala-akka Readd C++ Qt5 client and other client improvements Jun 3, 2019
swift4 Readd C++ Qt5 client and other client improvements Jun 3, 2019
typescript-node Readd C++ Qt5 client and other client improvements Jun 3, 2019
README.md Readd C++ Qt5 client and other client improvements Jun 3, 2019

README.md

Deribit API clients

About

Interact with the Deribit API from the comfort of your favorite programming language.
The client libraries are automatically generated and cover the REST endpoints of the API.

These clients interface with the Deribit API v2.
Find the documentation here

Important

The access token is valid for a certain time, read more about the scope of access tokens, their validity time and how to refresh them here.

Currently supported

  • Android
  • ASP.NET Core
  • C
  • Clojure
  • C++ Qt5
  • C++ REST SDK
  • C#
  • Erlang
  • Go
  • Java
  • JavaScript
  • Kotlin
  • Objective-C
  • PHP
  • Python
  • R
  • Ruby
  • Scala (Akka)
  • Swift 4
  • TypeScript

Examples

Following are example code snippets on how to do authentication (using client_credentials) with the Python and PHP client libraries

Python
    # Setup configuration instance
    conf = configuration.Configuration()
    # Setup unauthenticated client
    client = api_client.ApiClient(conf)
    publicApi = public_api.PublicApi(client)
    # Authenticate with API credentials
    response = publicApi.public_auth_get('client_credentials', '', '', 'API_ACCESS_KEY', 'API_SECRET_KEY', '', '', '', scope='session:test wallet:read')
    access_token = response['result']['access_token']

    conf_authed = configuration.Configuration()
    conf_authed.access_token = access_token
    # Use retrieved authentication token to setup private endpoint client
    client_authed = api_client.ApiClient(conf_authed)
    privateApi = private_api.PrivateApi(client_authed)

    response = privateApi.private_get_transfers_get(currency='BTC')
    print(response['result']['data'][0]['amount'])
    response = privateApi.private_get_current_deposit_address_get(currency='BTC')
    print(response['result']['address'])
PHP
  <?php
  $configuration = new Configuration();
  $publicApi = new PublicApi($client = null, $configuration);
  // Authenticate with API credentials
  $authData = $publicApi->publicAuthGet('client_credentials', '', '', 'API_ACCESS_KEY', 'API_SECRET_KEY', '', '', '', null, null, 'session:test wallet:read');
  $authDataParsed = json_decode($authData[0], true);
  $accessToken = $authDataParsed['result']['access_token'];

  // Use retrieved authentication token to setup private endpoint client
  $authedConfig = new Configuration();
  $authedConfig->setAccessToken($accessToken);
  $privateApi = new PrivateApi(null, $authedConfig);

  $accountSummaryBTC = $privateApi->privateGetAccountSummaryGet('BTC');
  var_dump($accountSummaryBTC);
  $currentDepositAddressBTC = $privateApi->privateGetCurrentDepositAddressGet('BTC');
  var_dump($currentDepositAddressBTC);
  $transfersBTC = $privateApi->privateGetTransfersGet('BTC');
  var_dump($transfersBTC);

Found a bug or have a question?

Please open an issue and it will be addressed.

You can’t perform that action at this time.