├── _config.yml ├── META-INF └── MANIFEST.MF ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src ├── test │ └── java │ │ ├── economicindicator │ │ └── data │ │ │ ├── unemployment.json │ │ │ ├── inflationexpectation.json │ │ │ ├── nonfarmpayroll.json │ │ │ ├── treasuryyield.json │ │ │ ├── retailsales.json │ │ │ ├── durables.json │ │ │ ├── inflation.json │ │ │ ├── realgdppercapita.json │ │ │ ├── consumersentiment.json │ │ │ ├── federalfundsrate.json │ │ │ ├── cpi.json │ │ │ └── realgdp.json │ │ ├── crypto │ │ ├── data │ │ │ ├── rating.json │ │ │ ├── daily.json │ │ │ ├── intraday.json │ │ │ ├── monthly.json │ │ │ └── weekly.json │ │ ├── RatingResponseTest.java │ │ └── CryptoUnitTest.java │ │ ├── timeseries │ │ ├── data │ │ │ ├── globalquote.json │ │ │ ├── weekly.json │ │ │ ├── monthly.json │ │ │ ├── daily.json │ │ │ ├── intraday.json │ │ │ ├── weeklyadjusted.json │ │ │ ├── monthlyadjusted.json │ │ │ └── dailyadjusted.json │ │ └── StockUnitTest.java │ │ ├── indicator │ │ └── data │ │ │ ├── bop.json │ │ │ ├── trange.json │ │ │ ├── dx.json │ │ │ ├── cci.json │ │ │ ├── mfi.json │ │ │ ├── obv.json │ │ │ ├── willr.json │ │ │ ├── ad.json │ │ │ ├── atr.json │ │ │ ├── plusdi.json │ │ │ ├── plusdm.json │ │ │ ├── minusdi.json │ │ │ ├── minusdm.json │ │ │ ├── vwap.json │ │ │ ├── aroonosc.json │ │ │ ├── midprice.json │ │ │ ├── t3.json │ │ │ ├── adx.json │ │ │ ├── cmo.json │ │ │ ├── mom.json │ │ │ ├── natr.json │ │ │ ├── roc.json │ │ │ ├── rsi.json │ │ │ ├── adxr.json │ │ │ ├── dema.json │ │ │ ├── kama.json │ │ │ ├── rocr.json │ │ │ ├── tema.json │ │ │ ├── trix.json │ │ │ ├── trima.json │ │ │ ├── sar.json │ │ │ ├── midpoint.json │ │ │ ├── sma.json │ │ │ ├── wma.json │ │ │ ├── ema.json │ │ │ ├── httrendmode.json │ │ │ ├── htdcperiod.json │ │ │ ├── htdcphase.json │ │ │ ├── adosc.json │ │ │ ├── aroon.json │ │ │ ├── httrendline.json │ │ │ ├── ultosc.json │ │ │ ├── htsine.json │ │ │ ├── apo.json │ │ │ ├── ppo.json │ │ │ ├── htphasor.json │ │ │ ├── stochf.json │ │ │ ├── mama.json │ │ │ ├── stoch.json │ │ │ ├── stochrsi.json │ │ │ ├── macd.json │ │ │ ├── bbands.json │ │ │ └── macdext.json │ │ ├── technicalindicator │ │ └── data │ │ │ ├── bop.json │ │ │ ├── dx.json │ │ │ ├── trange.json │ │ │ ├── cci.json │ │ │ ├── mfi.json │ │ │ ├── obv.json │ │ │ ├── willr.json │ │ │ ├── ad.json │ │ │ ├── atr.json │ │ │ ├── plusdi.json │ │ │ ├── plusdm.json │ │ │ ├── vwap.json │ │ │ ├── aroonosc.json │ │ │ ├── midprice.json │ │ │ ├── minusdi.json │ │ │ ├── minusdm.json │ │ │ ├── natr.json │ │ │ ├── t3.json │ │ │ ├── adx.json │ │ │ ├── cmo.json │ │ │ ├── mom.json │ │ │ ├── roc.json │ │ │ ├── rsi.json │ │ │ ├── adxr.json │ │ │ ├── dema.json │ │ │ ├── kama.json │ │ │ ├── rocr.json │ │ │ ├── tema.json │ │ │ ├── trix.json │ │ │ ├── trima.json │ │ │ ├── sar.json │ │ │ ├── sma.json │ │ │ ├── ema.json │ │ │ ├── midpoint.json │ │ │ ├── wma.json │ │ │ ├── httrendmode.json │ │ │ ├── adosc.json │ │ │ ├── htdcperiod.json │ │ │ ├── htdcphase.json │ │ │ ├── aroon.json │ │ │ ├── httrendline.json │ │ │ ├── ultosc.json │ │ │ ├── htsine.json │ │ │ ├── apo.json │ │ │ ├── ppo.json │ │ │ ├── htphasor.json │ │ │ ├── stochf.json │ │ │ ├── mama.json │ │ │ ├── stoch.json │ │ │ ├── stochrsi.json │ │ │ ├── macd.json │ │ │ ├── bbands.json │ │ │ └── macdext.json │ │ ├── exchangerate │ │ └── data │ │ │ ├── data.json │ │ │ └── data-with-no-bid-or-ask-price.json │ │ ├── parameters │ │ ├── DataTypeTest.java │ │ ├── OutputSizeTest.java │ │ ├── SeriesTypeTest.java │ │ ├── MATypeTest.java │ │ └── IntervalTest.java │ │ ├── forex │ │ ├── data │ │ │ ├── monthly.json │ │ │ ├── daily.json │ │ │ ├── weekly.json │ │ │ └── intraday.json │ │ └── ForexUnitTest.java │ │ ├── ConfigTest.java │ │ ├── fundamentaldata │ │ └── data │ │ │ └── earnings.json │ │ └── parser │ │ └── ParserUtilTest.java └── main │ └── java │ └── com │ └── crazzyghost │ └── alphavantage │ ├── parser │ ├── NoneableLong.java │ ├── NoneableDouble.java │ ├── SimpleParser.java │ ├── NoneableLongAdapter.java │ ├── NoneableDoubleAdapter.java │ └── DefaultParser.java │ ├── parameters │ ├── DataType.java │ ├── OutputSize.java │ ├── SeriesType.java │ ├── MAType.java │ ├── Maturity.java │ └── Interval.java │ ├── indicator │ ├── request │ │ ├── SimpleIndicatorRequest.java │ │ ├── PeriodicRequest.java │ │ ├── SeriesRequest.java │ │ ├── PeriodicSeriesRequest.java │ │ ├── ADOSCRequest.java │ │ └── SARRequest.java │ └── response │ │ ├── aroon │ │ └── AROONIndicatorUnit.java │ │ ├── mama │ │ └── MAMAIndicatorUnit.java │ │ ├── stochrsi │ │ └── STOCHRSIIndicatorUnit.java │ │ ├── stoch │ │ └── STOCHIndicatorUnit.java │ │ ├── stochf │ │ └── STOCHFIndicatorUnit.java │ │ ├── SimpleIndicatorUnit.java │ │ ├── htsine │ │ └── HTSINEIndicatorUnit.java │ │ ├── htphasor │ │ └── HTPHASORIndicatorUnit.java │ │ ├── macd │ │ └── MACDIndicatorUnit.java │ │ ├── bbands │ │ └── BBANDSIndicatorUnit.java │ │ ├── dx │ │ └── DXResponse.java │ │ ├── adx │ │ └── ADXResponse.java │ │ └── atr │ │ └── ATRResponse.java │ ├── technicalindicator │ ├── request │ │ ├── SimpleTechnicalIndicatorRequest.java │ │ ├── PeriodicRequest.java │ │ ├── SeriesRequest.java │ │ ├── PeriodicSeriesRequest.java │ │ ├── ADOSCRequest.java │ │ └── SARRequest.java │ └── response │ │ ├── mama │ │ └── MAMAIndicatorUnit.java │ │ ├── stoch │ │ └── STOCHIndicatorUnit.java │ │ ├── aroon │ │ └── AROONIndicatorUnit.java │ │ ├── stochf │ │ └── STOCHFIndicatorUnit.java │ │ ├── stochrsi │ │ └── STOCHRSIIndicatorUnit.java │ │ ├── htsine │ │ └── HTSINEIndicatorUnit.java │ │ ├── SimpleTechnicalIndicatorUnit.java │ │ ├── htphasor │ │ └── HTPHASORIndicatorUnit.java │ │ ├── macd │ │ └── MACDIndicatorUnit.java │ │ └── bbands │ │ └── BBANDSIndicatorUnit.java │ ├── timeseries │ └── request │ │ ├── QuoteRequest.java │ │ ├── WeeklyRequest.java │ │ ├── MonthlyRequest.java │ │ ├── DailyRequest.java │ │ └── TimeSeriesRequest.java │ ├── forex │ └── request │ │ ├── MonthlyRequest.java │ │ ├── WeeklyRequest.java │ │ ├── DailyRequest.java │ │ ├── ForexRequest.java │ │ └── IntraDayRequest.java │ ├── marketstatus │ └── request │ │ └── MarketStatusRequest.java │ ├── sector │ └── request │ │ └── SectorRequest.java │ ├── fundamentaldata │ └── response │ │ └── AnnualEarning.java │ └── search │ └── request │ └── SearchRequest.java ├── docs ├── api │ ├── search │ │ ├── request │ │ │ ├── index.md │ │ │ └── search-request │ │ │ │ ├── index.md │ │ │ │ └── builder.md │ │ ├── response │ │ │ ├── index.md │ │ │ ├── search-response.md │ │ │ └── match.md │ │ ├── index.md │ │ └── search.md │ ├── marketstatus │ │ ├── request │ │ │ ├── index.md │ │ │ └── market-status-request │ │ │ │ ├── index.md │ │ │ │ └── builder.md │ │ ├── response │ │ │ ├── index.md │ │ │ ├── market-status-response.md │ │ │ └── market.md │ │ ├── index.md │ │ └── marketstatus.md │ ├── sector │ │ ├── request.md │ │ ├── response.md │ │ ├── index.md │ │ └── sector-request.md │ ├── cryptocurrency │ │ ├── request │ │ │ ├── intraday-request │ │ │ │ ├── index.md │ │ │ │ └── builder.md │ │ │ ├── crypto-request │ │ │ │ ├── index.md │ │ │ │ └── builder.md │ │ │ ├── digital-currency-request │ │ │ │ ├── index.md │ │ │ │ └── builder.md │ │ │ └── index.md │ │ ├── response │ │ │ ├── index.md │ │ │ ├── crypto-unit │ │ │ │ ├── builder.md │ │ │ │ └── index.md │ │ │ ├── crypto-response │ │ │ │ └── index.md │ │ │ └── meta-data │ │ │ │ ├── builder.md │ │ │ │ └── index.md │ │ ├── index.md │ │ └── crypto.md │ ├── alphavantage │ │ ├── exception.md │ │ ├── extractor.md │ │ └── fetcher.md │ ├── forex │ │ └── index.md │ ├── indicator │ │ └── index.md │ ├── timeseries │ │ └── index.md │ ├── exchangerate │ │ └── index.md │ ├── fundamentaldata │ │ ├── index.md │ │ ├── request.md │ │ └── fundamentaldata.md │ └── economicindicator │ │ ├── index.md │ │ └── request.md ├── exchangerate.md ├── css │ └── extra.css └── sector.md └── LICENSE /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'alphavantage' 2 | System.setProperty("sonar.gradle.skipCompile", "true") 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazzyghost/alphavantage-java/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/unemployment.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Unemployment Rate", 3 | "interval": "monthly", 4 | "unit": "percent", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "3.6" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "3.8" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/inflationexpectation.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Inflation Expectations", 3 | "interval": "monthly", 4 | "unit": "percent", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "5.4" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "4.9" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/nonfarmpayroll.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Total Nonfarm Payroll", 3 | "interval": "monthly", 4 | "unit": "thousands of persons", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "149938" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "149144" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/treasuryyield.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "10-Year Treasury Constant Maturity Rate", 3 | "interval": "monthly", 4 | "unit": "percent", 5 | "data": [ 6 | { 7 | "date": "2022-04-01", 8 | "value": "2.75" 9 | }, 10 | { 11 | "date": "2022-03-01", 12 | "value": "2.13" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parser/NoneableLong.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parser; 2 | 3 | import com.squareup.moshi.JsonQualifier; 4 | 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @JsonQualifier 10 | public @interface NoneableLong { } 11 | -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/retailsales.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Advance Retail Sales: Retail Trade", 3 | "interval": "monthly", 4 | "unit": "millions of dollars", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "593300" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "507990" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parser/NoneableDouble.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parser; 2 | 3 | import com.squareup.moshi.JsonQualifier; 4 | 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @JsonQualifier 10 | public @interface NoneableDouble { } 11 | -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/durables.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Manufacturer New Orders: Durable Goods", 3 | "interval": "monthly", 4 | "unit": "millions of dollars", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "308600" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "265197" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/inflation.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Inflation - US Consumer Prices", 3 | "interval": "annual", 4 | "unit": "percent", 5 | "data": [ 6 | { 7 | "date": "2021-01-01", 8 | "value": "4.69785886363739" 9 | }, 10 | { 11 | "date": "2020-01-01", 12 | "value": "1.23358439630637" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/realgdppercapita.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Real Gross Domestic Product", 3 | "interval": "annual", 4 | "unit": "billions of dollars", 5 | "data": [ 6 | { 7 | "date": "2021-01-01", 8 | "value": "19427.287" 9 | }, 10 | { 11 | "date": "2020-01-01", 12 | "value": "18384.687" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parser/SimpleParser.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parser; 2 | 3 | import java.util.Map; 4 | 5 | public abstract class SimpleParser extends Parser { 6 | 7 | @Override 8 | final public T parse(Map object) { return null; } 9 | 10 | public abstract T parse(U data); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/consumersentiment.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Consumer Sentiment & Consumer Confidence", 3 | "interval": "monthly", 4 | "unit": "index 1966:Q1=100", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "59.4" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "62.8" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/federalfundsrate.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Effective Federal Funds Rate", 3 | "interval": "monthly", 4 | "unit": "percent", 5 | "data": [ 6 | { 7 | "date": "2022-04-01", 8 | "value": "0.33" 9 | }, 10 | { 11 | "date": "2022-03-01", 12 | "value": "0.20" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/cpi.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Consumer Price Index for all Urban Consumers", 3 | "interval": "monthly", 4 | "unit": "index 1982-1984=100", 5 | "data": [ 6 | { 7 | "date": "2022-03-01", 8 | "value": "287.504" 9 | }, 10 | { 11 | "date": "2022-02-01", 12 | "value": "283.716" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/test/java/economicindicator/data/realgdp.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Real Gross Domestic Product per Capita", 3 | "interval": "quarterly", 4 | "unit": "chained 2012 dollars", 5 | "data": [ 6 | { 7 | "date": "2022-01-01", 8 | "value": "59312.0" 9 | }, 10 | { 11 | "date": "2021-10-01", 12 | "value": "59553.0" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parameters/DataType.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parameters; 2 | 3 | public enum DataType { 4 | 5 | JSON("json"), 6 | CSV("csv"); 7 | 8 | private final String dataType; 9 | 10 | DataType(String dataType){ 11 | this.dataType = dataType; 12 | } 13 | 14 | @Override 15 | public String toString() { 16 | return dataType; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs/api/search/request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / request 2 | 3 | # `alphavantage.search.request` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |-----------------|-----------------------| 9 | | [SearchRequest] | `class SearchRequest` | 10 | 11 | [SearchRequest]: ./search-request/index.md 12 | [request]: ../request/index.md 13 | [search]: ../index.md 14 | [alphavantage]: ../../alphavantage/index.md 15 | -------------------------------------------------------------------------------- /src/test/java/crypto/data/rating.json: -------------------------------------------------------------------------------- 1 | { 2 | "Crypto Rating (FCAS)": { 3 | "1. symbol": "BTC", 4 | "2. name": "Bitcoin", 5 | "3. fcas rating": "Attractive", 6 | "4. fcas score": "887", 7 | "5. developer score": "844", 8 | "6. market maturity score": "838", 9 | "7. utility score": "951", 10 | "8. last refreshed": "2020-05-03 00:00:00", 11 | "9. timezone": "UTC" 12 | } 13 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parameters/OutputSize.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parameters; 2 | 3 | public enum OutputSize { 4 | 5 | COMPACT("compact"), 6 | FULL("full"); 7 | 8 | private final String outputSize; 9 | 10 | OutputSize(String outputSize){ 11 | this.outputSize = outputSize; 12 | } 13 | 14 | @Override 15 | public String toString() { 16 | return this.outputSize; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs/api/marketstatus/request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / request 2 | 3 | # `alphavantage.marketstatus.request` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |-----------------------|------------------------| 9 | | [MarketStatusRequest] | `class MarketStatusRequest` | 10 | 11 | [MarketStatusRequest]: ./market-status-request/index.md 12 | [marketstatus]: ../index.md 13 | [alphavantage]: ../../alphavantage/index.md 14 | -------------------------------------------------------------------------------- /docs/api/search/response/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / response 2 | 3 | # `alphavantage.search.request` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |----------------------------------------|------------------------| 9 | | [SearchResponse](./search-response.md) | `class SearchResponse` | 10 | 11 | [response]: ../response/index.md 12 | [search]: ../index.md 13 | [alphavantage]: ../../alphavantage/index.md 14 | -------------------------------------------------------------------------------- /src/test/java/timeseries/data/globalquote.json: -------------------------------------------------------------------------------- 1 | { 2 | "Global Quote": { 3 | "01. symbol": "IBM", 4 | "02. open": "122.6700", 5 | "03. high": "122.8000", 6 | "04. low": "121.0600", 7 | "05. price": "121.7400", 8 | "06. volume": "2528814", 9 | "07. latest trading day": "2020-05-08", 10 | "08. previous close": "121.2300", 11 | "09. change": "0.5100", 12 | "10. change percent": "0.4207%" 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parameters/SeriesType.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parameters; 2 | 3 | public enum SeriesType { 4 | OPEN("open"), 5 | HIGH("high"), 6 | CLOSE("close"), 7 | LOW("low"); 8 | 9 | private final String seriesType; 10 | 11 | SeriesType(String seriesType){ 12 | this.seriesType = seriesType; 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return seriesType; 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/bop.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "(BOP)", 5 | "3: Last Refreshed": "2020-04-30 16:00:00", 6 | "4: Interval": "15min", 7 | "5: Time Zone": "US/Eastern" 8 | }, 9 | "Technical Analysis: BOP": { 10 | "2020-04-30 16:00": { 11 | "BOP": "126.1365" 12 | }, 13 | "2020-04-30 15:45": { 14 | "BOP": "126.1717" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/trange.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "True Range (TRANGE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Zone": "US/Eastern Time" 8 | }, 9 | "Technical Analysis: TRANGE": { 10 | "2020-05-01": { 11 | "TRANGE": "4.1700" 12 | }, 13 | "2020-04-30": { 14 | "TRANGE": "3.4700" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/bop.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "(BOP)", 5 | "3: Last Refreshed": "2020-04-30 16:00:00", 6 | "4: Interval": "15min", 7 | "5: Time Zone": "US/Eastern" 8 | }, 9 | "Technical Analysis: BOP": { 10 | "2020-04-30 16:00": { 11 | "BOP": "126.1365" 12 | }, 13 | "2020-04-30 15:45": { 14 | "BOP": "126.1717" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/dx.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "DX", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: DX": { 11 | "2020-04-29": { 12 | "DX": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "DX": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/cci.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "CCI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: CCI": { 11 | "2020-04-29": { 12 | "CCI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "CCI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/mfi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MFI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MFI": { 11 | "2020-04-29": { 12 | "MFI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MFI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/obv.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "On Balance Volume (OBV)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Time Zone": "US/Eastern Time" 8 | }, 9 | "Technical Analysis: OBV": { 10 | "2020-05-01": { 11 | "OBV": "351573219.0000" 12 | }, 13 | "2020-04-24": { 14 | "OBV": "378076208.0000" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/dx.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "DX", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: DX": { 11 | "2020-04-29": { 12 | "DX": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "DX": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/trange.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "True Range (TRANGE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Zone": "US/Eastern Time" 8 | }, 9 | "Technical Analysis: TRANGE": { 10 | "2020-05-01": { 11 | "TRANGE": "4.1700" 12 | }, 13 | "2020-04-30": { 14 | "TRANGE": "3.4700" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /docs/api/search/request/search-request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / [request] / SearchRequest 2 | 3 | # `SearchRequest` 4 | 5 | `public final class SearchRequest extends Object` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-------------------------|-------------------------------| 11 | | [Builder](builder.md) | `public static class Builder` | 12 | 13 | 14 | [request]: ../index.md 15 | [search]: ../index.md 16 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /src/test/java/exchangerate/data/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "Realtime Currency Exchange Rate": { 3 | "1. From_Currency Code": "BTC", 4 | "2. From_Currency Name": "Bitcoin", 5 | "3. To_Currency Code": "CNY", 6 | "4. To_Currency Name": "Chinese Yuan", 7 | "5. Exchange Rate": "62423.68125000", 8 | "6. Last Refreshed": "2020-05-03 20:32:20", 9 | "7. Time Zone": "UTC", 10 | "8. Bid Price": "62423.68125000", 11 | "9. Ask Price": "62423.75188500" 12 | } 13 | } -------------------------------------------------------------------------------- /src/test/java/parameters/DataTypeTest.java: -------------------------------------------------------------------------------- 1 | package parameters; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import com.crazzyghost.alphavantage.parameters.DataType; 6 | 7 | import org.junit.Test; 8 | 9 | public class DataTypeTest { 10 | 11 | @Test 12 | public void testJson(){ 13 | assertEquals(DataType.JSON.toString(), "json"); 14 | } 15 | 16 | @Test 17 | public void testCSV(){ 18 | assertEquals(DataType.CSV.toString(), "csv"); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/cci.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "CCI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: CCI": { 11 | "2020-04-29": { 12 | "CCI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "CCI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/mfi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MFI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MFI": { 11 | "2020-04-29": { 12 | "MFI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MFI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/obv.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "On Balance Volume (OBV)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Time Zone": "US/Eastern Time" 8 | }, 9 | "Technical Analysis: OBV": { 10 | "2020-05-01": { 11 | "OBV": "351573219.0000" 12 | }, 13 | "2020-04-24": { 14 | "OBV": "378076208.0000" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/willr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "WILLR", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: WILLR": { 11 | "2020-04-29": { 12 | "WILLR": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "WILLR": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/parameters/OutputSizeTest.java: -------------------------------------------------------------------------------- 1 | package parameters; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import com.crazzyghost.alphavantage.parameters.OutputSize; 6 | 7 | import org.junit.Test; 8 | 9 | public class OutputSizeTest { 10 | 11 | @Test 12 | public void testCompact(){ 13 | assertEquals(OutputSize.COMPACT.toString(), "compact"); 14 | } 15 | 16 | @Test 17 | public void testFull(){ 18 | assertEquals(OutputSize.FULL.toString(), "full"); 19 | } 20 | } -------------------------------------------------------------------------------- /docs/api/sector/request.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [sector] / [request] 4 | 5 | ## Package alphavantage.sector.request 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-----------------|-----------------------------------------------------| 11 | | [SectorRequest] | A sector performance request. `class SectorRequest` | 12 | 13 | [sector]: ./index.md 14 | [SectorRequest]: ./sector-request.md 15 | [request]: request.md 16 | -------------------------------------------------------------------------------- /src/test/java/exchangerate/data/data-with-no-bid-or-ask-price.json: -------------------------------------------------------------------------------- 1 | { 2 | "Realtime Currency Exchange Rate": { 3 | "1. From_Currency Code": "USD", 4 | "2. From_Currency Name": "United States Dollar", 5 | "3. To_Currency Code": "JPY", 6 | "4. To_Currency Name": "Japanese Yen", 7 | "5. Exchange Rate": "106.89000000", 8 | "6. Last Refreshed": "2020-05-03 20:50:48", 9 | "7. Time Zone": "UTC", 10 | "8. Bid Price": "-", 11 | "9. Ask Price": "-" 12 | } 13 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/ad.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Chaikin A/D Line", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Zone": "US/Eastern Time" 8 | }, 9 | "Technical Analysis: Chaikin A/D": { 10 | "2020-05-01": { 11 | "Chaikin A/D": "491109805.1477" 12 | }, 13 | "2020-04-30": { 14 | "Chaikin A/D": "493761142.9169" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/atr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Average True Range (ATR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Period": 14, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: ATR": { 11 | "2020-05-01": { 12 | "ATR": "4.8682" 13 | }, 14 | "2020-04-30": { 15 | "ATR": "4.9219" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/plusdi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "PLUS_DI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: PLUS_DI": { 11 | "2020-04-29": { 12 | "PLUS_DI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "PLUS_DI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/plusdm.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "PLUS_DM", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: PLUS_DM": { 11 | "2020-04-29": { 12 | "PLUS_DM": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "PLUS_DM": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/willr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "WILLR", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: WILLR": { 11 | "2020-04-29": { 12 | "WILLR": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "WILLR": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/minusdi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MINUS_DI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MINUS_DI": { 11 | "2020-04-29": { 12 | "MINUS_DI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MINUS_DI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/minusdm.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MINUS_DM", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MINUS_DM": { 11 | "2020-04-29": { 12 | "MINUS_DM": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MINUS_DM": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/vwap.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Volume Weighted Average Price (VWAP)", 5 | "3: Last Refreshed": "2020-04-30 16:00:00", 6 | "4: Interval": "15min", 7 | "5: Time Zone": "US/Eastern" 8 | }, 9 | "Technical Analysis: VWAP": { 10 | "2020-04-30 16:00": { 11 | "VWAP": "126.1365" 12 | }, 13 | "2020-04-30 15:45": { 14 | "VWAP": "126.1717" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/ad.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Chaikin A/D Line", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Zone": "US/Eastern Time" 8 | }, 9 | "Technical Analysis: Chaikin A/D": { 10 | "2020-05-01": { 11 | "Chaikin A/D": "491109805.1477" 12 | }, 13 | "2020-04-30": { 14 | "Chaikin A/D": "493761142.9169" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/intraday-request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [request] / IntradayRequest 2 | 3 | # `IntradayRequest` 4 | 5 | `public class IntradayRequest extends CryptoRequest` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-----------|-------------------------------| 11 | | [Builder] | `public static class Builder` | 12 | 13 | [request]: ../index.md 14 | [cryptocurrency]: ../../index.md 15 | [alphavantage]: ../../../alphavantage/index.md 16 | [Builder]: ./builder.md -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parameters/MAType.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parameters; 2 | 3 | public enum MAType { 4 | 5 | SMA(0), 6 | EMA(1), 7 | WMA(2), 8 | DEMA(3), 9 | TEMA(4), 10 | TRIMA(5), 11 | T3(6), 12 | KAMA(7), 13 | MAMA(8); 14 | 15 | private final int type; 16 | 17 | MAType(int type){ 18 | this.type = type; 19 | } 20 | 21 | @Override 22 | public String toString() { 23 | return "" + this.type; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/aroonosc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "AROONOSC", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: AROONOSC": { 11 | "2020-04-29": { 12 | "AROONOSC": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "AROONOSC": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/midprice.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MIDPRICE", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MIDPRICE": { 11 | "2020-04-29": { 12 | "MIDPRICE": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MIDPRICE": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/atr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Average True Range (ATR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Period": 14, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: ATR": { 11 | "2020-05-01": { 12 | "ATR": "4.8682" 13 | }, 14 | "2020-04-30": { 15 | "ATR": "4.9219" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/plusdi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "PLUS_DI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: PLUS_DI": { 11 | "2020-04-29": { 12 | "PLUS_DI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "PLUS_DI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/plusdm.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "PLUS_DM", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: PLUS_DM": { 11 | "2020-04-29": { 12 | "PLUS_DM": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "PLUS_DM": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/vwap.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Volume Weighted Average Price (VWAP)", 5 | "3: Last Refreshed": "2020-04-30 16:00:00", 6 | "4: Interval": "15min", 7 | "5: Time Zone": "US/Eastern" 8 | }, 9 | "Technical Analysis: VWAP": { 10 | "2020-04-30 16:00": { 11 | "VWAP": "126.1365" 12 | }, 13 | "2020-04-30 15:45": { 14 | "VWAP": "126.1717" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/t3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "T3", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: T3": { 12 | "2020-04-29": { 13 | "T3": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "T3": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/aroonosc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "AROONOSC", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: AROONOSC": { 11 | "2020-04-29": { 12 | "AROONOSC": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "AROONOSC": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/midprice.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MIDPRICE", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MIDPRICE": { 11 | "2020-04-29": { 12 | "MIDPRICE": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MIDPRICE": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/minusdi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MINUS_DI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MINUS_DI": { 11 | "2020-04-29": { 12 | "MINUS_DI": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MINUS_DI": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/minusdm.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "MINUS_DM", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: MINUS_DM": { 11 | "2020-04-29": { 12 | "MINUS_DM": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "MINUS_DM": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/adx.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Average Directional Movement Index (ADX)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: ADX": { 11 | "2020-04-29": { 12 | "ADX": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "ADX": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/cmo.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(CMO)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: CMO": { 12 | "2020-04-29": { 13 | "CMO": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "CMO": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/mom.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "MOM", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: MOM": { 12 | "2020-04-29": { 13 | "MOM": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "MOM": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/natr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Normalized Average True Range (NATR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Period": 14, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: NATR": { 11 | "2020-05-01": { 12 | "NATR": "4.8682" 13 | }, 14 | "2020-04-30": { 15 | "NATR": "4.9219" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/roc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(ROC)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: ROC": { 12 | "2020-04-29": { 13 | "ROC": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "ROC": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/rsi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "RSI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: RSI": { 12 | "2020-04-29": { 13 | "RSI": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "RSI": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/crypto-request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [request] / CryptoRequest 2 | 3 | # `CryptoRequest` 4 | 5 | `public abstract class CryptoRequest extends Object` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-----------|--------------------------------------| 11 | | [Builder] | `public abstract static class Builder` | 12 | 13 | [cryptocurrency]: ../../index.md 14 | [request]: ../index.md 15 | [alphavantage]: ../../../alphavantage/index.md 16 | [Builder]: ./builder.md -------------------------------------------------------------------------------- /docs/api/marketstatus/request/market-status-request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / [request] / MarketStatusRequest 2 | 3 | # `MarketStatusRequest` 4 | 5 | `public class MarketStatusRequest extends Object` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-------------------|----------------------------------| 11 | | [Builder](builder.md) | `public static class Builder` | 12 | 13 | [request]: ../index.md 14 | [marketstatus]: ../../index.md 15 | [alphavantage]: ../../../alphavantage/index.md 16 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/adxr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Average Directional Movement Index (ADXR)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: ADXR": { 11 | "2020-04-29": { 12 | "ADXR": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "ADXR": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/dema.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "DEMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: DEMA": { 12 | "2020-04-29": { 13 | "DEMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "DEMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/kama.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "KAMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: KAMA": { 12 | "2020-04-29": { 13 | "KAMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "KAMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/rocr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(ROCR)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: ROCR": { 12 | "2020-04-29": { 13 | "ROCR": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "ROCR": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/tema.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "TEMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: TEMA": { 12 | "2020-04-29": { 13 | "TEMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "TEMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/trix.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(TRIX)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: TRIX": { 12 | "2020-04-29": { 13 | "TRIX": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "TRIX": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/natr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Normalized Average True Range (NATR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Time Period": 14, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: NATR": { 11 | "2020-05-01": { 12 | "NATR": "4.8682" 13 | }, 14 | "2020-04-30": { 15 | "NATR": "4.9219" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/t3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "T3", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: T3": { 12 | "2020-04-29": { 13 | "T3": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "T3": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/trima.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "TRIMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: TRIMA": { 12 | "2020-04-29": { 13 | "TRIMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "TRIMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/adx.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Average Directional Movement Index (ADX)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: ADX": { 11 | "2020-04-29": { 12 | "ADX": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "ADX": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/cmo.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(CMO)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: CMO": { 12 | "2020-04-29": { 13 | "CMO": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "CMO": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/mom.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "MOM", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: MOM": { 12 | "2020-04-29": { 13 | "MOM": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "MOM": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/roc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(ROC)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: ROC": { 12 | "2020-04-29": { 13 | "ROC": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "ROC": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/rsi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "RSI", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: RSI": { 12 | "2020-04-29": { 13 | "RSI": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "RSI": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /docs/api/marketstatus/response/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / response 2 | 3 | # `alphavantage.marketstatus.response` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |-----------------------------|---------------------------| 9 | | [MarketStatusResponse](./market-status-response.md) | `class MarketStatusResponse` | 10 | | [Market](./market.md) | `class Market` | 11 | 12 | [response]: ../response/index.md 13 | [marketstatus]: ../index.md 14 | [alphavantage]: ../../alphavantage/index.md 15 | -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/adxr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Average Directional Movement Index (ADXR)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: ADXR": { 11 | "2020-04-29": { 12 | "ADXR": "17.3417" 13 | }, 14 | "2020-04-28": { 15 | "ADXR": "16.4304" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/dema.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "DEMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: DEMA": { 12 | "2020-04-29": { 13 | "DEMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "DEMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/kama.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "KAMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: KAMA": { 12 | "2020-04-29": { 13 | "KAMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "KAMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/rocr.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(ROCR)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: ROCR": { 12 | "2020-04-29": { 13 | "ROCR": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "ROCR": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/tema.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "TEMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: TEMA": { 12 | "2020-04-29": { 13 | "TEMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "TEMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/trix.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(TRIX)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: TRIX": { 12 | "2020-04-29": { 13 | "TRIX": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "TRIX": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/request/SimpleIndicatorRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.request; 2 | 3 | public class SimpleIndicatorRequest extends IndicatorRequest { 4 | 5 | private SimpleIndicatorRequest(Builder builder) { 6 | super(builder); 7 | } 8 | 9 | public static class Builder extends IndicatorRequest.Builder{ 10 | 11 | @Override 12 | public IndicatorRequest build() { 13 | return new SimpleIndicatorRequest(this); 14 | } 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parser/NoneableLongAdapter.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parser; 2 | 3 | import com.squareup.moshi.FromJson; 4 | import com.squareup.moshi.ToJson; 5 | 6 | public class NoneableLongAdapter { 7 | 8 | @ToJson 9 | public Long toJson(@NoneableLong Long l) { 10 | throw new UnsupportedOperationException(); 11 | } 12 | 13 | @FromJson 14 | @NoneableLong 15 | public Long fromJson(String s) { 16 | return Parser.getNumberFromString(s, Long::parseLong); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/sar.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Parabolic SAR (SAR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5.1: Acceleration": 0.05, 8 | "5.2: Maximum": 0.25, 9 | "6: Time Zone": "US/Eastern Time" 10 | }, 11 | "Technical Analysis: SAR": { 12 | "2020-05-01": { 13 | "SAR": "98.4484" 14 | }, 15 | "2020-04-24": { 16 | "SAR": "95.4782" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/trima.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "TRIMA", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: TRIMA": { 12 | "2020-04-29": { 13 | "TRIMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "TRIMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/digital-currency-request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [request] / DigitalCurrencyRequest 2 | 3 | # `DigitalCurrencyRequest` 4 | 5 | `public class DigitalCurrencyRequest extends CryptoRequest` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-----------|---------------------------------| 11 | | [Builder] | `public static class Builder` | 12 | 13 | [request]: ../index.md 14 | [cryptocurrency]: ../../index.md 15 | [alphavantage]: ../../../alphavantage/index.md 16 | [Builder]: ./builder.md -------------------------------------------------------------------------------- /src/test/java/indicator/data/midpoint.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(MIDPOINT)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: MIDPOINT": { 12 | "2020-04-29": { 13 | "MIDPOINT": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "MIDPOINT": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/sma.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "Simple Moving Average (SMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: SMA": { 12 | "2020-04-29": { 13 | "SMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "SMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/wma.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "Weighted Moving Average (WMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: WMA": { 12 | "2020-04-29": { 13 | "WMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "WMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/ema.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "Exponential Moving Average (EMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: EMA": { 12 | "2020-04-29": { 13 | "EMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "EMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/sar.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Parabolic SAR (SAR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5.1: Acceleration": 0.05, 8 | "5.2: Maximum": 0.25, 9 | "6: Time Zone": "US/Eastern Time" 10 | }, 11 | "Technical Analysis: SAR": { 12 | "2020-05-01": { 13 | "SAR": "98.4484" 14 | }, 15 | "2020-04-24": { 16 | "SAR": "95.4782" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/sma.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "Simple Moving Average (SMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: SMA": { 12 | "2020-04-29": { 13 | "SMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "SMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parameters/Maturity.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parameters; 2 | 3 | public enum Maturity { 4 | THREE_MONTH("3month"), 5 | TWO_YEAR("2year"), 6 | FIVE_YEAR("5year"), 7 | SEVEN_YEAR("7year"), 8 | TEN_YEAR("10year"), 9 | THIRTY_YEAR("30year"); 10 | 11 | private final String maturity; 12 | 13 | Maturity(String maturity){ 14 | this.maturity = maturity; 15 | } 16 | 17 | 18 | @Override 19 | public String toString() { 20 | return this.maturity; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/httrendmode.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Trend vs Cycle Mode (HT_TRENDMODE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_TRENDMODE": { 11 | "2020-05-01": { 12 | "TRENDMODE": "1" 13 | }, 14 | "2020-04-24": { 15 | "TRENDMODE": "1" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/ema.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "Exponential Moving Average (EMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: EMA": { 12 | "2020-04-29": { 13 | "EMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "EMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/midpoint.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "(MIDPOINT)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: MIDPOINT": { 12 | "2020-04-29": { 13 | "MIDPOINT": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "MIDPOINT": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/wma.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "USDEUR", 4 | "2: Indicator": "Weighted Moving Average (WMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 10, 8 | "6: Series Type": "open", 9 | "7: Time Zone": "US/Eastern" 10 | }, 11 | "Technical Analysis: WMA": { 12 | "2020-04-29": { 13 | "WMA": "0.9120" 14 | }, 15 | "2020-04-24": { 16 | "WMA": "0.9118" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parser/NoneableDoubleAdapter.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parser; 2 | 3 | import com.squareup.moshi.FromJson; 4 | import com.squareup.moshi.ToJson; 5 | 6 | public class NoneableDoubleAdapter { 7 | 8 | @ToJson 9 | public Double toJson(@NoneableDouble Double l) { 10 | throw new UnsupportedOperationException(); 11 | } 12 | 13 | @FromJson 14 | @NoneableDouble 15 | public Double fromJson(String s) { 16 | return Parser.getNumberFromString(s, Double::parseDouble); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/htdcperiod.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Dominant Cycle Period (HT_DCPERIOD)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_DCPERIOD": { 11 | "2020-05-01": { 12 | "DCPERIOD": "21.4120" 13 | }, 14 | "2020-04-30": { 15 | "DCPERIOD": "21.9911" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/htdcphase.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Dominant Cycle Phase (HT_DCPHASE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_DCPHASE": { 11 | "2020-05-01": { 12 | "HT_DCPHASE": "204.3570" 13 | }, 14 | "2020-04-30": { 15 | "HT_DCPHASE": "203.5150" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/httrendmode.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Trend vs Cycle Mode (HT_TRENDMODE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_TRENDMODE": { 11 | "2020-05-01": { 12 | "TRENDMODE": "1" 13 | }, 14 | "2020-04-24": { 15 | "TRENDMODE": "1" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/adosc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Chaikin A/D Oscillator (ADOSC)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5.1: FastK Period": 5, 8 | "5.2: SlowK Period": 10, 9 | "6: Time Zone": "US/Eastern Time" 10 | }, 11 | "Technical Analysis: ADOSC": { 12 | "2020-05-01": { 13 | "ADOSC": "1528856.9997" 14 | }, 15 | "2020-04-30": { 16 | "ADOSC": "2708242.0301" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/adosc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Chaikin A/D Oscillator (ADOSC)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5.1: FastK Period": 5, 8 | "5.2: SlowK Period": 10, 9 | "6: Time Zone": "US/Eastern Time" 10 | }, 11 | "Technical Analysis: ADOSC": { 12 | "2020-05-01": { 13 | "ADOSC": "1528856.9997" 14 | }, 15 | "2020-04-30": { 16 | "ADOSC": "2708242.0301" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/htdcperiod.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Dominant Cycle Period (HT_DCPERIOD)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_DCPERIOD": { 11 | "2020-05-01": { 12 | "DCPERIOD": "21.4120" 13 | }, 14 | "2020-04-30": { 15 | "DCPERIOD": "21.9911" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/htdcphase.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Dominant Cycle Phase (HT_DCPHASE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_DCPHASE": { 11 | "2020-05-01": { 12 | "HT_DCPHASE": "204.3570" 13 | }, 14 | "2020-04-30": { 15 | "HT_DCPHASE": "203.5150" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /docs/api/alphavantage/exception.md: -------------------------------------------------------------------------------- 1 | [alphavantage](index.md) / [AlphavantageException](#) 2 | 3 | # AlphavantageException 4 | 5 | `public class AlphavantageException extends Object, RuntimeException` 6 | 7 | Exception class for the library. 8 | 9 | ### Constructors 10 | 11 | | Name | Summary | 12 | |----------------------------|------------------------------------------------| 13 | | [AlphavantageException](#) | `public AlphavantageException()` | 14 | | [AlphavantageException](#) | `public AlphavantageException(String message)` | 15 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/aroon.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Aroon (AROON)", 5 | "3: Last Refreshed": "2020-04-30", 6 | "4: Interval": "daily", 7 | "5: Time Period": 14, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: AROON": { 11 | "2020-04-30": { 12 | "Aroon Down": "50.0000", 13 | "Aroon Up": "92.8571" 14 | }, 15 | "2020-04-29": { 16 | "Aroon Down": "57.1429", 17 | "Aroon Up": "100.0000" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/httrendline.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Instantaneous Trendline (HT_TRENDLINE)", 5 | "3: Last Refreshed": "2020-05-01 12:01:58", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_TRENDLINE": { 11 | "2020-05-01 12:01:58": { 12 | "HT_TRENDLINE": "118.8034" 13 | }, 14 | "2020-04-30": { 15 | "HT_TRENDLINE": "117.8039" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/ultosc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Ultimate Oscillator (ULTOSC)", 5 | "3: Last Refreshed": "2020-04-30", 6 | "4: Interval": "daily", 7 | "5.1: Time Period 1": 8, 8 | "5.2: Time Period 2": 14, 9 | "5.3: Time Period 3": 28, 10 | "6: Time Zone": "US/Eastern Time" 11 | }, 12 | "Technical Analysis: ULTOSC": { 13 | "2020-04-30": { 14 | "ULTOSC": "57.1603" 15 | }, 16 | "2020-04-29": { 17 | "ULTOSC": "59.9617" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/aroon.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Aroon (AROON)", 5 | "3: Last Refreshed": "2020-04-30", 6 | "4: Interval": "daily", 7 | "5: Time Period": 14, 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: AROON": { 11 | "2020-04-30": { 12 | "Aroon Down": "50.0000", 13 | "Aroon Up": "92.8571" 14 | }, 15 | "2020-04-29": { 16 | "Aroon Down": "57.1429", 17 | "Aroon Up": "100.0000" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/httrendline.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Instantaneous Trendline (HT_TRENDLINE)", 5 | "3: Last Refreshed": "2020-05-01 12:01:58", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_TRENDLINE": { 11 | "2020-05-01 12:01:58": { 12 | "HT_TRENDLINE": "118.8034" 13 | }, 14 | "2020-04-30": { 15 | "HT_TRENDLINE": "117.8039" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/ultosc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Ultimate Oscillator (ULTOSC)", 5 | "3: Last Refreshed": "2020-04-30", 6 | "4: Interval": "daily", 7 | "5.1: Time Period 1": 8, 8 | "5.2: Time Period 2": 14, 9 | "5.3: Time Period 3": 28, 10 | "6: Time Zone": "US/Eastern Time" 11 | }, 12 | "Technical Analysis: ULTOSC": { 13 | "2020-04-30": { 14 | "ULTOSC": "57.1603" 15 | }, 16 | "2020-04-29": { 17 | "ULTOSC": "59.9617" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/htsine.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - SineWave (HT_SINE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_SINE": { 11 | "2020-05-01": { 12 | "LEAD SINE": "-0.9358", 13 | "SINE": "-0.4124" 14 | }, 15 | "2020-04-30": { 16 | "LEAD SINE": "-0.9305", 17 | "SINE": "-0.3990" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/apo.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Absolute Price Oscillator (APO)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: Fast Period": 10, 8 | "5.2: Slow Period": 26, 9 | "5.3: MA Type": 1, 10 | "6: Series Type": "close", 11 | "7: Time Zone": "US/Eastern Time" 12 | }, 13 | "Technical Analysis: APO": { 14 | "2020-04-29": { 15 | "APO": "3.2761" 16 | }, 17 | "2020-04-28": { 18 | "APO": "2.7409" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/ppo.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Percentage Price Oscillator (PPO)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: Fast Period": 10, 8 | "5.2: Slow Period": 26, 9 | "5.3: MA Type": 1, 10 | "6: Series Type": "close", 11 | "7: Time Zone": "US/Eastern Time" 12 | }, 13 | "Technical Analysis: PPO": { 14 | "2020-04-29": { 15 | "PPO": "2.7345" 16 | }, 17 | "2020-04-28": { 18 | "PPO": "2.3014" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/request/SimpleTechnicalIndicatorRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.request; 2 | 3 | public class SimpleTechnicalIndicatorRequest extends TechnicalIndicatorRequest { 4 | 5 | private SimpleTechnicalIndicatorRequest(Builder builder) { 6 | super(builder); 7 | } 8 | 9 | public static class Builder extends TechnicalIndicatorRequest.Builder { 10 | 11 | @Override 12 | public TechnicalIndicatorRequest build() { 13 | return new SimpleTechnicalIndicatorRequest(this); 14 | } 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/htsine.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - SineWave (HT_SINE)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "daily", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_SINE": { 11 | "2020-05-01": { 12 | "LEAD SINE": "-0.9358", 13 | "SINE": "-0.4124" 14 | }, 15 | "2020-04-30": { 16 | "LEAD SINE": "-0.9305", 17 | "SINE": "-0.3990" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/apo.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Absolute Price Oscillator (APO)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: Fast Period": 10, 8 | "5.2: Slow Period": 26, 9 | "5.3: MA Type": 1, 10 | "6: Series Type": "close", 11 | "7: Time Zone": "US/Eastern Time" 12 | }, 13 | "Technical Analysis: APO": { 14 | "2020-04-29": { 15 | "APO": "3.2761" 16 | }, 17 | "2020-04-28": { 18 | "APO": "2.7409" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/ppo.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Percentage Price Oscillator (PPO)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: Fast Period": 10, 8 | "5.2: Slow Period": 26, 9 | "5.3: MA Type": 1, 10 | "6: Series Type": "close", 11 | "7: Time Zone": "US/Eastern Time" 12 | }, 13 | "Technical Analysis: PPO": { 14 | "2020-04-29": { 15 | "PPO": "2.7345" 16 | }, 17 | "2020-04-28": { 18 | "PPO": "2.3014" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/htphasor.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Phasor Components (HT_PHASOR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_PHASOR": { 11 | "2020-05-01": { 12 | "PHASE": "-21.8410", 13 | "QUADRATURE": "38.7063" 14 | }, 15 | "2020-04-24": { 16 | "PHASE": "-35.5257", 17 | "QUADRATURE": "12.3469" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/htphasor.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Hilbert Transform - Phasor Components (HT_PHASOR)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Series Type": "close", 8 | "6: Time Zone": "US/Eastern Time" 9 | }, 10 | "Technical Analysis: HT_PHASOR": { 11 | "2020-05-01": { 12 | "PHASE": "-21.8410", 13 | "QUADRATURE": "38.7063" 14 | }, 15 | "2020-04-24": { 16 | "PHASE": "-35.5257", 17 | "QUADRATURE": "12.3469" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/response/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / response 2 | 3 | # `alphavantage.cryptocurrency.response` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |--------------------|-------------------------| 9 | | [CryptoResponse] | `class CryptoResponse` | 10 | | [CryptoUnit] | `class CryptoUnit` | 11 | | [MetaData] | `class MetaData` | 12 | 13 | [alphavantage]: ../../alphavantage/index.md 14 | [cryptocurrency]: ../index.md 15 | [response]: ./index.md 16 | [CryptoResponse]: ./crypto-response/index.md 17 | [CryptoUnit]: ./crypto-unit/index.md 18 | [MetaData]: ./meta-data/index.md 19 | -------------------------------------------------------------------------------- /docs/api/search/response/search-response.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / [response] / SearchResponse 2 | 3 | # `SearchResponse` 4 | 5 | `public final class SearchResponse extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |----------------------|---------------------------------------| 11 | | [of](#) | `public static SearchResponse of` | 12 | | [getBestMatches](#) | `public List getBestMatches()` | 13 | | [getErrorMessage](#) | `public String getErrorMessage()` | 14 | 15 | 16 | [response]: ../response/index.md 17 | [search]: ./index.md 18 | [alphavantage]: ../../alphavantage/index.md -------------------------------------------------------------------------------- /docs/api/sector/response.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage] / [sector] / [response] 4 | 5 | ## Package alphavantage.sector.response 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |------------------|---------------------------------------------------------| 11 | | [SectorResponse] | A Sector performance response. `class SectorResponse` | 12 | | [SectorUnit] | A sector performance data structure. `class SectorUnit` | 13 | 14 | [alphavantage]: ../alphavantage/index.md 15 | [sector]: ./index.md 16 | [SectorResponse]: ./sector-response.md 17 | [SectorUnit]: ./sector-unit.md 18 | [response]: ./response.md 19 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/stochf.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Stochastic Fast (STOCHF)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: FastK Period": 5, 8 | "5.2: FastD Period": 3, 9 | "5.3: FastD MA Type": 0, 10 | "6: Time Zone": "US/Eastern Time" 11 | }, 12 | "Technical Analysis: STOCHF": { 13 | "2020-04-29": { 14 | "FastD": "89.5423", 15 | "FastK": "93.9156" 16 | }, 17 | "2020-04-28": { 18 | "FastD": "90.8491", 19 | "FastK": "81.8779" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /docs/api/search/request/search-request/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / [request] / [SearchRequest] / Builder 2 | 3 | # `SearchRequest.Builder` 4 | 5 | `public static class Builder extends Object` 6 | 7 | ### Constructors 8 | 9 | | Name | Summary | 10 | |--------------|------------------| 11 | | [Builder](#) | `public Builder` | 12 | 13 | 14 | ### Methods 15 | 16 | | Name | Summary | 17 | |------------|---------------------------------| 18 | | [build](#) | `private SearchRequest build()` | 19 | 20 | [SearchRequest]: index.md 21 | [request]: ../index.md 22 | [search]: ../../index.md 23 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/stochf.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Stochastic Fast (STOCHF)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: FastK Period": 5, 8 | "5.2: FastD Period": 3, 9 | "5.3: FastD MA Type": 0, 10 | "6: Time Zone": "US/Eastern Time" 11 | }, 12 | "Technical Analysis: STOCHF": { 13 | "2020-04-29": { 14 | "FastD": "89.5423", 15 | "FastK": "93.9156" 16 | }, 17 | "2020-04-28": { 18 | "FastD": "90.8491", 19 | "FastK": "81.8779" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /docs/api/search/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / search 2 | 3 | # `alphavantage.search` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |-----------------------|------------------------------| 9 | | [Search](./search.md) | Symbol Search `class Search` | 10 | 11 | ### Packages 12 | 13 | | Name | Summary | 14 | |------------|----------------------------------------| 15 | | [request] | `package alphavantage.search.request` | 16 | | [response] | `package alphavantage.search.response` | 17 | 18 | [alphavantage]: ../alphavantage/index.md 19 | [search]: ./index.md 20 | [request]: request/index.md 21 | [response]: response/index.md 22 | -------------------------------------------------------------------------------- /src/test/java/indicator/data/mama.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "GOOGL", 4 | "2: Indicator": "MESA Adaptive Moving Average (MAMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: Fast Limit": 0.1, 8 | "5.2: Slow Limit": 0.1, 9 | "6: Series Type": "close", 10 | "7: Time Zone": "US/Eastern Time" 11 | }, 12 | "Technical Analysis: MAMA": { 13 | "2020-04-29": { 14 | "MAMA": "1242.3874", 15 | "FAMA": "1243.3415" 16 | }, 17 | "2020-04-28": { 18 | "MAMA": "1231.2993", 19 | "FAMA": "1243.3917" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/timeseries/request/QuoteRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.timeseries.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class QuoteRequest extends TimeSeriesRequest { 6 | 7 | private QuoteRequest(Builder builder) { 8 | super(builder); 9 | } 10 | 11 | public static class Builder extends TimeSeriesRequest.Builder{ 12 | public Builder(){ 13 | this.function(Function.GLOBAL_QUOTE); 14 | } 15 | 16 | @Override 17 | public QuoteRequest build(){ 18 | return new QuoteRequest(this); 19 | } 20 | } 21 | 22 | 23 | 24 | } -------------------------------------------------------------------------------- /docs/api/forex/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [forex](#) 4 | 5 | ## Package alphavantage.forex 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |---------|------------------------------------------------| 11 | | [Forex] | Access to Foreign Exchange Data. `class Forex` | 12 | 13 | ### Packages 14 | 15 | | Name | Summary | 16 | |------------|---------------------------------------| 17 | | [request] | `package alphavantage.forex.request` | 18 | | [response] | `package alphavantage.forex.response` | 19 | 20 | [Forex]: index.md 21 | [request]: index.md 22 | [response]: index.md 23 | -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/mama.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "GOOGL", 4 | "2: Indicator": "MESA Adaptive Moving Average (MAMA)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: Fast Limit": 0.1, 8 | "5.2: Slow Limit": 0.1, 9 | "6: Series Type": "close", 10 | "7: Time Zone": "US/Eastern Time" 11 | }, 12 | "Technical Analysis: MAMA": { 13 | "2020-04-29": { 14 | "MAMA": "1242.3874", 15 | "FAMA": "1243.3415" 16 | }, 17 | "2020-04-28": { 18 | "MAMA": "1231.2993", 19 | "FAMA": "1243.3917" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parameters/Interval.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parameters; 2 | 3 | public enum Interval { 4 | 5 | ONE_MIN("1min"), 6 | FIVE_MIN("5min") , 7 | FIFTEEN_MIN("15min"), 8 | THIRTY_MIN("30min"), 9 | SIXTY_MIN("60min"), 10 | DAILY("daily"), 11 | WEEKLY("weekly"), 12 | MONTHLY("monthly"), 13 | QUARTERLY("quarterly"), 14 | SEMI_ANNUAL("semiannual"), 15 | ANNUAL("annual"); 16 | 17 | private final String interval; 18 | 19 | Interval(String interval){ 20 | this.interval = interval; 21 | } 22 | 23 | 24 | @Override 25 | public String toString() { 26 | return this.interval; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /docs/api/marketstatus/request/market-status-request/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / [request] / [MarketStatusRequest] / Builder 2 | 3 | # `MarketStatusRequest.Builder` 4 | 5 | `public static class Builder extends Object` 6 | 7 | ### Constructors 8 | 9 | | Name | Summary | 10 | |--------------|------------------| 11 | | [Builder](#) | `public Builder` | 12 | 13 | 14 | ### Methods 15 | 16 | | Name | Summary | 17 | |------------|----------------------------------| 18 | | [build](#) | `public MarketStatusRequest build()` | 19 | 20 | [MarketStatusRequest]: index.md 21 | [request]: ../index.md 22 | [marketstatus]: ../../index.md 23 | [alphavantage]: ../../../alphavantage/index.md 24 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/forex/request/MonthlyRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.forex.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class MonthlyRequest extends ForexRequest{ 6 | 7 | private Function function; 8 | 9 | private MonthlyRequest(Builder builder){ 10 | super(builder); 11 | this.function = Function.FX_MONTHLY; 12 | } 13 | 14 | public static class Builder extends ForexRequest.Builder { 15 | 16 | public Builder(){ 17 | super(); 18 | } 19 | 20 | @Override 21 | public MonthlyRequest build() { 22 | return new MonthlyRequest(this); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/forex/request/WeeklyRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.forex.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class WeeklyRequest extends ForexRequest{ 6 | 7 | private Function function; 8 | 9 | private WeeklyRequest(Builder builder){ 10 | super(builder); 11 | this.function = Function.FX_WEEKLY; 12 | } 13 | 14 | 15 | public static class Builder extends ForexRequest.Builder { 16 | 17 | public Builder(){ 18 | super(); 19 | } 20 | 21 | @Override 22 | public WeeklyRequest build() { 23 | return new WeeklyRequest(this); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/forex/data/monthly.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Forex Monthly Prices (open, high, low, close)", 4 | "2. From Symbol": "EUR", 5 | "3. To Symbol": "USD", 6 | "4. Last Refreshed": "2020-05-06 21:45:00", 7 | "5. Time Zone": "UTC" 8 | }, 9 | "Time Series FX (Monthly)": { 10 | "2020-05-06": { 11 | "1. open": "1.0943", 12 | "2. high": "1.1019", 13 | "3. low": "1.0780", 14 | "4. close": "1.0793" 15 | }, 16 | "2020-04-30": { 17 | "1. open": "1.1023", 18 | "2. high": "1.1037", 19 | "3. low": "1.0725", 20 | "4. close": "1.0943" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/stoch.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Stochastic (STOCH)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: FastK Period": 5, 8 | "5.2: SlowK Period": 3, 9 | "5.3: SlowK MA Type": 0, 10 | "5.4: SlowD Period": 3, 11 | "5.5: SlowD MA Type": 0, 12 | "6: Time Zone": "US/Eastern Time" 13 | }, 14 | "Technical Analysis: STOCH": { 15 | "2020-04-29": { 16 | "SlowD": "90.7254", 17 | "SlowK": "89.5423" 18 | }, 19 | "2020-04-28": { 20 | "SlowD": "88.6146", 21 | "SlowK": "90.8491" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/digital-currency-request/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [request] / [DigitalCurrencyRequest] / Builder 2 | 3 | # `DigitalCurrencyRequest.Builder` 4 | 5 | `public static class Builder extends CryptoRequest.Builder` 6 | 7 | ### Constructors 8 | 9 | | Name | Summary | 10 | |------------|------------------| 11 | | [Builder](#) | `public Builder()` | 12 | 13 | ### Methods 14 | 15 | | Name | Summary | 16 | |------------|--------------------------------| 17 | | [build](#) | `public CryptoRequest build()` | 18 | 19 | [DigitalCurrencyRequest]: index.md 20 | [request]: ../index.md 21 | [cryptocurrency]: ../../index.md 22 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/marketstatus/request/MarketStatusRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.marketstatus.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class MarketStatusRequest { 6 | private final Function function; 7 | 8 | private MarketStatusRequest(Builder builder) { 9 | this.function = builder.function; 10 | } 11 | 12 | public static class Builder { 13 | private final Function function; 14 | 15 | public Builder() { 16 | this.function = Function.MARKET_STATUS; 17 | } 18 | 19 | public MarketStatusRequest build() { 20 | return new MarketStatusRequest(this); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs/api/marketstatus/response/market-status-response.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / [response] / MarketStatusResponse 2 | 3 | # `MarketStatusResponse` 4 | 5 | `public final class MarketStatusResponse extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |----------------------|----------------------------------------------| 11 | | [of](#) | `public static MarketStatusResponse of` | 12 | | [getMarkets](#) | `public List getMarkets()` | 13 | | [getErrorMessage](#) | `public String getErrorMessage()` | 14 | 15 | 16 | [response]: ../response/index.md 17 | [marketstatus]: ../index.md 18 | [alphavantage]: ../../alphavantage/index.md 19 | -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/stoch.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Stochastic (STOCH)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5.1: FastK Period": 5, 8 | "5.2: SlowK Period": 3, 9 | "5.3: SlowK MA Type": 0, 10 | "5.4: SlowD Period": 3, 11 | "5.5: SlowD MA Type": 0, 12 | "6: Time Zone": "US/Eastern Time" 13 | }, 14 | "Technical Analysis: STOCH": { 15 | "2020-04-29": { 16 | "SlowD": "90.7254", 17 | "SlowK": "89.5423" 18 | }, 19 | "2020-04-28": { 20 | "SlowD": "88.6146", 21 | "SlowK": "90.8491" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /docs/api/marketstatus/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / marketstatus 2 | 3 | # `alphavantage.marketstatus` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |---------------------------|----------------------------------| 9 | | [MarketStatus](./marketstatus.md) | `final class MarketStatus` | 10 | 11 | ### Packages 12 | 13 | | Name | Summary | 14 | |-----------|-------------------------------------------| 15 | | [request] | `package alphavantage.marketstatus.request` | 16 | | [response] | `package alphavantage.marketstatus.response` | 17 | 18 | [alphavantage]: ../alphavantage/index.md 19 | [marketstatus]: ./index.md 20 | [request]: request/index.md 21 | [response]: response/index.md 22 | -------------------------------------------------------------------------------- /docs/api/sector/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage] / [sector](./index.md) 4 | 5 | ## Package alphavantage.sector 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |----------|---------------------------------------------------| 11 | | [Sector] | Access to Sector Performance Data. `class Sector` | 12 | 13 | ### Packages 14 | 15 | | Name | Summary | 16 | |------------|----------------------------------------| 17 | | [request] | `package alphavantage.sector.request` | 18 | | [response] | `package alphavantage.sector.response` | 19 | 20 | [alphavantage]: ../alphavantage/index.md 21 | [Sector]: ./sector.md 22 | [request]: ./request.md 23 | [response]: ./response.md 24 | -------------------------------------------------------------------------------- /src/test/java/parameters/SeriesTypeTest.java: -------------------------------------------------------------------------------- 1 | package parameters; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import com.crazzyghost.alphavantage.parameters.SeriesType; 6 | 7 | import org.junit.Test; 8 | 9 | public class SeriesTypeTest { 10 | 11 | @Test 12 | public void testHigh(){ 13 | assertEquals(SeriesType.HIGH.toString(), "high"); 14 | } 15 | 16 | @Test 17 | public void testLow(){ 18 | assertEquals(SeriesType.LOW.toString(), "low"); 19 | } 20 | 21 | @Test 22 | public void testOpen(){ 23 | assertEquals(SeriesType.OPEN.toString(), "open"); 24 | } 25 | 26 | @Test 27 | public void testClose(){ 28 | assertEquals(SeriesType.CLOSE.toString(), "close"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/crypto-request/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [request] / [CryptoRequest] / Builder 2 | 3 | # `CryptoRequest.Builder` 4 | 5 | `public abstract static class Builder extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |------------|----------------------------------------| 11 | | [function](#) | `public T function(Function function)` | 12 | | [symbol](#) | `public T symbol(String symbol)` | 13 | | [market](#) | `public T market(String market)` | 14 | | [build](#) | `public abstract CryptoRequest build()`| 15 | 16 | [CryptoRequest]: index.md 17 | [request]: ../index.md 18 | [cryptocurrency]: ../../index.md 19 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /docs/api/indicator/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [indicator](#) 4 | 5 | ## Package alphavantage.indicator 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-------------|-------------------------------------------------------| 11 | | [Indicator] | Access to Technical Indicator Data. `class Indicator` | 12 | 13 | ### Packages 14 | 15 | | Name | Summary | 16 | |------------|-------------------------------------------| 17 | | [request] | `package alphavantage.indicator.request` | 18 | | [response] | `package alphavantage.indicator.response` | 19 | 20 | [Indicator]: index.md 21 | [request]: index.md 22 | [response]: index.md 23 | -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / request 2 | 3 | # `alphavantage.cryptocurrency.request` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |-----------------------------|--------------------------------| 9 | | [CryptoRequest] | `abstract class CryptoRequest` | 10 | | [DigitalCurrencyRequest] | `class DigitalCurrencyRequest` | 11 | | [IntradayRequest] | `class IntradayRequest` | 12 | 13 | [alphavantage]: ../../alphavantage/index.md 14 | [cryptocurrency]: ../index.md 15 | [request]: ./index.md 16 | [CryptoRequest]: ./crypto-request/index.md 17 | [DigitalCurrencyRequest]: ./digital-currency-request/index.md 18 | [IntradayRequest]: ./intraday-request/index.md 19 | -------------------------------------------------------------------------------- /docs/api/timeseries/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [timeseries](#) 4 | 5 | ## Package alphavantage.timeseries 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |--------------|------------------------------------------------------| 11 | | [TimeSeries] | Access to Stock Time Series Data. `class TimeSeries` | 12 | 13 | ### Packages 14 | 15 | | Name | Summary | 16 | |------------|--------------------------------------------| 17 | | [request] | `package alphavantage.timeseries.request` | 18 | | [response] | `package alphavantage.timeseries.response` | 19 | 20 | [TimeSeries]: index.md 21 | [request]: index.md 22 | [response]: index.md 23 | -------------------------------------------------------------------------------- /src/test/java/forex/data/daily.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Forex Daily Prices (open, high, low, close)", 4 | "2. From Symbol": "EUR", 5 | "3. To Symbol": "USD", 6 | "4. Output Size": "Full size", 7 | "5. Last Refreshed": "2020-05-06 21:55:00", 8 | "6. Time Zone": "UTC" 9 | }, 10 | "Time Series FX (Daily)": { 11 | "2020-05-06": { 12 | "1. open": "1.0839", 13 | "2. high": "1.0844", 14 | "3. low": "1.0780", 15 | "4. close": "1.0794" 16 | }, 17 | "2020-05-05": { 18 | "1. open": "1.0904", 19 | "2. high": "1.0926", 20 | "3. low": "1.0825", 21 | "4. close": "1.0840" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/stochrsi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Stochastic Relative Strength Index (STOCHRSI)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6.1: FastK Period": 6, 9 | "6.2: FastD Period": 3, 10 | "6.3: FastD MA Type": 1, 11 | "7: Series Type": "close", 12 | "8: Time Zone": "US/Eastern Time" 13 | }, 14 | "Technical Analysis: STOCHRSI": { 15 | "2020-04-29": { 16 | "FastK": "100.0000", 17 | "FastD": "98.2190" 18 | }, 19 | "2020-04-28": { 20 | "FastK": "100.0000", 21 | "FastD": "96.4379" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/test/java/forex/data/weekly.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Forex Weekly Prices (open, high, low, close)", 4 | "2. From Symbol": "EUR", 5 | "3. To Symbol": "USD", 6 | "4. Output Size": "Full size", 7 | "5. Last Refreshed": "2020-05-06 21:55:00", 8 | "6. Time Zone": "UTC" 9 | }, 10 | "Time Series FX (Daily)": { 11 | "2020-05-06": { 12 | "1. open": "1.0839", 13 | "2. high": "1.0844", 14 | "3. low": "1.0780", 15 | "4. close": "1.0793" 16 | }, 17 | "2020-05-05": { 18 | "1. open": "1.0904", 19 | "2. high": "1.0926", 20 | "3. low": "1.0825", 21 | "4. close": "1.0840" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/stochrsi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Stochastic Relative Strength Index (STOCHRSI)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "daily", 7 | "5: Time Period": 10, 8 | "6.1: FastK Period": 6, 9 | "6.2: FastD Period": 3, 10 | "6.3: FastD MA Type": 1, 11 | "7: Series Type": "close", 12 | "8: Time Zone": "US/Eastern Time" 13 | }, 14 | "Technical Analysis: STOCHRSI": { 15 | "2020-04-29": { 16 | "FastK": "100.0000", 17 | "FastD": "98.2190" 18 | }, 19 | "2020-04-28": { 20 | "FastK": "100.0000", 21 | "FastD": "96.4379" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /docs/api/exchangerate/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [exchangerate](#) 4 | 5 | ## Package alphavantage.exchangerate 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |----------------|----------------------------------------------------| 11 | | [ExchangeRate] | Access to Exchange Rate Data. `class ExchangeRate` | 12 | 13 | ### Packages 14 | 15 | | Name | Summary | 16 | |------------|----------------------------------------------| 17 | | [request] | `package alphavantage.exchangerate.request` | 18 | | [response] | `package alphavantage.exchangerate.response` | 19 | 20 | [ExchangeRate]: index.md 21 | [request]: index.md 22 | [response]: index.md 23 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/sector/request/SectorRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.sector.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | /** 6 | * @author crazzyghost 7 | * @since 1.4.0 8 | * A Sector request 9 | */ 10 | public final class SectorRequest { 11 | 12 | private Function function; 13 | 14 | private SectorRequest(Builder builder){ 15 | this.function = builder.function; 16 | } 17 | 18 | public static class Builder { 19 | 20 | private Function function; 21 | 22 | public Builder(){ 23 | this.function = Function.SECTOR; 24 | } 25 | 26 | public SectorRequest build(){ 27 | return new SectorRequest(this); 28 | } 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / cryptocurrency 2 | 3 | # `alphavantage.cryptocurrency` 4 | 5 | ### Types 6 | 7 | | Name | Summary | 8 | |-----------|------------------------------------------------| 9 | | [Crypto] | Access to Crypto Currency Data. `class Crypto` | 10 | 11 | ### Packages 12 | 13 | | Name | Summary | 14 | |------------|------------------------------------------------| 15 | | [request] | `package alphavantage.cryptocurrency.request` | 16 | | [response] | `package alphavantage.cryptocurrency.response` | 17 | 18 | [alphavantage]: ../alphavantage/index.md 19 | [cryptocurrency]: ./index.md 20 | [Crypto]: ./crypto.md 21 | [request]: request/index.md 22 | [response]: response/index.md 23 | -------------------------------------------------------------------------------- /docs/api/cryptocurrency/response/crypto-unit/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [response] / [CryptoUnit] / Builder 2 | 3 | # `CryptoUnit.Builder` 4 | 5 | `public static class Builder extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |------------|----------------------------| 11 | | [open](#) | `public Builder open(Double open)` | 12 | | [high](#) | `public Builder high(Double high)` | 13 | | [low](#) | `public Builder low(Double low)` | 14 | | [close](#) | `public Builder close(Double close)` | 15 | | [volume](#)| `public Builder volume(Double volume)` | 16 | | [build](#) | `public CryptoUnit build()` | 17 | 18 | [CryptoUnit]: index.md 19 | [response]: ../index.md 20 | [cryptocurrency]: ../../index.md 21 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /src/test/java/ConfigTest.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.assertEquals; 2 | import static org.junit.Assert.assertNotNull; 3 | 4 | import com.crazzyghost.alphavantage.Config; 5 | 6 | import org.junit.Test; 7 | 8 | public class ConfigTest { 9 | 10 | @Test 11 | public void testDefaultHttpClient(){ 12 | Config cfg = Config.builder().build(); 13 | assertNotNull(cfg.getOkHttpClient()); 14 | } 15 | 16 | @Test 17 | public void testConfigKey(){ 18 | Config cfg = Config.builder().key("demo").build(); 19 | assertEquals(cfg.getKey(), "demo"); 20 | } 21 | 22 | @Test 23 | public void testConfigTimeout(){ 24 | Config cfg = Config.builder().timeOut(15).key("demo").build(); 25 | assertEquals(cfg.getTimeOut(), 15); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/test/java/crypto/RatingResponseTest.java: -------------------------------------------------------------------------------- 1 | package crypto; 2 | 3 | import com.crazzyghost.alphavantage.cryptocurrency.response.RatingResponse; 4 | import org.junit.Before; 5 | import org.junit.Test; 6 | import util.TestUtils; 7 | 8 | import java.io.IOException; 9 | 10 | import static org.junit.Assert.*; 11 | import static util.TestUtils.empty; 12 | 13 | public class RatingResponseTest { 14 | @Before 15 | public void setUp(){ 16 | TestUtils.forDirectory("crypto"); 17 | } 18 | 19 | @Test 20 | public void testEmptyRatingResponseError() throws IOException { 21 | RatingResponse response = RatingResponse.of(empty()); 22 | assertNotNull(response.getErrorMessage()); 23 | assertFalse(response.toString().matches("(.*), errorMessage='null'(.*)")); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/timeseries/data/weekly.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Weekly Prices (open, high, low, close) and Volumes", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:07:57", 6 | "4. Time Zone": "US/Eastern" 7 | }, 8 | "Weekly Time Series": { 9 | "2020-05-08": { 10 | "1. open": "120.8200", 11 | "2. high": "124.3200", 12 | "3. low": "119.3910", 13 | "4. close": "121.8050", 14 | "5. volume": "18730017" 15 | }, 16 | "2020-05-01": { 17 | "1. open": "125.5600", 18 | "2. high": "129.3100", 19 | "3. low": "121.3900", 20 | "4. close": "121.8700", 21 | "5. volume": "26502989" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/test/java/timeseries/data/monthly.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Monthly Prices (open, high, low, close) and Volumes", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:09:56", 6 | "4. Time Zone": "US/Eastern" 7 | }, 8 | "Monthly Time Series": { 9 | "2020-05-08": { 10 | "1. open": "123.1900", 11 | "2. high": "124.3200", 12 | "3. low": "119.3910", 13 | "4. close": "121.8400", 14 | "5. volume": "23665041" 15 | }, 16 | "2020-04-30": { 17 | "1. open": "106.3600", 18 | "2. high": "129.3100", 19 | "3. low": "104.5210", 20 | "4. close": "125.5600", 21 | "5. volume": "130400316" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/test/java/forex/data/intraday.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "FX Intraday (5min) Time Series", 4 | "2. From Symbol": "EUR", 5 | "3. To Symbol": "USD", 6 | "4. Last Refreshed": "2020-05-06 21:55:00", 7 | "5. Interval": "5min", 8 | "6. Output Size": "Full size", 9 | "7. Time Zone": "UTC" 10 | }, 11 | "Time Series FX (5min)": { 12 | "2020-05-06 21:55:00": { 13 | "1. open": "1.0795", 14 | "2. high": "1.0795", 15 | "3. low": "1.0792", 16 | "4. close": "1.0794" 17 | }, 18 | "2020-05-06 21:50:00": { 19 | "1. open": "1.0793", 20 | "2. high": "1.0796", 21 | "3. low": "1.0792", 22 | "4. close": "1.0795" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/macd.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "GOOGL", 4 | "2: Indicator": "Moving Average Convergence/Divergence (MACD)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "monthly", 7 | "5.1: Fast Period": 12, 8 | "5.2: Slow Period": 26, 9 | "5.3: Signal Period": 9, 10 | "6: Series Type": "close", 11 | "7: Time Zone": "US/Eastern" 12 | }, 13 | "Technical Analysis: MACD": { 14 | "2020-04-29": { 15 | "MACD_Signal": "75.7378", 16 | "MACD": "76.7618", 17 | "MACD_Hist": "1.0241" 18 | }, 19 | "2020-03-31": { 20 | "MACD_Signal": "75.4817", 21 | "MACD": "74.6750", 22 | "MACD_Hist": "-0.8067" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/request/PeriodicRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.request; 2 | 3 | 4 | public class PeriodicRequest extends IndicatorRequest{ 5 | 6 | private int time_period; 7 | 8 | private PeriodicRequest(Builder builder){ 9 | super(builder); 10 | this.time_period = builder.timePeriod; 11 | } 12 | 13 | public static class Builder extends IndicatorRequest.Builder{ 14 | 15 | private int timePeriod = 60; 16 | 17 | public Builder timePeriod(int timePeriod){ 18 | this.timePeriod = timePeriod; 19 | return this; 20 | } 21 | 22 | @Override 23 | public IndicatorRequest build() { 24 | return new PeriodicRequest(this); 25 | } 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/macd.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "GOOGL", 4 | "2: Indicator": "Moving Average Convergence/Divergence (MACD)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "monthly", 7 | "5.1: Fast Period": 12, 8 | "5.2: Slow Period": 26, 9 | "5.3: Signal Period": 9, 10 | "6: Series Type": "close", 11 | "7: Time Zone": "US/Eastern" 12 | }, 13 | "Technical Analysis: MACD": { 14 | "2020-04-29": { 15 | "MACD_Signal": "75.7378", 16 | "MACD": "76.7618", 17 | "MACD_Hist": "1.0241" 18 | }, 19 | "2020-03-31": { 20 | "MACD_Signal": "75.4817", 21 | "MACD": "74.6750", 22 | "MACD_Hist": "-0.8067" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /docs/api/fundamentaldata/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [fundamentaldata](#) 4 | 5 | ## Package alphavantage.fundamentaldata 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-------------------|-----------------------------------------------------| 11 | | [FundamentalData] | Access to Fundamental Data. `class FundamentalData` | 12 | 13 | ### Packages 14 | 15 | | Name | Summary | 16 | |------------|-------------------------------------------------| 17 | | [request] | `package alphavantage.fundamentaldata.request` | 18 | | [response] | `package alphavantage.fundamentaldata.response` | 19 | 20 | [FundamentalData]: fundamentaldata.md 21 | [request]: request.md 22 | [response]: response.md 23 | -------------------------------------------------------------------------------- /docs/api/cryptocurrency/response/crypto-response/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [response] / CryptoResponse 2 | 3 | # `CryptoResponse` 4 | 5 | `public class CryptoResponse extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |-------------------|-----------------------------------------| 11 | | [of](#) | `public static CryptoResponse of(Map data)` | 12 | | [getCryptoUnits](#) | `public List getCryptoUnits()` | 13 | | [getMetaData](#) | `public MetaData getMetaData()` | 14 | | [getErrorMessage](#)| `public String getErrorMessage()` | 15 | | [toString](#) | `public String toString()` | 16 | 17 | [response]: ../index.md 18 | [cryptocurrency]: ../../index.md 19 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /src/test/java/timeseries/data/daily.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Daily Prices (open, high, low, close) and Volumes", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:07:03", 6 | "4. Output Size": "Full size", 7 | "5. Time Zone": "US/Eastern" 8 | }, 9 | "Time Series (Daily)": { 10 | "2020-05-08": { 11 | "1. open": "122.6700", 12 | "2. high": "122.8000", 13 | "3. low": "121.0600", 14 | "4. close": "121.7900", 15 | "5. volume": "2538547" 16 | }, 17 | "2020-05-07": { 18 | "1. open": "122.9800", 19 | "2. high": "123.2600", 20 | "3. low": "120.8500", 21 | "4. close": "121.2300", 22 | "5. volume": "4412047" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /docs/api/economicindicator/index.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage](../alphavantage/index.md) / [economicindicator](#) 4 | 5 | ## Package alphavantage.economicindicator 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |---------------------|--------------------------------------------------------------| 11 | | [EconomicIndicator] | Access to Economic Indicator Data. `class EconomicIndicator` | 12 | 13 | ### Packages 14 | 15 | |Name| Summary | 16 | |----|--------------------------------------------------| 17 | |[request]| `package alphavantage.economicindicator.request` | 18 | |[response]| `package alphavantage.economicindicator.response` | 19 | 20 | [EconomicIndicator]: index.md 21 | [request]: request.md 22 | [response]: response.md 23 | -------------------------------------------------------------------------------- /docs/api/alphavantage/extractor.md: -------------------------------------------------------------------------------- 1 | [alphavantage](index.md) / [UrlExtractor](#) 2 | 3 | # UrlExtractor 4 | 5 | `public class UrlExtractor extends Object` 6 | 7 | Extracts a valid url from a request object. The request object should contain valid api endpoint parameters 8 | 9 | ### Constructors 10 | 11 | | Name | Summary | 12 | |-------------------|------------------------------------------------------| 13 | | [UrlExtractor](#) | private default constructor `private UrlExtractor()` | 14 | 15 | ### Methods 16 | 17 | | Name | Summary | 18 | |--------------|--------------------------------------------------------------------------------| 19 | | [extract](#) | Get an API url from a request object. `public static String extract(Object o)` | 20 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/request/PeriodicRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.request; 2 | 3 | public class PeriodicRequest extends TechnicalIndicatorRequest { 4 | 5 | private int time_period; 6 | 7 | private PeriodicRequest(Builder builder) { 8 | super(builder); 9 | this.time_period = builder.timePeriod; 10 | } 11 | 12 | public static class Builder extends TechnicalIndicatorRequest.Builder { 13 | 14 | private int timePeriod = 60; 15 | 16 | public Builder timePeriod(int timePeriod) { 17 | this.timePeriod = timePeriod; 18 | return this; 19 | } 20 | 21 | @Override 22 | public TechnicalIndicatorRequest build() { 23 | return new PeriodicRequest(this); 24 | } 25 | 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /docs/api/marketstatus/response/market.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / [response] / Market 2 | 3 | # `Market` 4 | 5 | `public class Market extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |---------------------|-------------------------------| 11 | | [getMarketType](#) | `public String getMarketType()` | 12 | | [getRegion](#) | `public String getRegion()` | 13 | | [getPrimaryExchanges](#) | `public String getPrimaryExchanges()` | 14 | | [getLocalOpen](#) | `public String getLocalOpen()` | 15 | | [getLocalClose](#) | `public String getLocalClose()` | 16 | | [getCurrentStatus](#) | `public String getCurrentStatus()` | 17 | | [getNotes](#) | `public String getNotes()` | 18 | 19 | [response]: ../response/index.md 20 | [marketstatus]: ../index.md 21 | [alphavantage]: ../../alphavantage/index.md 22 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/timeseries/request/WeeklyRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.timeseries.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class WeeklyRequest extends TimeSeriesRequest { 6 | 7 | public WeeklyRequest(Builder builder){ 8 | super(builder); 9 | } 10 | 11 | public static class Builder extends TimeSeriesRequest.Builder{ 12 | 13 | public Builder(){ 14 | super(); 15 | this.function(Function.TIME_SERIES_WEEKLY); 16 | } 17 | 18 | public Builder adjusted(){ 19 | this.function(Function.TIME_SERIES_WEEKLY_ADJUSTED); 20 | return this; 21 | } 22 | 23 | @Override 24 | public WeeklyRequest build() { 25 | return new WeeklyRequest(this); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/request/SeriesRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.SeriesType; 4 | 5 | public class SeriesRequest extends IndicatorRequest { 6 | 7 | private SeriesType series_type; 8 | 9 | private SeriesRequest(Builder builder){ 10 | super(builder); 11 | this.series_type = builder.seriesType; 12 | } 13 | 14 | public static class Builder extends IndicatorRequest.Builder{ 15 | 16 | private SeriesType seriesType; 17 | 18 | public Builder seriesType(SeriesType seriesType){ 19 | this.seriesType = seriesType; 20 | return this; 21 | } 22 | 23 | @Override 24 | public IndicatorRequest build() { 25 | return new SeriesRequest(this); 26 | } 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/timeseries/request/MonthlyRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.timeseries.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class MonthlyRequest extends TimeSeriesRequest { 6 | 7 | 8 | public MonthlyRequest(Builder builder){ 9 | super(builder); 10 | } 11 | 12 | 13 | public static class Builder extends TimeSeriesRequest.Builder{ 14 | 15 | public Builder(){ 16 | super(); 17 | this.function(Function.TIME_SERIES_MONTHLY); 18 | } 19 | 20 | public Builder adjusted(){ 21 | this.function(Function.TIME_SERIES_MONTHLY_ADJUSTED); 22 | return this; 23 | } 24 | 25 | @Override 26 | public MonthlyRequest build() { 27 | return new MonthlyRequest(this); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/timeseries/data/intraday.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Intraday (5min) open, high, low, close prices and volume", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:05:00", 6 | "4. Interval": "5min", 7 | "5. Output Size": "Full size", 8 | "6. Time Zone": "US/Eastern" 9 | }, 10 | "Time Series (5min)": { 11 | "2020-05-08 14:05:00": { 12 | "1. open": "121.7900", 13 | "2. high": "121.8600", 14 | "3. low": "121.7225", 15 | "4. close": "121.7400", 16 | "5. volume": "31454" 17 | }, 18 | "2020-05-08 14:00:00": { 19 | "1. open": "121.6850", 20 | "2. high": "121.8000", 21 | "3. low": "121.6850", 22 | "4. close": "121.7800", 23 | "5. volume": "29277" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/fundamentaldata/response/AnnualEarning.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.fundamentaldata.response; 2 | 3 | import com.crazzyghost.alphavantage.parser.NoneableDouble; 4 | import com.squareup.moshi.Json; 5 | 6 | public class AnnualEarning { 7 | 8 | @Json(name="fiscalDateEnding") 9 | private String fiscalDateEnding; 10 | @Json(name="reportedEPS") 11 | @NoneableDouble 12 | private Double reportedEPS; 13 | 14 | public String getFiscalDateEnding() { 15 | return fiscalDateEnding; 16 | } 17 | 18 | public Double getReportedEPS() { 19 | return reportedEPS; 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "AnnualEarning{" + 25 | "fiscalDateEnding='" + fiscalDateEnding + '\'' + 26 | ", reportedEPS='" + reportedEPS + '\'' + 27 | '}'; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/crypto/CryptoUnitTest.java: -------------------------------------------------------------------------------- 1 | package crypto; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertNotNull; 5 | 6 | import com.crazzyghost.alphavantage.cryptocurrency.response.CryptoUnit; 7 | 8 | import org.junit.Test; 9 | 10 | public class CryptoUnitTest { 11 | 12 | @Test 13 | public void testCryptoUnit(){ 14 | 15 | CryptoUnit unit = new CryptoUnit.Builder() 16 | .close(40.0) 17 | .high(56.76) 18 | .open(13.5) 19 | .low(3.5) 20 | .volume(100.0) 21 | .build(); 22 | 23 | assertEquals(unit.getClose(), 40.0, 0); 24 | assertEquals(unit.getHigh(), 56.76, 0); 25 | assertEquals(unit.getOpen(), 13.5, 0); 26 | assertEquals(unit.getLow(), 3.5, 0); 27 | assertEquals(unit.getVolume(), 100.0, 0); 28 | assertNotNull(unit.toString()); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /src/test/java/forex/ForexUnitTest.java: -------------------------------------------------------------------------------- 1 | package forex; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertNotNull; 5 | 6 | import com.crazzyghost.alphavantage.forex.response.ForexUnit; 7 | 8 | import org.junit.Test; 9 | 10 | public class ForexUnitTest { 11 | 12 | @Test 13 | public void testForexUnit(){ 14 | 15 | ForexUnit unit = new ForexUnit.Builder() 16 | .close(34.5) 17 | .high(50.5) 18 | .low(40.5) 19 | .open(35.5) 20 | .date("20-05-2099") 21 | .build(); 22 | 23 | assertEquals(unit.getClose(), 34.5, 0); 24 | assertEquals(unit.getHigh(), 50.5, 0); 25 | assertEquals(unit.getLow(), 40.5, 0); 26 | assertEquals(unit.getOpen(), 35.5, 0); 27 | assertEquals(unit.getDate(), "20-05-2099"); 28 | assertNotNull(unit.toString()); 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/bbands.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Bollinger Bands (BBANDS)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 5, 8 | "6.1: Deviation multiplier for upper band": 3, 9 | "6.2: Deviation multiplier for lower band": 3, 10 | "6.3: MA Type": 0, 11 | "7: Series Type": "close", 12 | "8: Time Zone": "US/Eastern Time" 13 | }, 14 | "Technical Analysis: BBANDS": { 15 | "2020-05-01": { 16 | "Real Upper Band": "138.2917", 17 | "Real Lower Band": "99.5283", 18 | "Real Middle Band": "118.9100" 19 | }, 20 | "2020-04-24": { 21 | "Real Upper Band": "138.5919", 22 | "Real Lower Band": "93.6921", 23 | "Real Middle Band": "116.1420" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/request/SeriesRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.SeriesType; 4 | 5 | public class SeriesRequest extends TechnicalIndicatorRequest { 6 | 7 | private SeriesType series_type; 8 | 9 | private SeriesRequest(Builder builder) { 10 | super(builder); 11 | this.series_type = builder.seriesType; 12 | } 13 | 14 | public static class Builder extends TechnicalIndicatorRequest.Builder { 15 | 16 | private SeriesType seriesType; 17 | 18 | public Builder seriesType(SeriesType seriesType) { 19 | this.seriesType = seriesType; 20 | return this; 21 | } 22 | 23 | @Override 24 | public TechnicalIndicatorRequest build() { 25 | return new SeriesRequest(this); 26 | } 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/mama/MAMAIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.mama; 2 | 3 | public class MAMAIndicatorUnit { 4 | 5 | private String date; 6 | private double famaValue; 7 | private double mamaValue; 8 | 9 | public MAMAIndicatorUnit(String date, double fama, double mama) { 10 | this.date = date; 11 | this.famaValue = fama; 12 | this.mamaValue = mama; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getFamaValue() { 20 | return famaValue; 21 | } 22 | 23 | public double getMamaValue() { 24 | return mamaValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "MAMAIndicatorUnit {date=" + date + ", famaValue=" + famaValue + ", mamaValue=" + mamaValue + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/test/java/indicator/data/macdext.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "GOOGL", 4 | "2: Indicator": "MACD with Controllable MA Type (MACDEXT)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "monthly", 7 | "5.1: Fast Period": 12, 8 | "5.2: Slow Period": 26, 9 | "5.3: Signal Period": 9, 10 | "5.4: Fast MA Type": 0, 11 | "5.5: Slow MA Type": 0, 12 | "5.6: Signal MA Type": 0, 13 | "6: Series Type": "close", 14 | "7: Time Zone": "US/Eastern Time" 15 | }, 16 | "Technical Analysis: MACDEXT": { 17 | "2020-04-29": { 18 | "MACD": "64.3354", 19 | "MACD_Signal": "45.7071", 20 | "MACD_Hist": "18.6283" 21 | }, 22 | "2020-03-31": { 23 | "MACD": "61.5643", 24 | "MACD_Signal": "44.0352", 25 | "MACD_Hist": "17.5291" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/bbands.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "IBM", 4 | "2: Indicator": "Bollinger Bands (BBANDS)", 5 | "3: Last Refreshed": "2020-05-01", 6 | "4: Interval": "weekly", 7 | "5: Time Period": 5, 8 | "6.1: Deviation multiplier for upper band": 3, 9 | "6.2: Deviation multiplier for lower band": 3, 10 | "6.3: MA Type": 0, 11 | "7: Series Type": "close", 12 | "8: Time Zone": "US/Eastern Time" 13 | }, 14 | "Technical Analysis: BBANDS": { 15 | "2020-05-01": { 16 | "Real Upper Band": "138.2917", 17 | "Real Lower Band": "99.5283", 18 | "Real Middle Band": "118.9100" 19 | }, 20 | "2020-04-24": { 21 | "Real Upper Band": "138.5919", 22 | "Real Lower Band": "93.6921", 23 | "Real Middle Band": "116.1420" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/aroon/AROONIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.aroon; 2 | 3 | public class AROONIndicatorUnit { 4 | 5 | private String date; 6 | private double aroonUp; 7 | private double aroonDown; 8 | 9 | public AROONIndicatorUnit(String date, double aroonUp, double aroonDown) { 10 | this.date = date; 11 | this.aroonUp = aroonUp; 12 | this.aroonDown = aroonDown; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getAroonUpValue() { 20 | return aroonUp; 21 | } 22 | 23 | public double getAroonDownValue() { 24 | return aroonDown; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "AROONIndicatorUnit {date=" + date + ", aroonUp=" + aroonUp + ", aroonDown=" + aroonDown + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/response/crypto-unit/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [response] / CryptoUnit 2 | 3 | # `CryptoUnit` 4 | 5 | `public class CryptoUnit extends Object` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-----------|-------------------------------| 11 | | [Builder] | `public static class Builder` | 12 | 13 | ### Methods 14 | 15 | | Name | Summary | 16 | |-----------------|---------------------------| 17 | | [getOpen](#) | `public Double getOpen()` | 18 | | [getClose](#) | `public Double getClose()` | 19 | | [getHigh](#) | `public Double getHigh()` | 20 | | [getLow](#) | `public Double getLow()` | 21 | | [getVolume](#) | `public Double getVolume()` | 22 | | [toString](#) | `public String toString()` | 23 | 24 | [response]: ../index.md 25 | [cryptocurrency]: ../../index.md 26 | [alphavantage]: ../../../alphavantage/index.md 27 | [Builder]: ./builder.md -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/mama/MAMAIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.mama; 2 | 3 | public class MAMAIndicatorUnit { 4 | 5 | private String date; 6 | private double famaValue; 7 | private double mamaValue; 8 | 9 | public MAMAIndicatorUnit(String date, double fama, double mama) { 10 | this.date = date; 11 | this.famaValue = fama; 12 | this.mamaValue = mama; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getFamaValue() { 20 | return famaValue; 21 | } 22 | 23 | public double getMamaValue() { 24 | return mamaValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "MAMAIndicatorUnit {date=" + date + ", famaValue=" + famaValue + ", mamaValue=" + mamaValue + "}"; 30 | } 31 | 32 | 33 | 34 | 35 | } -------------------------------------------------------------------------------- /src/test/java/technicalindicator/data/macdext.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1: Symbol": "GOOGL", 4 | "2: Indicator": "MACD with Controllable MA Type (MACDEXT)", 5 | "3: Last Refreshed": "2020-04-29", 6 | "4: Interval": "monthly", 7 | "5.1: Fast Period": 12, 8 | "5.2: Slow Period": 26, 9 | "5.3: Signal Period": 9, 10 | "5.4: Fast MA Type": 0, 11 | "5.5: Slow MA Type": 0, 12 | "5.6: Signal MA Type": 0, 13 | "6: Series Type": "close", 14 | "7: Time Zone": "US/Eastern Time" 15 | }, 16 | "Technical Analysis: MACDEXT": { 17 | "2020-04-29": { 18 | "MACD": "64.3354", 19 | "MACD_Signal": "45.7071", 20 | "MACD_Hist": "18.6283" 21 | }, 22 | "2020-03-31": { 23 | "MACD": "61.5643", 24 | "MACD_Signal": "44.0352", 25 | "MACD_Hist": "17.5291" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/stochrsi/STOCHRSIIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.stochrsi; 2 | 3 | public class STOCHRSIIndicatorUnit { 4 | 5 | private String date; 6 | private double fastKValue; 7 | private double fastDValue; 8 | 9 | public STOCHRSIIndicatorUnit(String date, double fastK, double fastD) { 10 | this.date = date; 11 | this.fastKValue = fastK; 12 | this.fastDValue = fastD; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getFastKValue() { 20 | return fastKValue; 21 | } 22 | 23 | public double getFastDValue() { 24 | return fastDValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "STOCHRSIndicatorUnit {date=" + date + ", fastKValue=" + fastKValue + ", fastDValue=" + fastDValue + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/stoch/STOCHIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.stoch; 2 | 3 | public class STOCHIndicatorUnit { 4 | 5 | private String date; 6 | private double slowKValue; 7 | private double slowDValue; 8 | 9 | public STOCHIndicatorUnit(String date, double slowK, double slowD) { 10 | this.date = date; 11 | this.slowKValue = slowK; 12 | this.slowDValue = slowD; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getSlowKValue() { 20 | return slowKValue; 21 | } 22 | 23 | public double getSlowDValue() { 24 | return slowDValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "STOCHIndicatorUnit {date=" + date + ", slowKValue=" + slowKValue + ", slowDValue=" + slowDValue + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/stoch/STOCHIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.stoch; 2 | 3 | public class STOCHIndicatorUnit { 4 | 5 | private String date; 6 | private double slowKValue; 7 | private double slowDValue; 8 | 9 | public STOCHIndicatorUnit(String date, double slowK, double slowD) { 10 | this.date = date; 11 | this.slowKValue = slowK; 12 | this.slowDValue = slowD; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getSlowKValue() { 20 | return slowKValue; 21 | } 22 | 23 | public double getSlowDValue() { 24 | return slowDValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "STOCHIndicatorUnit {date=" + date + ", slowKValue=" + slowKValue + ", slowDValue=" + slowDValue + "}"; 30 | } 31 | 32 | 33 | 34 | 35 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/aroon/AROONIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.aroon; 2 | 3 | public class AROONIndicatorUnit { 4 | 5 | private String date; 6 | private double aroonUp; 7 | private double aroonDown; 8 | 9 | public AROONIndicatorUnit(String date, double aroonUp, double aroonDown) { 10 | this.date = date; 11 | this.aroonUp = aroonUp; 12 | this.aroonDown = aroonDown; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getAroonUpValue() { 20 | return aroonUp; 21 | } 22 | 23 | public double getAroonDownValue() { 24 | return aroonDown; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "AROONTechnicalIndicatorUnit {date=" + date + ", aroonUp=" + aroonUp + ", aroonDown=" + aroonDown + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/stochf/STOCHFIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.stochf; 2 | 3 | public class STOCHFIndicatorUnit { 4 | 5 | private String date; 6 | private double fastKValue; 7 | private double fastDValue; 8 | 9 | public STOCHFIndicatorUnit(String date, double fastK, double fastD) { 10 | this.date = date; 11 | this.fastKValue = fastK; 12 | this.fastDValue = fastD; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getFastKValue() { 20 | return fastKValue; 21 | } 22 | 23 | public double getFastDValue() { 24 | return fastDValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "STOCHFIndicatorUnit {date=" + date + ", fastKValue=" + fastKValue + ", fastDValue=" + fastDValue + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/request/intraday-request/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [request] / [IntradayRequest] / Builder 2 | 3 | # `IntradayRequest.Builder` 4 | 5 | `public static class Builder extends CryptoRequest.Builder` 6 | 7 | ### Constructors 8 | 9 | | Name | Summary | 10 | |------------|------------------| 11 | | [Builder](#) | `public Builder()` | 12 | 13 | ### Methods 14 | 15 | | Name | Summary | 16 | |--------------|----------------------------------------------| 17 | | [interval](#) | `public Builder interval(Interval interval)` | 18 | | [outputSize](#) | `public Builder outputSize(OutputSize outputSize)` | 19 | | [dataType](#) | `public Builder dataType(DataType dataType)` | 20 | | [build](#) | `public IntradayRequest build()` | 21 | 22 | [IntradayRequest]: index.md 23 | [request]: ../index.md 24 | [cryptocurrency]: ../../index.md 25 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/stochf/STOCHFIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.stochf; 2 | 3 | public class STOCHFIndicatorUnit { 4 | 5 | private String date; 6 | private double fastKValue; 7 | private double fastDValue; 8 | 9 | public STOCHFIndicatorUnit(String date, double fastK, double fastD) { 10 | this.date = date; 11 | this.fastKValue = fastK; 12 | this.fastDValue = fastD; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getFastKValue() { 20 | return fastKValue; 21 | } 22 | 23 | public double getFastDValue() { 24 | return fastDValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "STOCHFIndicatorUnit {date=" + date + ", fastKValue=" + fastKValue + ", fastDValue=" + fastDValue + "}"; 30 | } 31 | 32 | 33 | 34 | 35 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/search/request/SearchRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.search.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class SearchRequest { 6 | private final Function function; 7 | private final String keywords; 8 | 9 | private SearchRequest(Builder builder) { 10 | this.function = builder.function; 11 | this.keywords = builder.keywords; 12 | } 13 | 14 | public static class Builder { 15 | private final Function function; 16 | private String keywords; 17 | 18 | public Builder() { 19 | this.function = Function.SYMBOL_SEARCH; 20 | } 21 | 22 | public Builder keywords(String keywords) { 23 | this.keywords = keywords; 24 | return this; 25 | } 26 | 27 | public SearchRequest build() { 28 | return new SearchRequest(this); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /docs/api/sector/sector-request.md: -------------------------------------------------------------------------------- 1 | [alphavantage](../alphavantage/index.md) / [sector](./index.md) / [request](./request.md) / [SectorRequest](./sector-request.md) 2 | 3 | # SectorRequest 4 | 5 | `public final class SectorRequest extends Object` 6 | 7 | A Sector request 8 | 9 | ### Types 10 | 11 | | Name | Summary | 12 | |--------------|-------------------------------| 13 | | [Builder](#) | `public static class Builder` | 14 | 15 | ### Constructors 16 | 17 | | Name | Summary | 18 | |--------------------------------------|--------------------------------------------------------| 19 | | [SectorRequest](./sector-request.md) | `private SectorRequest(SectorRequest.Builder builder)` | 20 | 21 | 22 | ### Properties 23 | 24 | | Name | Summary | 25 | |---------------|-----------------------------| 26 | | [function](#) | `private Function function` | 27 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/stochrsi/STOCHRSIIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.stochrsi; 2 | 3 | public class STOCHRSIIndicatorUnit { 4 | 5 | private String date; 6 | private double fastKValue; 7 | private double fastDValue; 8 | 9 | public STOCHRSIIndicatorUnit(String date, double fastK, double fastD) { 10 | this.date = date; 11 | this.fastKValue = fastK; 12 | this.fastDValue = fastD; 13 | } 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public double getFastKValue() { 20 | return fastKValue; 21 | } 22 | 23 | public double getFastDValue() { 24 | return fastDValue; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "STOCHRSIndicatorUnit {date=" + date + ", fastKValue=" + fastKValue + ", fastDValue=" + fastDValue + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/SimpleIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response; 2 | 3 | public class SimpleIndicatorUnit { 4 | 5 | String date; 6 | Double value; 7 | String indicatorKey; 8 | 9 | public SimpleIndicatorUnit(String date, Double value) { 10 | this.date = date; 11 | this.value = value; 12 | } 13 | 14 | public SimpleIndicatorUnit(String date, Double value, String indicatorKey) { 15 | this(date, value); 16 | this.indicatorKey = indicatorKey; 17 | } 18 | 19 | 20 | public String getDate() { 21 | return date; 22 | } 23 | 24 | public Double getValue() { 25 | return value; 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | String key = indicatorKey == null ? "SimpleIndicator" : indicatorKey; 31 | return key + "Unit {date=" + date + ", value=" + value + "}"; 32 | } 33 | 34 | 35 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/htsine/HTSINEIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.htsine; 2 | 3 | public class HTSINEIndicatorUnit { 4 | private String date; 5 | private double leadSineValue; 6 | private double sineValue; 7 | 8 | public HTSINEIndicatorUnit(String date, double leadSine, double sine){ 9 | this.date = date; 10 | this.leadSineValue = leadSine; 11 | this.sineValue = sine; 12 | } 13 | 14 | public String getDate() { 15 | return date; 16 | } 17 | 18 | public double getLeadSineValue() { 19 | return leadSineValue; 20 | } 21 | 22 | public double getSineValue() { 23 | return sineValue; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "HTSINEIndicatorUnit {date=" + date + ", leadSineValue=" + leadSineValue + ", sineValue=" + sineValue 29 | + "}"; 30 | } 31 | 32 | 33 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/htsine/HTSINEIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.htsine; 2 | 3 | public class HTSINEIndicatorUnit { 4 | private String date; 5 | private double leadSineValue; 6 | private double sineValue; 7 | 8 | public HTSINEIndicatorUnit(String date, double leadSine, double sine) { 9 | this.date = date; 10 | this.leadSineValue = leadSine; 11 | this.sineValue = sine; 12 | } 13 | 14 | public String getDate() { 15 | return date; 16 | } 17 | 18 | public double getLeadSineValue() { 19 | return leadSineValue; 20 | } 21 | 22 | public double getSineValue() { 23 | return sineValue; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "HTSINEIndicatorUnit {date=" + date + ", leadSineValue=" + leadSineValue + ", sineValue=" + sineValue 29 | + "}"; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/test/java/timeseries/data/weeklyadjusted.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Weekly Adjusted Prices and Volumes", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:08:57", 6 | "4. Time Zone": "US/Eastern" 7 | }, 8 | "Weekly Adjusted Time Series": { 9 | "2020-05-08": { 10 | "1. open": "120.8200", 11 | "2. high": "124.3200", 12 | "3. low": "119.3910", 13 | "4. close": "121.7964", 14 | "5. adjusted close": "121.7964", 15 | "6. volume": "18736550", 16 | "7. dividend amount": "1.6300" 17 | }, 18 | "2020-05-01": { 19 | "1. open": "125.5600", 20 | "2. high": "129.3100", 21 | "3. low": "121.3900", 22 | "4. close": "121.8700", 23 | "5. adjusted close": "120.2531", 24 | "6. volume": "26502989", 25 | "7. dividend amount": "0.0000" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/test/java/timeseries/data/monthlyadjusted.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Monthly Adjusted Prices and Volumes", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:09:56", 6 | "4. Time Zone": "US/Eastern" 7 | }, 8 | "Monthly Adjusted Time Series": { 9 | "2020-05-08": { 10 | "1. open": "123.1900", 11 | "2. high": "124.3200", 12 | "3. low": "119.3910", 13 | "4. close": "121.8400", 14 | "5. adjusted close": "121.8400", 15 | "6. volume": "23665041", 16 | "7. dividend amount": "1.6300" 17 | }, 18 | "2020-04-30": { 19 | "1. open": "106.3600", 20 | "2. high": "129.3100", 21 | "3. low": "104.5210", 22 | "4. close": "125.5600", 23 | "5. adjusted close": "123.8942", 24 | "6. volume": "130400316", 25 | "7. dividend amount": "0.0000" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/htphasor/HTPHASORIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.htphasor; 2 | 3 | public class HTPHASORIndicatorUnit { 4 | private String date; 5 | private double phaseValue; 6 | private double quadratureValue; 7 | 8 | public HTPHASORIndicatorUnit(String date, double leadSine, double sine){ 9 | this.date = date; 10 | this.phaseValue = leadSine; 11 | this.quadratureValue = sine; 12 | } 13 | 14 | public String getDate() { 15 | return date; 16 | } 17 | 18 | public double getPhaseValue() { 19 | return phaseValue; 20 | } 21 | 22 | public double getQuadratureValue() { 23 | return quadratureValue; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "HTPHASORIndicatorUnit {date=" + date + ", phaseValue=" + phaseValue + ", quadratureValue=" + quadratureValue 29 | + "}"; 30 | } 31 | 32 | 33 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/SimpleTechnicalIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response; 2 | 3 | public class SimpleTechnicalIndicatorUnit { 4 | 5 | String date; 6 | Double value; 7 | String indicatorKey; 8 | 9 | public SimpleTechnicalIndicatorUnit(String date, Double value) { 10 | this.date = date; 11 | this.value = value; 12 | } 13 | 14 | public SimpleTechnicalIndicatorUnit(String date, Double value, String indicatorKey) { 15 | this(date, value); 16 | this.indicatorKey = indicatorKey; 17 | } 18 | 19 | public String getDate() { 20 | return date; 21 | } 22 | 23 | public Double getValue() { 24 | return value; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | String key = indicatorKey == null ? "SimpleTechnicalIndicator" : indicatorKey; 30 | return key + "Unit {date=" + date + ", value=" + value + "}"; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /docs/api/search/response/match.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / [response] / Match 2 | 3 | # `Match` 4 | 5 | `public final class Match extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |----------------------|---------------------------------------| 11 | | [getSymbol](#) | `public String getSymbol()` | 12 | | [getName](#) | `public String getName()` | 13 | | [getType](#) | `public String getType()` | 14 | | [getRegion](#) | `public String getRegion()` | 15 | | [getMarketOpen](#) | `public String getMarketOpen()` | 16 | | [getMarketClose](#) | `public String getMarketClose()` | 17 | | [getTimezone](#) | `public String getTimezone()` | 18 | | [getCurrency](#) | `public String getCurrency()` | 19 | | [getMatchScore](#) | `public String getMatchScore()` | 20 | 21 | [response]: ../response/index.md 22 | [search]: ./index.md 23 | [alphavantage]: ../../alphavantage/index.md -------------------------------------------------------------------------------- /docs/exchangerate.md: -------------------------------------------------------------------------------- 1 | ## Request 2 | 3 | === "Java" 4 | :::java 5 | AlphaVantage.api() 6 | .exchangeRate() 7 | .fromCurrency("USD") 8 | .toCurrency("GHS") 9 | .onSuccess((e) -> onData(e)) 10 | .fetch(); 11 | 12 | **Response Type:** 13 | `ExchangeRateResponse` 14 | 15 | ### Response 16 | 17 | === "Java" 18 | :::java 19 | public void onData(ExchangeRateResponse response){ 20 | System.out.println(response.getExchangeRate()); 21 | System.out.println(response.getBidPrice()); 22 | System.out.println(response.getAskPrice()); 23 | System.out.println(response.getFromCurrencyCode()); 24 | System.out.println(response.getFromCurrencyName()); 25 | System.out.println(response.getToCurrencyCode()); 26 | System.out.println(response.getToCurrencyName()); 27 | System.out.println(response.getLastRefreshed()); 28 | System.out.println(response.getTimeZone()); 29 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/crypto.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / Crypto 2 | 3 | # `Crypto` 4 | `public final class Crypto implements Fetcher` 5 | 6 | Access to Crypto Currency Data 7 | 8 | ### Constructors 9 | 10 | | Name | Summary | 11 | |-----------|---------------------------------| 12 | | [Crypto](#) | `public Crypto(Config config)` | 13 | 14 | ### Methods 15 | 16 | | Name | Summary | 17 | |--------------|------------------------------------------------| 18 | | [daily](#) | `public Crypto.DailyRequestProxy daily()` | 19 | | [weekly](#) | `public Crypto.WeeklyRequestProxy weekly()` | 20 | | [monthly](#) | `public Crypto.MonthlyRequestProxy monthly()` | 21 | | [rating](#) | `public Crypto.RatingRequestProxy rating()` | 22 | | [intraday](#)| `public Crypto.IntradayRequestProxy intraday()` | 23 | | [fetch](#) | `public void fetch()` | 24 | 25 | [cryptocurrency]: ./index.md 26 | [alphavantage]: ../alphavantage/index.md 27 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/htphasor/HTPHASORIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.htphasor; 2 | 3 | public class HTPHASORIndicatorUnit { 4 | private String date; 5 | private double phaseValue; 6 | private double quadratureValue; 7 | 8 | public HTPHASORIndicatorUnit(String date, double leadSine, double sine) { 9 | this.date = date; 10 | this.phaseValue = leadSine; 11 | this.quadratureValue = sine; 12 | } 13 | 14 | public String getDate() { 15 | return date; 16 | } 17 | 18 | public double getPhaseValue() { 19 | return phaseValue; 20 | } 21 | 22 | public double getQuadratureValue() { 23 | return quadratureValue; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "HTPHASORIndicatorUnit {date=" + date + ", phaseValue=" + phaseValue + ", quadratureValue=" 29 | + quadratureValue 30 | + "}"; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/forex/request/DailyRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.forex.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | import com.crazzyghost.alphavantage.parameters.OutputSize; 5 | 6 | public class DailyRequest extends ForexRequest { 7 | 8 | private Function function; 9 | private OutputSize outputSize; 10 | 11 | private DailyRequest(Builder builder){ 12 | super(builder); 13 | this.function = Function.FX_DAILY; 14 | this.outputSize = builder.outputSize; 15 | } 16 | 17 | public static class Builder extends ForexRequest.Builder{ 18 | 19 | Function function; 20 | OutputSize outputSize = OutputSize.COMPACT; 21 | 22 | public Builder outputSize(OutputSize outputSize){ 23 | this.outputSize = outputSize; 24 | return this; 25 | } 26 | 27 | @Override 28 | public ForexRequest build() { 29 | return new DailyRequest(this); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/fundamentaldata/data/earnings.json: -------------------------------------------------------------------------------- 1 | { 2 | "symbol": "IBM", 3 | "annualEarnings": [ 4 | { 5 | "fiscalDateEnding": "2020-12-31", 6 | "reportedEPS": "8.67" 7 | }, 8 | { 9 | "fiscalDateEnding": "2019-12-31", 10 | "reportedEPS": "None" 11 | } 12 | ], 13 | "quarterlyEarnings": [ 14 | { 15 | "fiscalDateEnding": "2020-09-30", 16 | "reportedDate": "2020-10-19", 17 | "reportedEPS": "2.58", 18 | "estimatedEPS": "2.579", 19 | "surprise": "0.001", 20 | "surprisePercentage": "0.0388" 21 | }, 22 | { 23 | "fiscalDateEnding": "2020-06-30", 24 | "reportedDate": "2020-07-20", 25 | "reportedEPS": "2.18", 26 | "estimatedEPS": "2.0851", 27 | "surprise": "0.0949", 28 | "surprisePercentage": "4.5513" 29 | }, 30 | { 31 | "fiscalDateEnding": "2020-03-31", 32 | "reportedDate": "2020-04-20", 33 | "reportedEPS": "1.84", 34 | "estimatedEPS": "1.801", 35 | "surprise": "0.039", 36 | "surprisePercentage": "2.1655" 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /src/test/java/parser/ParserUtilTest.java: -------------------------------------------------------------------------------- 1 | package parser; 2 | 3 | import com.crazzyghost.alphavantage.parser.Parser; 4 | import org.junit.Test; 5 | 6 | import static org.junit.Assert.assertEquals; 7 | import static org.junit.Assert.assertNull; 8 | 9 | public class ParserUtilTest { 10 | 11 | @Test 12 | public void testGetLongFromString() { 13 | long actualNum = Parser.getNumberFromString("1", Long::parseLong); 14 | assertEquals(1L, actualNum); 15 | } 16 | 17 | @Test 18 | public void testGetLongFromNotNumberString() { 19 | Long actualNum = Parser.getNumberFromString("-", Long::parseLong); 20 | assertNull(actualNum); 21 | } 22 | 23 | @Test 24 | public void testGetDoubleFromString() { 25 | double actualNum = Parser.getNumberFromString("-1.2312342342", Double::parseDouble); 26 | assertEquals(-1.2312342342, actualNum, 0.0); 27 | } 28 | 29 | @Test 30 | public void testGetDoubleFromNotNumberString() { 31 | Double actualNum = Parser.getNumberFromString("-", Double::parseDouble); 32 | assertNull(actualNum); 33 | } 34 | } -------------------------------------------------------------------------------- /src/test/java/crypto/data/daily.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Daily Prices and Volumes for Digital Currency", 4 | "2. Digital Currency Code": "BTC", 5 | "3. Digital Currency Name": "Bitcoin", 6 | "4. Market Code": "EUR", 7 | "5. Market Name": "Euro", 8 | "6. Last Refreshed": "2025-08-24 00:00:00", 9 | "7. Time Zone": "UTC" 10 | }, 11 | "Time Series (Digital Currency Daily)": { 12 | "2025-08-24": { 13 | "1. open": "97883.18000000", 14 | "2. high": "98040.37000000", 15 | "3. low": "97854.95000000", 16 | "4. close": "97886.73000000", 17 | "5. volume": "9.35943544" 18 | }, 19 | "2025-08-23": { 20 | "1. open": "99318.46000000", 21 | "2. high": "99404.71000000", 22 | "3. low": "97251.01000000", 23 | "4. close": "97909.36000000", 24 | "5. volume": "118.22280715" 25 | }, 26 | "2025-08-22": { 27 | "1. open": "96856.83000000", 28 | "2. high": "100149.00000000", 29 | "3. low": "96171.51000000", 30 | "4. close": "99313.95000000", 31 | "5. volume": "260.30828027" 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /docs/api/alphavantage/fetcher.md: -------------------------------------------------------------------------------- 1 | [alphavantage](index.md) / [Fetcher](#) 2 | 3 | # Fetcher 4 | 5 | `public interface Fetcher` 6 | 7 | Defines an interface for pulling data from the API source. 8 | A fetch operation can either fail or succeed. 9 | 10 | 11 | ### Types 12 | 13 | | Name | Summary | 14 | |-------------------------|---------------------------------------------------------------------------------------------------------------------------------| 15 | | [SuccessCallback](#) | Callback when the fetch operation succeeds. `` the type of the reponse of the fetch operation.`interface SuccessCallback` | 16 | | [FailureCallback](#) | Callback when the fetch operation fails. `interface FailureCallback` | 17 | 18 | 19 | ### Methods 20 | 21 | | Name | Summary | 22 | |------------|-------------------------------------------| 23 | | [fetch](#) | Perform a fetch operation. `void fetch()` | 24 | -------------------------------------------------------------------------------- /src/test/java/crypto/data/intraday.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Crypto Intraday (5min) Time Series", 4 | "2. Digital Currency Code": "ETH", 5 | "3. Digital Currency Name": "Ethereum", 6 | "4. Market Code": "USD", 7 | "5. Market Name": "United States Dollar", 8 | "6. Last Refreshed": "2025-08-24 15:40:00", 9 | "7. Interval": "5min", 10 | "8. Output Size": "Compact", 11 | "9. Time Zone": "UTC" 12 | }, 13 | "Time Series Crypto (5min)": { 14 | "2025-08-24 15:40:00": { 15 | "1. open": "4812.58000", 16 | "2. high": "4814.35000", 17 | "3. low": "4803.41000", 18 | "4. close": "4812.08000", 19 | "5. volume": 636 20 | }, 21 | "2025-08-24 15:35:00": { 22 | "1. open": "4818.88000", 23 | "2. high": "4823.79000", 24 | "3. low": "4811.99000", 25 | "4. close": "4812.58000", 26 | "5. volume": 510 27 | }, 28 | "2025-08-24 15:30:00": { 29 | "1. open": "4815.31000", 30 | "2. high": "4825.75000", 31 | "3. low": "4815.31000", 32 | "4. close": "4819.13000", 33 | "5. volume": 341 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/test/java/crypto/data/monthly.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Monthly Prices and Volumes for Digital Currency", 4 | "2. Digital Currency Code": "BTC", 5 | "3. Digital Currency Name": "Bitcoin", 6 | "4. Market Code": "EUR", 7 | "5. Market Name": "Euro", 8 | "6. Last Refreshed": "2025-08-24 00:00:00", 9 | "7. Time Zone": "UTC" 10 | }, 11 | "Time Series (Digital Currency Monthly)": { 12 | "2025-08-24": { 13 | "1. open": "101377.69000000", 14 | "2. high": "105751.45000000", 15 | "3. low": "96171.51000000", 16 | "4. close": "97886.73000000", 17 | "5. volume": "4419.35305768" 18 | }, 19 | "2025-07-31": { 20 | "1. open": "90931.78000000", 21 | "2. high": "104700.00000000", 22 | "3. low": "89070.00000000", 23 | "4. close": "101383.62000000", 24 | "5. volume": "7331.39714271" 25 | }, 26 | "2025-06-30": { 27 | "1. open": "92308.49000000", 28 | "2. high": "96827.63000000", 29 | "3. low": "85424.24000000", 30 | "4. close": "90926.69000000", 31 | "5. volume": "5866.02037475" 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/test/java/crypto/data/weekly.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Weekly Prices and Volumes for Digital Currency", 4 | "2. Digital Currency Code": "BTC", 5 | "3. Digital Currency Name": "Bitcoin", 6 | "4. Market Code": "EUR", 7 | "5. Market Name": "Euro", 8 | "6. Last Refreshed": "2025-08-24 00:00:00", 9 | "7. Time Zone": "UTC" 10 | }, 11 | "Time Series (Digital Currency Weekly)": { 12 | "2025-08-24": { 13 | "1. open": "100344.89000000", 14 | "2. high": "100513.66000000", 15 | "3. low": "96171.51000000", 16 | "4. close": "97886.73000000", 17 | "5. volume": "1325.79895397" 18 | }, 19 | "2025-08-17": { 20 | "1. open": "102323.75000000", 21 | "2. high": "105751.45000000", 22 | "3. low": "99800.00000000", 23 | "4. close": "100360.74000000", 24 | "5. volume": "1445.83504162" 25 | }, 26 | "2025-08-10": { 27 | "1. open": "98708.57000000", 28 | "2. high": "102323.75000000", 29 | "3. low": "97365.53000000", 30 | "4. close": "102323.74000000", 31 | "5. volume": "1015.84930679" 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/test/java/timeseries/data/dailyadjusted.json: -------------------------------------------------------------------------------- 1 | { 2 | "Meta Data": { 3 | "1. Information": "Daily Time Series with Splits and Dividend Events", 4 | "2. Symbol": "IBM", 5 | "3. Last Refreshed": "2020-05-08 14:07:57", 6 | "4. Output Size": "Full size", 7 | "5. Time Zone": "US/Eastern" 8 | }, 9 | "Time Series (Daily)": { 10 | "2020-05-08": { 11 | "1. open": "122.6700", 12 | "2. high": "122.8000", 13 | "3. low": "121.0600", 14 | "4. close": "121.8050", 15 | "5. adjusted close": "121.8050", 16 | "6. volume": "2542577", 17 | "7. dividend amount": "0.0000", 18 | "8. split coefficient": "1.0000" 19 | }, 20 | "2020-05-07": { 21 | "1. open": "122.9800", 22 | "2. high": "123.2600", 23 | "3. low": "120.8500", 24 | "4. close": "121.2300", 25 | "5. adjusted close": "121.2300", 26 | "6. volume": "4412047", 27 | "7. dividend amount": "1.6300", 28 | "8. split coefficient": "1.0000" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Sylvester Sefa-Yeboah 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/css/extra.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: cash-market; 3 | src: url("https://cash-f.squarecdn.com/static/fonts/cash-market/v2/CashMarket-Regular.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal 6 | } 7 | 8 | @font-face { 9 | font-family: cash-market; 10 | src: url("https://cash-f.squarecdn.com/static/fonts/cash-market/v2/CashMarket-Medium.woff2") format("woff2"); 11 | font-weight: 500; 12 | font-style: normal 13 | } 14 | 15 | @font-face { 16 | font-family: cash-market; 17 | src: url("https://cash-f.squarecdn.com/static/fonts/cash-market/v2/CashMarket-Bold.woff2") format("woff2"); 18 | font-weight: 700; 19 | font-style: normal 20 | } 21 | 22 | body, input { 23 | font-family: cash-market,"Helvetica Neue",helvetica,sans-serif; 24 | } 25 | 26 | .md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 { 27 | font-family: cash-market,"Helvetica Neue",helvetica,sans-serif; 28 | line-height: normal; 29 | font-weight: bold; 30 | color: #353535; 31 | } 32 | 33 | .md-typeset__table { 34 | min-width: 100%; 35 | } 36 | 37 | .md-typeset table:not([class]) { 38 | display: table; 39 | } 40 | -------------------------------------------------------------------------------- /docs/api/economicindicator/request.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage] / [fundamentaldata] / [request] 4 | 5 | ## Package alphavantage.fundamentaldata.request 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |--------------------------|------------------------------------------------| 11 | | [BalanceSheetRequest] | `public class BalanceSheetRequest` | 12 | | [CashFlowRequest] | `public class CashFlowRequest` | 13 | | [CompanyOverviewRequest] | `public class CompanyOverviewRequest` | 14 | | [EarningsRequest] | `public class EarningsResponseRequest` | 15 | | [FundamentalDataRequest] | `public abstract class FundamentalDataRequest` | 16 | | [IncomeStatementRequest] | `public class IncomeStatementRequest` | 17 | 18 | [alphavantage]: ../alphavantage/index.md 19 | [fundamentaldata]: ./index.md 20 | [request]: ./request.md 21 | [BalanceSheetRequest]: ./request.md 22 | [CashFlowRequest]: ./request.md 23 | [CompanyOverviewRequest]: ./request.md 24 | [EarningsRequest]: ./request.md 25 | [FundamentalDataRequest]: ./request.md 26 | [IncomeStatementRequest]: ./request.md -------------------------------------------------------------------------------- /docs/api/fundamentaldata/request.md: -------------------------------------------------------------------------------- 1 | # alphavantage-java 2 | 3 | [alphavantage] / [fundamentaldata] / [request] 4 | 5 | ## Package alphavantage.fundamentaldata.request 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |--------------------------|------------------------------------------------| 11 | | [BalanceSheetRequest] | `public class BalanceSheetRequest` | 12 | | [CashFlowRequest] | `public class CashFlowRequest` | 13 | | [CompanyOverviewRequest] | `public class CompanyOverviewRequest` | 14 | | [EarningsRequest] | `public class EarningsResponseRequest` | 15 | | [FundamentalDataRequest] | `public abstract class FundamentalDataRequest` | 16 | | [IncomeStatementRequest] | `public class IncomeStatementRequest` | 17 | 18 | [alphavantage]: ../alphavantage/index.md 19 | [fundamentaldata]: ./index.md 20 | [request]: ./request.md 21 | [BalanceSheetRequest]: ./request.md 22 | [CashFlowRequest]: ./request.md 23 | [CompanyOverviewRequest]: ./request.md 24 | [EarningsRequest]: ./request.md 25 | [FundamentalDataRequest]: ./request.md 26 | [IncomeStatementRequest]: ./request.md -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/request/PeriodicSeriesRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.SeriesType; 4 | 5 | 6 | public class PeriodicSeriesRequest extends IndicatorRequest { 7 | 8 | private SeriesType series_type; 9 | private int time_period; 10 | 11 | private PeriodicSeriesRequest(Builder builder){ 12 | super(builder); 13 | this.time_period = builder.timePeriod; 14 | this.series_type = builder.seriesType; 15 | } 16 | 17 | public static class Builder extends IndicatorRequest.Builder { 18 | 19 | private SeriesType seriesType; 20 | private int timePeriod; 21 | 22 | public Builder timePeriod(int timePeriod){ 23 | this.timePeriod = timePeriod; 24 | return this; 25 | } 26 | 27 | public Builder seriesType(SeriesType seriesType){ 28 | this.seriesType = seriesType; 29 | return this; 30 | } 31 | 32 | @Override 33 | public IndicatorRequest build() { 34 | 35 | return new PeriodicSeriesRequest(this); 36 | } 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /docs/sector.md: -------------------------------------------------------------------------------- 1 | ## Request 2 | 3 | === "Java" 4 | :::java 5 | AlphaVantage.api() 6 | .sector() 7 | .onSuccess((e) -> onData(e)) 8 | .fetch(); 9 | 10 | **Response Type:** 11 | `SectorResponse` 12 | 13 | ## Response 14 | 15 | === "Java" 16 | :::java 17 | public void onData(SectorResponse reponse){ 18 | SectorUnit realtime = response.getRealTimePerformance(); 19 | String energy = realtime.getEnergy(); 20 | String financials = realtime.getFinancials(); 21 | String industrials = realtime.getIndustrials(); 22 | String realEstate = realtime.getRealEstate(); 23 | String informationTechnology = realtime.getInformationTechnology(); 24 | String materials = realtime.getMaterials(); 25 | String consumerDiscretionary = realtime.getConsumerDiscretionary(); 26 | String communicationServices = realtime.getCommunicationServices(); 27 | String healthCare = realtime.getHealthCare(); 28 | String consumerStaples = realtime.getConsumerStaples(); 29 | String utilities = realtime.getUtilities(); 30 | ... 31 | } 32 | -------------------------------------------------------------------------------- /docs/api/search/search.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [search] / Search 2 | 3 | # `Search` 4 | `public final class Search implements Fetcher` 5 | 6 | Client api for the ticker or symbol search utility. 7 | 8 | 9 | ### Constructors 10 | 11 | | Name | Summary | 12 | |-------------|--------------------------------------| 13 | | [Search](#) | `public class Search(Config config)` | 14 | 15 | ### Methods 16 | 17 | | Name | Summary | 18 | |----------------|---------------------------------------------------------------------| 19 | | [keywords](#) | `public Search keywords(String keywords)` | 20 | | [onSuccess](#) | `public Search onSuccess(SuccessCallback callback)` | 21 | | [onFailure](#) | `public Search onFailure(FailureCallback callback)` | 22 | | [fetch](#) | `public void fetch()` | 23 | | [fetchSync](#) | `public SearchResponse fetchSync()` | 24 | 25 | 26 | [alphavantage]: ../alphavantage/index.md 27 | [search]: ./index.md 28 | [request]: request/index.md 29 | [response]: request/index.md 30 | -------------------------------------------------------------------------------- /docs/api/cryptocurrency/response/meta-data/builder.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [response] / [MetaData] / Builder 2 | 3 | # `MetaData.Builder` 4 | 5 | `public static class Builder extends Object` 6 | 7 | ### Methods 8 | 9 | | Name | Summary | 10 | |-----------------|--------------------------------| 11 | | [information](#) | `public Builder information(String information)` | 12 | | [digitalCurrencyCode](#) | `public Builder digitalCurrencyCode(String digitalCurrencyCode)` | 13 | | [digitalCurrencyName](#) | `public Builder digitalCurrencyName(String digitalCurrencyName)` | 14 | | [marketCode](#) | `public Builder marketCode(String marketCode)` | 15 | | [marketName](#) | `public Builder marketName(String marketName)` | 16 | | [lastRefreshed](#) | `public Builder lastRefreshed(String lastRefreshed)` | 17 | | [timeZone](#) | `public Builder timeZone(String timeZone)` | 18 | | [interval](#) | `public Builder interval(String interval)` | 19 | | [outputSize](#) | `public Builder outputSize(String outputSize)` | 20 | | [build](#) | `public MetaData build()` | 21 | 22 | [MetaData]: index.md 23 | [response]: ../index.md 24 | [cryptocurrency]: ../../index.md 25 | [alphavantage]: ../../../alphavantage/index.md -------------------------------------------------------------------------------- /docs/api/marketstatus/marketstatus.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [marketstatus] / MarketStatus 2 | 3 | # `MarketStatus` 4 | `public final class MarketStatus implements Fetcher` 5 | 6 | Client api for the global market status utility. 7 | 8 | ### Constructors 9 | 10 | | Name | Summary | 11 | |-------------------|--------------------------------------| 12 | | [MarketStatus](#) | `public MarketStatus(Config config)` | 13 | 14 | ### Methods 15 | 16 | | Name | Summary | 17 | |----------------|---------------------------------------------------------------------------------| 18 | | [onSuccess](#) | `public MarketStatus onSuccess(SuccessCallback callback)` | 19 | | [onFailure](#) | `public MarketStatus onFailure(FailureCallback callback)` | 20 | | [fetch](#) | `public void fetch()` | 21 | | [fetchSync](#) | `public MarketStatusResponse fetchSync()` | 22 | 23 | [alphavantage]: ../alphavantage/index.md 24 | [marketstatus]: ./index.md 25 | [request]: request/index.md 26 | [response]: response/index.md 27 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/request/ADOSCRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class ADOSCRequest extends IndicatorRequest { 6 | private int fastPeriod; 7 | private int slowPeriod; 8 | 9 | private ADOSCRequest(Builder builder) { 10 | super(builder); 11 | this.fastPeriod = builder.fastPeriod; 12 | this.slowPeriod = builder.slowPeriod; 13 | } 14 | 15 | public static class Builder extends IndicatorRequest.Builder { 16 | 17 | private int fastPeriod = 3; 18 | private int slowPeriod = 10; 19 | 20 | public Builder(){ 21 | this.function(Function.ADOSC); 22 | } 23 | 24 | public Builder fastPeriod(int fastPeriod){ 25 | this.fastPeriod = fastPeriod; 26 | return this; 27 | } 28 | 29 | public Builder slowPeriod(int slowPeriod){ 30 | this.slowPeriod = slowPeriod; 31 | return this; 32 | } 33 | 34 | @Override 35 | public IndicatorRequest build() { 36 | return new ADOSCRequest(this); 37 | } 38 | 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/request/SARRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class SARRequest extends IndicatorRequest { 6 | 7 | private double acceleration; 8 | private double maximum; 9 | 10 | private SARRequest(Builder builder) { 11 | super(builder); 12 | this.acceleration = builder.acceleration; 13 | this.maximum = builder.maximum; 14 | } 15 | 16 | public static class Builder extends IndicatorRequest.Builder{ 17 | 18 | private double acceleration = 0.01; 19 | private double maximum = 0.20; 20 | 21 | public Builder(){ 22 | this.function(Function.SAR); 23 | } 24 | 25 | public Builder acceleration(double acceleration){ 26 | this.acceleration = acceleration; 27 | return this; 28 | } 29 | 30 | public Builder maximum(double maximum){ 31 | this.maximum = maximum; 32 | return this; 33 | } 34 | 35 | @Override 36 | public IndicatorRequest build() { 37 | return new SARRequest(this); 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/macd/MACDIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.macd; 2 | 3 | public class MACDIndicatorUnit { 4 | private String date; 5 | private double macdHistValue; 6 | private double macdSignalValue; 7 | private double macdValue; 8 | 9 | public MACDIndicatorUnit(String date, double macdHistValue, double macdSignalValue, double macdValue) { 10 | this.date = date; 11 | this.macdHistValue = macdHistValue; 12 | this.macdSignalValue = macdSignalValue; 13 | this.macdValue = macdValue; 14 | } 15 | 16 | public String getDate() { 17 | return date; 18 | } 19 | 20 | public double getMacdHistValue() { 21 | return macdHistValue; 22 | } 23 | 24 | public double getMacdSignalValue() { 25 | return macdSignalValue; 26 | } 27 | 28 | public double getMacdValue() { 29 | return macdValue; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "MACDIndicatorUnit {date=" + date + ", macdHistValue=" + macdHistValue + ", macdSignalValue=" 35 | + macdSignalValue + ", macdValue=" + macdValue + "}"; 36 | } 37 | 38 | 39 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/request/PeriodicSeriesRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.SeriesType; 4 | 5 | public class PeriodicSeriesRequest extends TechnicalIndicatorRequest { 6 | 7 | private SeriesType series_type; 8 | private int time_period; 9 | 10 | private PeriodicSeriesRequest(Builder builder) { 11 | super(builder); 12 | this.time_period = builder.timePeriod; 13 | this.series_type = builder.seriesType; 14 | } 15 | 16 | public static class Builder extends TechnicalIndicatorRequest.Builder { 17 | 18 | private SeriesType seriesType; 19 | private int timePeriod; 20 | 21 | public Builder timePeriod(int timePeriod) { 22 | this.timePeriod = timePeriod; 23 | return this; 24 | } 25 | 26 | public Builder seriesType(SeriesType seriesType) { 27 | this.seriesType = seriesType; 28 | return this; 29 | } 30 | 31 | @Override 32 | public TechnicalIndicatorRequest build() { 33 | 34 | return new PeriodicSeriesRequest(this); 35 | } 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/macd/MACDIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.macd; 2 | 3 | public class MACDIndicatorUnit { 4 | private String date; 5 | private double macdHistValue; 6 | private double macdSignalValue; 7 | private double macdValue; 8 | 9 | public MACDIndicatorUnit(String date, double macdHistValue, double macdSignalValue, double macdValue) { 10 | this.date = date; 11 | this.macdHistValue = macdHistValue; 12 | this.macdSignalValue = macdSignalValue; 13 | this.macdValue = macdValue; 14 | } 15 | 16 | public String getDate() { 17 | return date; 18 | } 19 | 20 | public double getMacdHistValue() { 21 | return macdHistValue; 22 | } 23 | 24 | public double getMacdSignalValue() { 25 | return macdSignalValue; 26 | } 27 | 28 | public double getMacdValue() { 29 | return macdValue; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "MACDIndicatorUnit {date=" + date + ", macdHistValue=" + macdHistValue + ", macdSignalValue=" 35 | + macdSignalValue + ", macdValue=" + macdValue + "}"; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /docs/api/cryptocurrency/response/meta-data/index.md: -------------------------------------------------------------------------------- 1 | [alphavantage] / [cryptocurrency] / [response] / MetaData 2 | 3 | # `MetaData` 4 | 5 | `public class MetaData extends Object` 6 | 7 | ### Types 8 | 9 | | Name | Summary | 10 | |-----------|-------------------------------| 11 | | [Builder] | `public static class Builder` | 12 | 13 | ### Methods 14 | 15 | | Name | Summary | 16 | |--------------------|----------------------------| 17 | | [getInformation](#) | `public String getInformation()` | 18 | | [getDigitalCurrencyCode](#) | `public String getDigitalCurrencyCode()` | 19 | | [getDigitalCurrencyName](#) | `public String getDigitalCurrencyName()` | 20 | | [getMarketCode](#) | `public String getMarketCode()` | 21 | | [getMarketName](#) | `public String getMarketName()` | 22 | | [getLastRefreshed](#) | `public String getLastRefreshed()` | 23 | | [getTimeZone](#) | `public String getTimeZone()` | 24 | | [getInterval](#) | `public String getInterval()` | 25 | | [getOutputSize](#) | `public String getOutputSize()` | 26 | | [toString](#) | `public String toString()` | 27 | 28 | [response]: ../index.md 29 | [cryptocurrency]: ../../index.md 30 | [alphavantage]: ../../../alphavantage/index.md 31 | [Builder]: ./builder.md -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/request/ADOSCRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class ADOSCRequest extends TechnicalIndicatorRequest { 6 | private int fastPeriod; 7 | private int slowPeriod; 8 | 9 | private ADOSCRequest(Builder builder) { 10 | super(builder); 11 | this.fastPeriod = builder.fastPeriod; 12 | this.slowPeriod = builder.slowPeriod; 13 | } 14 | 15 | public static class Builder extends TechnicalIndicatorRequest.Builder { 16 | 17 | private int fastPeriod = 3; 18 | private int slowPeriod = 10; 19 | 20 | public Builder() { 21 | this.function(Function.ADOSC); 22 | } 23 | 24 | public Builder fastPeriod(int fastPeriod) { 25 | this.fastPeriod = fastPeriod; 26 | return this; 27 | } 28 | 29 | public Builder slowPeriod(int slowPeriod) { 30 | this.slowPeriod = slowPeriod; 31 | return this; 32 | } 33 | 34 | @Override 35 | public TechnicalIndicatorRequest build() { 36 | return new ADOSCRequest(this); 37 | } 38 | 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/timeseries/request/DailyRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.timeseries.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | import com.crazzyghost.alphavantage.parameters.OutputSize; 5 | 6 | public class DailyRequest extends TimeSeriesRequest{ 7 | 8 | private OutputSize outputSize; 9 | 10 | private DailyRequest(Builder builder){ 11 | super(builder); 12 | this.outputSize = builder.outputSize; 13 | } 14 | 15 | 16 | public static class Builder extends TimeSeriesRequest.Builder{ 17 | 18 | Function function; 19 | OutputSize outputSize = OutputSize.COMPACT; 20 | 21 | public Builder(){ 22 | super(); 23 | this.function(Function.TIME_SERIES_DAILY); 24 | } 25 | 26 | public Builder adjusted(){ 27 | this.function(Function.TIME_SERIES_DAILY_ADJUSTED); 28 | return this; 29 | } 30 | 31 | public Builder outputSize(OutputSize outputSize){ 32 | this.outputSize = outputSize; 33 | return this; 34 | } 35 | 36 | @Override 37 | public DailyRequest build() { 38 | return new DailyRequest(this); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/request/SARRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | 5 | public class SARRequest extends TechnicalIndicatorRequest { 6 | 7 | private double acceleration; 8 | private double maximum; 9 | 10 | private SARRequest(Builder builder) { 11 | super(builder); 12 | this.acceleration = builder.acceleration; 13 | this.maximum = builder.maximum; 14 | } 15 | 16 | public static class Builder extends TechnicalIndicatorRequest.Builder { 17 | 18 | private double acceleration = 0.01; 19 | private double maximum = 0.20; 20 | 21 | public Builder() { 22 | this.function(Function.SAR); 23 | } 24 | 25 | public Builder acceleration(double acceleration) { 26 | this.acceleration = acceleration; 27 | return this; 28 | } 29 | 30 | public Builder maximum(double maximum) { 31 | this.maximum = maximum; 32 | return this; 33 | } 34 | 35 | @Override 36 | public TechnicalIndicatorRequest build() { 37 | return new SARRequest(this); 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /src/test/java/timeseries/StockUnitTest.java: -------------------------------------------------------------------------------- 1 | package timeseries; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertNotNull; 5 | 6 | import com.crazzyghost.alphavantage.timeseries.response.StockUnit; 7 | 8 | import org.junit.Test; 9 | 10 | public class StockUnitTest { 11 | 12 | @Test 13 | public void testStockUnit(){ 14 | 15 | StockUnit unit = new StockUnit.Builder() 16 | .open(1.0) 17 | .close(2.0) 18 | .high(3.0) 19 | .low(4.0) 20 | .volume(5l) 21 | .adjustedClose(6.0) 22 | .dividendAmount(7.0) 23 | .splitCoefficient(8.0) 24 | .time("20-05-2099") 25 | .build(); 26 | 27 | assertEquals(unit.getOpen(), 1.0, 0.0); 28 | assertEquals(unit.getClose(), 2.0, 0.0); 29 | assertEquals(unit.getHigh(), 3.0, 0.0); 30 | assertEquals(unit.getLow(), 4.0, 0.0); 31 | assertEquals(unit.getVolume(), 5l); 32 | assertEquals(unit.getAdjustedClose(), 6.0, 0.0); 33 | assertEquals(unit.getDividendAmount(), 7.0, 0.0); 34 | assertEquals(unit.getSplitCoefficient(), 8.0, 0.0); 35 | assertEquals(unit.getDate(), "20-05-2099"); 36 | assertNotNull(unit.toString()); 37 | } 38 | 39 | 40 | } -------------------------------------------------------------------------------- /src/test/java/parameters/MATypeTest.java: -------------------------------------------------------------------------------- 1 | package parameters; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import com.crazzyghost.alphavantage.parameters.MAType; 6 | 7 | import org.junit.Test; 8 | 9 | public class MATypeTest { 10 | 11 | 12 | @Test 13 | public void testSMA(){ 14 | assertEquals(MAType.SMA.toString(), "0"); 15 | } 16 | 17 | @Test 18 | public void testEMA(){ 19 | assertEquals(MAType.EMA.toString(), "1"); 20 | } 21 | 22 | @Test 23 | public void testWMA(){ 24 | assertEquals(MAType.WMA.toString(), "2"); 25 | } 26 | 27 | @Test 28 | public void testDEMA(){ 29 | assertEquals(MAType.DEMA.toString(), "3"); 30 | } 31 | 32 | @Test 33 | public void testTEMA(){ 34 | assertEquals(MAType.TEMA.toString(), "4"); 35 | } 36 | 37 | @Test 38 | public void testTRIMA(){ 39 | assertEquals(MAType.TRIMA.toString(), "5"); 40 | } 41 | 42 | @Test 43 | public void testT3(){ 44 | assertEquals(MAType.T3.toString(), "6"); 45 | } 46 | 47 | @Test 48 | public void testKAMA(){ 49 | assertEquals(MAType.KAMA.toString(), "7"); 50 | } 51 | 52 | @Test 53 | public void testMAMA(){ 54 | assertEquals(MAType.MAMA.toString(), "8"); 55 | } 56 | } -------------------------------------------------------------------------------- /src/test/java/parameters/IntervalTest.java: -------------------------------------------------------------------------------- 1 | package parameters; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import com.crazzyghost.alphavantage.parameters.Interval; 6 | 7 | import org.junit.Test; 8 | 9 | public class IntervalTest { 10 | 11 | @Test 12 | public void testOneMin(){ 13 | assertEquals(Interval.ONE_MIN.toString(), "1min"); 14 | } 15 | 16 | @Test 17 | public void testFiveMin(){ 18 | assertEquals(Interval.FIVE_MIN.toString(), "5min"); 19 | } 20 | 21 | @Test 22 | public void testFifteenMin(){ 23 | assertEquals(Interval.FIFTEEN_MIN.toString(), "15min"); 24 | } 25 | 26 | 27 | @Test 28 | public void testThirtyMin(){ 29 | assertEquals(Interval.THIRTY_MIN.toString(), "30min"); 30 | } 31 | 32 | 33 | @Test 34 | public void testSixtyMin(){ 35 | assertEquals(Interval.SIXTY_MIN.toString(), "60min"); 36 | } 37 | 38 | 39 | @Test 40 | public void testDaily(){ 41 | assertEquals(Interval.DAILY.toString(), "daily"); 42 | } 43 | 44 | 45 | @Test 46 | public void testWeekly(){ 47 | assertEquals(Interval.WEEKLY.toString(), "weekly"); 48 | } 49 | 50 | 51 | @Test 52 | public void testMonthly(){ 53 | assertEquals(Interval.MONTHLY.toString(), "monthly"); 54 | } 55 | 56 | 57 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/parser/DefaultParser.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.parser; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | /** 8 | * @author crazzyghost 9 | * @since 1.4.0 10 | * @param Response Type 11 | * 12 | * */ 13 | public abstract class DefaultParser extends Parser { 14 | 15 | public abstract T parse(Map metaData, Map> data); 16 | 17 | @Override 18 | @SuppressWarnings("unchecked") 19 | public T parse(Map object){ 20 | List keys = new ArrayList<>(object.keySet()); 21 | 22 | if (keys.isEmpty()) { 23 | return onParseError("Empty JSON returned by the API, the symbol might not be supported."); 24 | } else { 25 | Map metaData; 26 | Map> units; 27 | 28 | try{ 29 | metaData = (Map) object.get(keys.get(0)); 30 | units = (Map>) object.get(keys.get(1)); 31 | }catch (ClassCastException ex){ 32 | return onParseError(object.get(keys.get(0)).toString()); 33 | } 34 | 35 | return parse(metaData, units); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/forex/request/ForexRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.forex.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.DataType; 4 | import com.crazzyghost.alphavantage.parameters.OutputSize; 5 | 6 | public abstract class ForexRequest{ 7 | 8 | protected String from_symbol; 9 | protected String to_symbol; 10 | protected DataType dataType; 11 | 12 | protected ForexRequest(Builder builder) { 13 | this.to_symbol = builder.toSymbol; 14 | this.from_symbol = builder.fromSymbol; 15 | this.dataType = builder.dataType; 16 | } 17 | 18 | 19 | public abstract static class Builder >{ 20 | 21 | private String fromSymbol; 22 | private String toSymbol; 23 | private DataType dataType = DataType.JSON; 24 | 25 | public T fromSymbol(String fromSymbol){ 26 | this.fromSymbol = fromSymbol; 27 | return (T) this; 28 | } 29 | 30 | public T toSymbol(String fromSymbol){ 31 | this.toSymbol =fromSymbol; 32 | return (T) this; 33 | } 34 | 35 | public T dataType(DataType dataType){ 36 | this.dataType = dataType; 37 | return (T) this; 38 | } 39 | 40 | public abstract ForexRequest build(); 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/forex/request/IntraDayRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.forex.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.Function; 4 | import com.crazzyghost.alphavantage.parameters.Interval; 5 | import com.crazzyghost.alphavantage.parameters.OutputSize; 6 | 7 | public class IntraDayRequest extends ForexRequest { 8 | 9 | private Interval interval; 10 | private Function function; 11 | private OutputSize outputsize; 12 | 13 | private IntraDayRequest(Builder builder){ 14 | super(builder); 15 | this.function = Function.FX_INTRADAY; 16 | this.outputsize = builder.outputsize; 17 | this.interval = builder.interval; 18 | } 19 | 20 | public static class Builder extends ForexRequest.Builder{ 21 | 22 | Interval interval = Interval.ONE_MIN; 23 | OutputSize outputsize = OutputSize.COMPACT; 24 | 25 | public Builder interval(Interval interval){ 26 | this.interval = interval; 27 | return this; 28 | } 29 | 30 | public Builder outputSize(OutputSize outputsize){ 31 | this.outputsize = outputsize; 32 | return this; 33 | } 34 | 35 | @Override 36 | public ForexRequest build() { 37 | return new IntraDayRequest(this); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/bbands/BBANDSIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.bbands; 2 | 3 | public class BBANDSIndicatorUnit { 4 | private String date; 5 | private double realUpperBandValue; 6 | private double realLowerBandValue; 7 | private double realMiddleBandValue; 8 | 9 | public BBANDSIndicatorUnit(String date, double realUpperBandValue, double realLowerBandValue, double realMiddleBandValue) { 10 | this.date = date; 11 | this.realUpperBandValue = realUpperBandValue; 12 | this.realLowerBandValue = realLowerBandValue; 13 | this.realMiddleBandValue = realMiddleBandValue; 14 | } 15 | 16 | public String getDate() { 17 | return date; 18 | } 19 | 20 | public double getRealUpperBandValue() { 21 | return realUpperBandValue; 22 | } 23 | 24 | public double getRealLowerBandValue() { 25 | return realLowerBandValue; 26 | } 27 | 28 | public double getRealMiddleBandValue() { 29 | return realMiddleBandValue; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "BBANDSIndicatorUnit {date=" + date + ", realLowerBandValue=" + realLowerBandValue 35 | + ", realMiddleBandValue=" + realMiddleBandValue + ", realUpperBandValue=" + realUpperBandValue + "}"; 36 | } 37 | 38 | 39 | } -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/timeseries/request/TimeSeriesRequest.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.timeseries.request; 2 | 3 | import com.crazzyghost.alphavantage.parameters.DataType; 4 | import com.crazzyghost.alphavantage.parameters.Function; 5 | 6 | public abstract class TimeSeriesRequest { 7 | 8 | private Function function; 9 | private String symbol; 10 | private DataType dataType; 11 | 12 | 13 | protected TimeSeriesRequest(Builder builder){ 14 | this.symbol = builder.symbol; 15 | this.dataType = builder.dataType; 16 | this.function = builder.function; 17 | } 18 | 19 | public static abstract class Builder>{ 20 | 21 | protected DataType dataType = DataType.JSON; 22 | protected String symbol; 23 | public Function function; 24 | 25 | public Builder(){ 26 | 27 | } 28 | 29 | public T dataType(DataType dataType){ 30 | this.dataType = dataType; 31 | return (T) this; 32 | } 33 | 34 | public T forSymbol(String symbol){ 35 | this.symbol = symbol; 36 | return (T) this; 37 | } 38 | 39 | public T function(Function function){ 40 | this.function = function; 41 | return (T) this; 42 | } 43 | 44 | public abstract TimeSeriesRequest build(); 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/technicalindicator/response/bbands/BBANDSIndicatorUnit.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.technicalindicator.response.bbands; 2 | 3 | public class BBANDSIndicatorUnit { 4 | private String date; 5 | private double realUpperBandValue; 6 | private double realLowerBandValue; 7 | private double realMiddleBandValue; 8 | 9 | public BBANDSIndicatorUnit(String date, double realUpperBandValue, double realLowerBandValue, 10 | double realMiddleBandValue) { 11 | this.date = date; 12 | this.realUpperBandValue = realUpperBandValue; 13 | this.realLowerBandValue = realLowerBandValue; 14 | this.realMiddleBandValue = realMiddleBandValue; 15 | } 16 | 17 | public String getDate() { 18 | return date; 19 | } 20 | 21 | public double getRealUpperBandValue() { 22 | return realUpperBandValue; 23 | } 24 | 25 | public double getRealLowerBandValue() { 26 | return realLowerBandValue; 27 | } 28 | 29 | public double getRealMiddleBandValue() { 30 | return realMiddleBandValue; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return "BBANDSIndicatorUnit {date=" + date + ", realLowerBandValue=" + realLowerBandValue 36 | + ", realMiddleBandValue=" + realMiddleBandValue + ", realUpperBandValue=" + realUpperBandValue + "}"; 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /docs/api/fundamentaldata/fundamentaldata.md: -------------------------------------------------------------------------------- 1 | [alphavantage](../alphavantage/index.md) / [fundamentaldata](./index.md) / [FundamentalData](#) 2 | 3 | # Sector 4 | 5 | `public final class FundamentalData extends Object implements `[`Fetcher`](../alphavantage/fetcher.md) 6 | 7 | Access to Fundamental Data 8 | 9 | ### Constructors 10 | 11 | | Name | Summary | 12 | |-----------------------------------------|-----------------------------------------| 13 | | [FundamentalData](./fundamentaldata.md) | `public FundamentalData(Config config)` | 14 | 15 | 16 | ### Properties 17 | 18 | | Name | Summary | 19 | |----------------------|------------------------------------------------------| 20 | | [config](#) | `private Config config` | 21 | | [builder](#) | `private FundamentalDataRequest.Builder builder` | 22 | | [successCallback](#) | `private Fetcher.SuccessCallback successCallback` | 23 | | [failureCallback](#) | `private Fetcher.FailureCallback failureCallback` | 24 | 25 | ### Methods 26 | 27 | |Name|Summary| 28 | |----|-------| 29 | | [onSuccess](#) | `public FundamentalData onSuccess(Fetcher.SuccessCallback callback)` | 30 | | [onFailure](#) | `public FundamentalData onFailure(Fetcher.FailureCallback callback)` | 31 | | [fetch](#) | `public void fetch()` | 32 | | [fetchSync](#) | `public void fetchSync()` | 33 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/dx/DXResponse.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.dx; 2 | 3 | import com.crazzyghost.alphavantage.indicator.response.PeriodicResponse; 4 | import com.crazzyghost.alphavantage.indicator.response.SimpleIndicatorUnit; 5 | import com.crazzyghost.alphavantage.parser.Parser; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public class DXResponse extends PeriodicResponse { 11 | 12 | private DXResponse(List indicatorUnits, MetaData metaData) { 13 | super(indicatorUnits, metaData); 14 | } 15 | 16 | private DXResponse(String errorMessage) { 17 | super(errorMessage); 18 | } 19 | 20 | public static DXResponse of(Map stringObjectMap){ 21 | Parser parser = new DXParser(); 22 | return parser.parse(stringObjectMap); 23 | } 24 | 25 | public static class DXParser extends PeriodicParser { 26 | 27 | @Override 28 | public DXResponse get(List indicatorUnits, MetaData metaData) { 29 | return new DXResponse(indicatorUnits, metaData); 30 | } 31 | 32 | @Override 33 | public DXResponse get(String errorMessage) { 34 | return new DXResponse(errorMessage); 35 | } 36 | 37 | @Override 38 | public String getIndicatorKey() { 39 | return "DX"; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/adx/ADXResponse.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.adx; 2 | 3 | import com.crazzyghost.alphavantage.indicator.response.PeriodicResponse; 4 | import com.crazzyghost.alphavantage.indicator.response.SimpleIndicatorUnit; 5 | import com.crazzyghost.alphavantage.parser.Parser; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public class ADXResponse extends PeriodicResponse { 11 | 12 | private ADXResponse(List indicatorUnits, MetaData metaData) { 13 | super(indicatorUnits, metaData); 14 | } 15 | 16 | private ADXResponse(String errorMessage) { 17 | super(errorMessage); 18 | } 19 | 20 | public static ADXResponse of(Map stringObjectMap){ 21 | Parser parser = new ADXParser(); 22 | return parser.parse(stringObjectMap); 23 | } 24 | 25 | public static class ADXParser extends PeriodicParser { 26 | 27 | @Override 28 | public ADXResponse get(List indicatorUnits, MetaData metaData) { 29 | return new ADXResponse(indicatorUnits, metaData); 30 | } 31 | 32 | @Override 33 | public ADXResponse get(String errorMessage) { 34 | return new ADXResponse(errorMessage); 35 | } 36 | 37 | @Override 38 | public String getIndicatorKey() { 39 | return "ADX"; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/crazzyghost/alphavantage/indicator/response/atr/ATRResponse.java: -------------------------------------------------------------------------------- 1 | package com.crazzyghost.alphavantage.indicator.response.atr; 2 | 3 | import com.crazzyghost.alphavantage.indicator.response.PeriodicResponse; 4 | import com.crazzyghost.alphavantage.indicator.response.SimpleIndicatorUnit; 5 | import com.crazzyghost.alphavantage.parser.Parser; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public class ATRResponse extends PeriodicResponse { 11 | 12 | private ATRResponse(List indicatorUnits, MetaData metaData) { 13 | super(indicatorUnits, metaData); 14 | } 15 | 16 | private ATRResponse(String errorMessage) { 17 | super(errorMessage); 18 | } 19 | 20 | public static ATRResponse of(Map stringObjectMap){ 21 | Parser parser = new ATRParser(); 22 | return parser.parse(stringObjectMap); 23 | } 24 | 25 | public static class ATRParser extends PeriodicParser { 26 | 27 | @Override 28 | public ATRResponse get(List indicatorUnits, MetaData metaData) { 29 | return new ATRResponse(indicatorUnits, metaData); 30 | } 31 | 32 | @Override 33 | public ATRResponse get(String errorMessage) { 34 | return new ATRResponse(errorMessage); 35 | } 36 | 37 | @Override 38 | public String getIndicatorKey() { 39 | return "ATR"; 40 | } 41 | } 42 | } 43 | --------------------------------------------------------------------------------