Skip to content

codabl/brainrex-java

Repository files navigation

swagger-java-client

BrainRex API

  • API version: 1.0.2
    • Build date: 2023-06-14T16:16:45.442340731Z[GMT]

The Brainrex API is a collection of analytics tools and data integrations made for blockchain developers. In particular we offer Natural Language Processing and Anomaly detection algorithms that have been fine tune to understand text data and time series in the domain speficic setting of cryptocurrency and blockchain technology. This technology is intended to be use as building blocks to bigger applications, we offer examples on how to use them for Trading Backtesting and Smart Contract anomaly monitoring.

Automatically generated by the Swagger Codegen

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

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>io.swagger</groupId>
  <artifactId>swagger-java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/swagger-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

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

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AnomalyApi;

import java.io.File;
import java.util.*;

public class AnomalyApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        AnomalyApi apiInstance = new AnomalyApi();
        List<PointTimeSeries> body = Arrays.asList(new PointTimeSeries()); // List<PointTimeSeries> | Time Series to be analyzed, with the following format.
        try {
            List<Boolean> result = apiInstance.anomalyBatch(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnomalyApi#anomalyBatch");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AnomalyApi anomalyBatch POST /anomaly/json/detect Detects anomalies in historical data in batches. This endpoint uses your entire dataset as input
IntegrationsApi cryptoGetCandleData POST /crypto/get_candles Downloads candle format market data
IntegrationsApi cryptoGetExchangeAssets POST /crypto/get_exchange_assets Gets all coin pairs traded in specified exchange
IntegrationsApi cryptoGetOrderbooks POST /crypto/get_orderbooks Returns the current state of the orderbook.
IntegrationsApi cryptoGetSupportedExchanges GET /crypto/get_supported_exchanges Gets all cryptocurrency exchanges supported by the Brainrex API
IntegrationsApi cryptoGetTicker POST /crypto/get_ticker Downloads candle format market data
LanguageApi languageGetCryptoEntities POST /entity/get_crypto_entities Extracts known crypto entities like coin names, exchanges, media from text.
LanguageApi languageGetGeneralSentiment POST /sentiment/get_general_sentiment Returns a -1 to 1 score, depending on positive/negative sentiment
LanguageApi languageGetPriceSentiment POST /language/get_price_sentiment Sentiment analysis score using a model trained for buy signals.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

APIKeyHeader

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Recommendation

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

Author

Releases

No releases published

Packages

No packages published

Languages