Skip to content

BuiltByBit/api-wrapper-codegen-java

Repository files navigation

openapi-java-client

BuiltByBit API

  • API version: v2
    • Build date: 2026-03-23T18:13:05.976474Z[Etc/UTC]

All operations not tagged 'free' require an active Ultimate subscription or invite-only permissions.

V2 documentation: https://builtbybit.com/wiki/api-v2/ \ OAuth2 documentation: https://builtbybit.com/wiki/oauth2/

For more information, please visit https://builtbybit.com/ticket

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

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

mvn clean install

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

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-java-client</artifactId>
  <version>v2</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'openapi-java-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'openapi-java-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "org.openapitools:openapi-java-client:v2"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-v2.jar
  • target/lib/*.jar

Getting Started

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

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.GlobalApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.builtbybit.com");
    
    // Configure API key authorization: token
    ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token");
    token.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //token.setApiKeyPrefix("Token");

    GlobalApi apiInstance = new GlobalApi(defaultClient);
    try {
      GetV2Analytics200Response result = apiInstance.getV2Analytics();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling GlobalApi#getV2Analytics");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://api.builtbybit.com

Class Method HTTP request Description
GlobalApi getV2Analytics GET /v2/analytics Fetch a list of analytics definitions
GlobalApi getV2AnalyticsGraph GET /v2/analytics/graph Fetch analytics graph data
GlobalApi getV2AnalyticsSingle GET /v2/analytics/single Fetch a single analytics value
GlobalApi getV2Events GET /v2/events Fetch a list of pending events
GlobalApi postV2EventsComplete POST /v2/events/complete Mark events as complete
Oauth2Api getOauth2Token POST /oauth2/token Request an access token using an existing grant
Oauth2Api getOauth2TokenRevoke POST /oauth2/token/revoke Revoke an existing access or refresh token
ResourcesCreatorApi postV2ResourcesCreatorUpdate POST /v2/resources/creator/update Post a resource update
ResourcesDiscoveryApi getResourcesDiscoverCategories GET /v2/resources/discover/categories Fetch a list of categories
ResourcesDiscoveryApi getResourcesDiscoverResources GET /v2/resources/discover/resources Fetch a list of resources
ResourcesDiscoveryApi getV2ResourcesDiscoverCartView GET /v2/resources/discover/cart/view View the user's cart items
ResourcesDiscoveryApi getV2ResourcesDiscoverLicenses GET /v2/resources/discover/licenses Fetch a list of the user's licenses
ResourcesDiscoveryApi postV2ResourcesDiscoverCartAdd POST /v2/resources/discover/cart/add Add items to a user's cart
ResourcesDiscoveryApi postV2ResourcesDiscoverCartCheckout POST /v2/resources/discover/cart/checkout Initiate a checkout of a user's cart
ResourcesDiscoveryApi postV2ResourcesDiscoverCartCouponAdd POST /v2/resources/discover/cart/coupon/add Add a coupon to the user's cart
ResourcesDiscoveryApi postV2ResourcesDiscoverCartCouponRemove POST /v2/resources/discover/cart/coupon/remove Remove a coupon from the user's cart
ResourcesDiscoveryApi postV2ResourcesDiscoverCartRemove POST /v2/resources/discover/cart/remove Remove an item from the user's cart

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

token

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

oauth2

Recommendation

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

Author

About

A Java API wrapper code-generated from our OpenAPI specification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages