Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.84 KB

README.md

File metadata and controls

64 lines (45 loc) · 1.84 KB

Bars

(bars())

Overview

Available Operations

  • get - Get Bars V2

get

Get Bars V2

Example Usage

package hello.world;

import com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.errors.BzhttpResp;
import com.benzinga.bzclient.models.operations.GetBarsV2Response;
import java.lang.Exception;

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()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
symbols String ✔️ Symbols
from String ✔️ From
to Optional<String> To
interval Optional<String> Interval

Response

GetBarsV2Response

Errors

Error Type Status Code Content Type
models/errors/BzhttpResp 400, 500 application/json
models/errors/APIException 4XX, 5XX */*