PHPackages                             rossmitchell/fund-services - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rossmitchell/fund-services

ActiveLibrary[API Development](/categories/api)

rossmitchell/fund-services
==========================

A set of interfaces for getting fund information from different providers

v0.1.0(6y ago)05GPL-3.0-or-laterPHPPHP &gt;=7.1

Since Jul 7Pushed 6y agoCompare

[ Source](https://github.com/rossmitchell/fund-services)[ Packagist](https://packagist.org/packages/rossmitchell/fund-services)[ RSS](/packages/rossmitchell-fund-services/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

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
------------

[](#installation)

```
composer require rossmitchell/fund-services

```

Rational
--------

[](#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
-----

[](#usage)

Each provider should implement the [FundPriceProvider](./src/Interfaces/FundPriceProvider.php) interface. It currently has three methods that need to be implements

### isFundSupported

[](#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](./src/Interfaces/Fund.php) object and should return a boolean after checking if it can provide pricing information for it

### getPriceForFund

[](#getpriceforfund)

This should return the [EndOfDayPrices](./src/Interfaces/EndOfDayPrices.php) for the Fund provided to it. These should be for the current day.

It throws a [PricesNotAvailableException](./src/Exceptions/PricesNotAvailableException.php) if there are no prices available at the moment for the Fund

It throws a [ServiceDownException](./src/Exceptions/ServiceDownException.php) if it is not able to get the prices from the provider

It throws a [FundNotFoundException](./src/Exceptions/FundNotFoundException.php) if it does not support the Fund

### getHistoricPricesForFund

[](#gethistoricpricesforfund)

This returns an array of [EndOfDayPrices](./src/Interfaces/EndOfDayPrices.php) 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](./src/Exceptions/ServiceDownException.php) if it is not able to get the prices from the provider

It throws a [FundNotFoundException](./src/Exceptions/FundNotFoundException.php) if it does not support the Fund

Contributing
------------

[](#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
-------

[](#license)

[GPL3](https://choosealicense.com/licenses/gpl-3.0/)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2503d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7716bfebfc14bed71e25dad848d5d138234c005235323afebfb22fbdb090d25?d=identicon)[rossmitchell](/maintainers/rossmitchell)

---

Top Contributors

[![rossmitchell](https://avatars.githubusercontent.com/u/7073145?v=4)](https://github.com/rossmitchell "rossmitchell (1 commits)")

### Embed Badge

![Health badge](/badges/rossmitchell-fund-services/health.svg)

```
[![Health](https://phpackages.com/badges/rossmitchell-fund-services/health.svg)](https://phpackages.com/packages/rossmitchell-fund-services)
```

###  Alternatives

[php-twinfield/twinfield

Library for using the Twinfield Soap Service.

33769.2k1](/packages/php-twinfield-twinfield)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
