GithubHelp home page GithubHelp logo

laomouzi / barchart-ondemand-client-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from barchart/barchart-ondemand-client-java

0.0 2.0 0.0 834 KB

A Java client for Barchart OnDemand

Home Page: http://barchartondemand.com/api.php

barchart-ondemand-client-java's Introduction

Java client for Barchart OnDemand

Check out some examples here

See how to use the client in your project here

Currently supports

  • getQuote
  • getFuturesOptions
  • getShortDatedFuturesOptions
  • getProfile
  • getFinancialHighlights
  • getFinancialRatios
  • getIncomeStatements
  • getBalanceSheets
  • getCompetitors
  • getInsiders
  • getRatings
  • getIndexMembers
  • getCorporateActions
  • getEarningsEstimates
  • getLeaders
  • getHighsLows
  • getInstrumentDefinition
  • getFuturesSpecifications
  • getFuturesExpirations
  • getWeather

Example Code

private final BarchartOnDemandClient onDemand = new BarchartOnDemandClient.Builder().apiKey("CHANGE-ME").build();

/* build a new getQuotes request */
final QuoteRequest.Builder builder = new QuoteRequest.Builder();

/* add symbols to request */
builder.symbols(new String[] { "AAPL", "GOOG" });
/* set mode to real-time */
builder.mode(QuoteRequestMode.REAL_TIME);
/* add optional request fields */
builder.fields(new QuoteRequestField[] { QuoteRequestField._52_WEEK_HIGH_DATE });

/* fetch results */
final Quotes quotes = (Quotes) onDemand.fetch(builder.build());

for (Quote q : quotes.all()) {
	System.out.println("Quote for : " + q.getSymbol() + " = " + q);
}

System.out.println("Quote by symbol = " + JsonUtil.intoJson(quotes.bySymbol("AAPL")));

Adding to your project

Plain Jar

Download the latest version here

Maven
<dependency>
	<groupId>com.barchart.base</groupId>
	<artifactId>barchart-ondemand-client</artifactId>
	<version>1.0.3</version>
</dependency>

barchart-ondemand-client-java's People

Contributors

mvberg avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.