Skip to content

Latest commit

 

History

History
113 lines (76 loc) · 4.28 KB

README.md

File metadata and controls

113 lines (76 loc) · 4.28 KB

Dividends

(dividends())

Overview

Available Operations

  • getV22 - Get Dividends V2.2
  • get - Get Dividends V2 & V2.1

getV22

Returns a list of dividends

Example Usage

package hello.world;

import com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.operations.GetDividendsV22Request;
import com.benzinga.bzclient.models.operations.GetDividendsV22Response;
import java.lang.Exception;

public class Application {

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

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

        GetDividendsV22Request req = GetDividendsV22Request.builder()
                .build();

        GetDividendsV22Response res = sdk.dividends().getV22()
                .request(req)
                .call();

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

Parameters

Parameter Type Required Description
request GetDividendsV22Request ✔️ The request object to use for the request.

Response

GetDividendsV22Response

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

get

Returns a list of dividends

Example Usage

package hello.world;

import com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.operations.GetDividendsRequest;
import com.benzinga.bzclient.models.operations.GetDividendsResponse;
import java.lang.Exception;

public class Application {

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

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

        GetDividendsRequest req = GetDividendsRequest.builder()
                .build();

        GetDividendsResponse res = sdk.dividends().get()
                .request(req)
                .call();

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

Parameters

Parameter Type Required Description
request GetDividendsRequest ✔️ The request object to use for the request.

Response

GetDividendsResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*