Skip to main content
< رجوع

نظرة عامة

العمليات المتاحة

  • get - جلب بيانات اتجاه رمز التداول
  • getList - جلب بيانات قائمة اتجاهات رموز التداول

جلب

الحصول على بيانات اتجاه رمز التداول

مثال على الاستخدام

package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.errors.BzhttpResp;
import org.benzinga.BZClient.models.errors.HttpapiTickerTrendAPIResponse;
import org.benzinga.BZClient.models.operations.GetTickerTrendDataRequest;
import org.benzinga.BZClient.models.operations.GetTickerTrendDataResponse;

public class Application {

    public static void main(String[] args) throws BzhttpResp, HttpapiTickerTrendAPIResponse, Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<YOUR_API_KEY_HERE>")
            .build();

        GetTickerTrendDataRequest req = GetTickerTrendDataRequest.builder()
                .interval("<value>")
                .tickers("<value>")
                .source("<value>")
                .build();

        GetTickerTrendDataResponse res = sdk.tickerTrends().get()
                .request(req)
                .call();

        if (res.httpapiTickerTrendAPIResponse().isPresent()) {
            // handle response
        }
    }
}

المعلمات

ParameterTypeRequiredDescription
requestGetTickerTrendDataRequest:heavy_check_mark:كائن الطلب المستخدم في هذا الطلب.

الاستجابة

GetTickerTrendDataResponse

الأخطاء

نوع الخطأرمز الحالةنوع المحتوى
models/errors/BzhttpResp400application/json
models/errors/HttpapiTickerTrendAPIResponse500application/json
models/errors/APIException4XX, 5XX/

getList

جلب بيانات قائمة اتجاهات رموز التداول

مثال على الاستخدام

package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.errors.BzhttpResp;
import org.benzinga.BZClient.models.errors.HttpapiTrendingTickersListAPIResponse;
import org.benzinga.BZClient.models.operations.GetTickerTrendListDataRequest;
import org.benzinga.BZClient.models.operations.GetTickerTrendListDataResponse;

public class Application {

    public static void main(String[] args) throws BzhttpResp, HttpapiTrendingTickersListAPIResponse, Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<YOUR_API_KEY_HERE>")
            .build();

        GetTickerTrendListDataRequest req = GetTickerTrendListDataRequest.builder()
                .interval("<value>")
                .tickers("<value>")
                .source("<value>")
                .build();

        GetTickerTrendListDataResponse res = sdk.tickerTrends().getList()
                .request(req)
                .call();

        if (res.httpapiTrendingTickersListAPIResponse().isPresent()) {
            // معالجة الرد
        }
    }
}

المعاملات

المعاملالنوعإلزاميالوصف
requestGetTickerTrendListDataRequest:heavy_check_mark:كائن الطلب المستخدم لهذا الاستدعاء.

الاستجابة

GetTickerTrendListDataResponse

الأخطاء

نوع الخطأرمز الحالةنوع المحتوى
models/errors/BzhttpResp400application/json
models/errors/HttpapiTrendingTickersListAPIResponse500application/json
models/errors/APIException4XX, 5XX/