نظرة عامة
العمليات المتاحة
- get - جلب Bars V2
جلب
مثال على الاستخدام
package hello.world;
import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.errors.BzhttpResp;
import org.benzinga.BZClient.models.operations.GetBarsV2Response;
public class Application {
public static void main(String[] args) throws BzhttpResp, Exception {
Bzclient sdk = Bzclient.builder()
.apiKeyAuth("<YOUR_API_KEY_HERE>")
.build();
GetBarsV2Response res = sdk.bars().get()
.symbols("<value>")
.from("<value>")
.to("<value>")
.interval("<value>")
.call();
if (res.responseBodies().isPresent()) {
// معالجة الاستجابة
}
}
}
المعاملات
| المعامل | النوع | مطلوب | الوصف |
|---|---|---|---|
symbols | String | :heavy_check_mark: | الرموز (قائمة رموز مفصولة بفواصل) |
from | String | :heavy_check_mark: | من |
to | Optional<String> | :heavy_minus_sign: | إلى |
interval | Optional<String> | :heavy_minus_sign: | الفترة الزمنية |
الاستجابة
الأخطاء
| نوع الخطأ | رمز الحالة | نوع المحتوى |
|---|---|---|
| models/errors/BzhttpResp | 400, 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |