Download the PHP package rossmitchell/fund-services without Composer

On this page you can find all versions of the php package rossmitchell/fund-services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fund-services

Fund Services

A set of simple interfaces to be used when exchanging information about funds and their prices.

This is very much an Alpha build and significant changes are expected as it is developed

Installation

Rational

I'm building a system to track investment holdings and I've not got a good, open, free-ish, source of fund prices for use in it. Therefore I'm going to have to try different options, and probably fall back to screen scraping to get the data that I need.

To make this easier I'm going to use interfaces for the providers and what they have to return, which should allow me to switch these out with minimum hassle.

Usage

Each provider should implement the FundPriceProvider interface. It currently has three methods that need to be implements

isFundSupported

Not all providers are going to support all funds, so I need a simple way to check this ahead of time.

Accepts a Fund object and should return a boolean after checking if it can provide pricing information for it

getPriceForFund

This should return the EndOfDayPrices for the Fund provided to it. These should be for the current day.

It throws a PricesNotAvailableException if there are no prices available at the moment for the Fund

It throws a ServiceDownException if it is not able to get the prices from the provider

It throws a FundNotFoundException if it does not support the Fund

getHistoricPricesForFund

This returns an array of EndOfDayPrices for the Fund, with each item representing the Prices for one day in the range given. If there are not prices for one of the days, but there are for others then the array should contain those days. If there are no prices for the range then an empty array should be returned

It accepts a Fund and two DateTimeImmutable objects, one for the start day and one for the end day. The range should include both dates. If both dates are the same then the array should contain a single item for that date.

It throws a ServiceDownException if it is not able to get the prices from the provider

It throws a FundNotFoundException if it does not support the Fund

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GPL3


All versions of fund-services with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
moneyphp/money Version ^3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rossmitchell/fund-services contains the following files

Loading the files please wait ...