Descripción general
Operaciones disponibles
- get - Obtener barras V2
get
Ejemplo de uso
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()) {
// manejar la respuesta
}
}
}
Parámetros
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
symbols | String | :heavy_check_mark: | Símbolos (lista separada por comas) |
from | String | :heavy_check_mark: | Desde |
to | Optional<String> | :heavy_minus_sign: | Hasta |
interval | Optional<String> | :heavy_minus_sign: | Intervalo |
Respuesta
Errores
| Tipo de error | Código de estado | Tipo de contenido |
|---|---|---|
| models/errors/BzhttpResp | 400, 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |