Skip to content

Latest commit

 

History

History
148 lines (107 loc) · 4.6 KB

SupportingApi.md

File metadata and controls

148 lines (107 loc) · 4.6 KB

Org.OpenAPITools.Api.SupportingApi

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

Method HTTP request Description
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.
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.

PublicGetTimeGet

Object PublicGetTimeGet ()

Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.

Example

using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PublicGetTimeGetExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.deribit.com/api/v2";
            // Configure HTTP basic authorization: bearerAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new SupportingApi(Configuration.Default);

            try
            {
                // Retrieves the current time (in milliseconds). This API endpoint can be used to check the clock skew between your software and Deribit's systems.
                Object result = apiInstance.PublicGetTimeGet();
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling SupportingApi.PublicGetTimeGet: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

Object

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PublicTestGet

Object PublicTestGet (string expectedResult = null)

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.

Example

using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PublicTestGetExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://www.deribit.com/api/v2";
            // Configure HTTP basic authorization: bearerAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new SupportingApi(Configuration.Default);
            var expectedResult = expectedResult_example;  // string | The value \"exception\" will trigger an error response. This may be useful for testing wrapper libraries. (optional) 

            try
            {
                // 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.
                Object result = apiInstance.PublicTestGet(expectedResult);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling SupportingApi.PublicTestGet: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
expectedResult string The value "exception" will trigger an error response. This may be useful for testing wrapper libraries. [optional]

Return type

Object

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]