Financial Modeling Prep SDK for Crystal
The Crystal module for the Financial Modeling Prep API
FMP provides one of the most accurate data available on the market. Every endpoint is available in JSON format and most of them also in CSV format. Data is coming right from SEC filings after being serialized by us. Our API has over 50 endpoints and we are still growing by adding new endpoints every week. We also provide on demand custom endpoint available for our business clients.
This SDK is automatically generated by the OpenAPI Generator project:
- Genreator version: openapi-generator-cli-7.0.0-20221012.083708-4.jar
- API version: 3.0
- Package version: 0.2.0
- Build package: org.openapitools.codegen.languages.CrystalClientCodegen
Installation
Install from Git
Add the following to shard.yaml
dependencies:
financialmodelingprep:
github: grokify/crystal-financialmodelingprep
version: ~> 0.2.0
Usage
require "financialmodelingprep"
cfg = Financialmodelingprep::Configuration.new do |config|
config.api_key = {
:apikey => "my fmp_api_key",
}
end
client = Financialmodelingprep::ApiClient.new cfg
api = Financialmodelingprep::FinancialStatementsApi.new client
infos, status, headers = api.get_income_statements_with_http_info(
symbol: "AAPL",
datatype: "json",
limit: 1,
period: "annual")
puts status
infos.each { |info|
puts info.to_json
}
See a running example at: github.com/grokify/crystal-financialmodelingprep-example
Development
Install dependencies
shards
Run the tests:
crystal spec