FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...


v1.0.3 Public

AlphaVantage CFML API wrapper

Wraps the AlphaVantage API for easy CFML usage using the Hyper ColdBox module.

AlphaVantage Release

Getting Started

  1. Install this module - box install AlphaVantage
  2. Configure AlphaVantage API secrets using .env
  3. OR configure AlphaVantage API via ColdBox moduleSettings

Environment Variable Configuration

AlphaVantage can mainly be configured using environment variables:

  • ALPHAVANTAGE_API_KEY - Required API key for authenticating with the AlphaVantage API
  • FINNUHB_API_URL - base URL of the AlphaVantage API.

You'll need to either use commandbox-dotenv to automatically populate environment variables from the .env file on server start, or manually read this file to populate environment variables inside your application.

# .env file
# AlphaVantage API Credentials

As an aside, PLEASE ensure you ignore this file in your .gitignore!

ColdBox Module Configuration via ModuleSettings

Set this in config/ColdBox.cfc in the configure() method:

moduleSettings.alphavantage = {
    apiKey : "blablasecret",
    apiURL : "my.url"

API Reference

Each api method returns a HyperResponse object with the following methods (not exhaustive):

  • response.isSuccess() - boolean
  • response.isError() - boolean
  • response.json() - JSON deserialized to a struct or array
  • response.getData() - unchanged data payload

See the Hyper docs for more info on using a HyperResponse.



var response = getInstance( "[email protected]" ).getCompanyOverview( "MSFT" );
symbolstringRequired. Stock symbol to fetch


var response = getInstance( "[email protected]" ).getCompanyEarnings( "MSFT" );
symbolstringRequired. Stock symbol to fetch

Dependencies (1)

Dev Dependencies (2)


21 Jul 2021 — 17:54: 57 UTC


  • *: 📖 DOC: Improved README with API Reference docs (c3a6734)
  • *: 🐛 FIX: Correct ModuleConfig apikey in ALphaVantageClient configuration (7978352)
  • *: 👌 IMPROVE: Update Release workflow name for cooler github badge (f32f33f)

$ box install alphavantage

No collaborators yet.
  • {{ getFullDate("Jul 21 2021 05:07 PM GMT") }}
  • {{ getFullDate("Jul 21 2021 05:07 PM GMT") }}
  • 363
  • 0
  • 0