eBrent.net
home
apis
photos
buildpc
wishlist
uscoins
websites
worldcoins
documents
login

These APIs are available for free personal use. Each can be used with an AJAX call and returns JSON. If you would like to host these APIs on your own server, or for business use, please contact me.

Please consider contributing to my efforts:


TSP Fund Prices

This API provides access to TSP fund share prices from their inception date to the last business day. It can be queried from a Google Chart or directly using one of the parameter sets below.

URL

http://www.ebrent.net/apis/tsp.php

Parameters

- or -
  • fund - Required. Name of the TSP fund. Fund names currently available:
    • G Fund
    • F Fund
    • C Fund
    • S Fund
    • I Fund
    • L Income
    • L 2010
    • L 2020
    • L 2030
    • L 2040
    • L 2050
  • date - Date for a single price, formatted as YYYY-MM-DD. Defaults to the last business day.
  • start - In lieu of date, starting date of a range
  • end - Ending date of a range (requires start)

Example

Request:
http://www.ebrent.net/apis/tsp.php?fund=G+Fund&start=2010-01-01&end=2010-01-10

Result:
{"fund":"G Fund","prices":[{"date":"2010-01-04","price":"13.1237"},{"date":"2010-01-05","price":"13.1249"},{"date":"2010-01-06","price":"13.1262"},{"date":"2010-01-07","price":"13.1274"},{"date":"2010-01-08","price":"13.1287"}]}

NOTE: If using the Google Visualization parameter set, the result format will vary based on the request.

Savings Bond Values

This API returns the value of a $25 (face value) savings bond. This data is drawn from data supplied by TreasuryDirect.

URL

http://www.ebrent.net/apis/savingsbonds.php

Parameters

  • series - Required. One of:
    • I
    • E
    • EE (N is also accepted for EE bonds)
    • S
  • iy - Required. The four-digit year of issue.
  • im - Required. The numeric month of issue (1 = January)
  • ry - The four-digit year of redemption. Defaults to the current year.
  • rm - The numeric month of redemption. Defaults to the current month.

Example

This request gets the value of a $25 face value EE Series bond issued in November of 1984. A bond with a $50 face value would be worth twice the returned value.

Request:
http://www.ebrent.net/apis/savingsbonds.php?series=EE&iy=1984&im=11

Result:
{"value":"57.66"}

Motif Indexes

The Motif Index API has been disabled due to changes with Motif Investing.

Extinct Currency Exchange Rates

This API provides access to exchange rates between currencies, both expired and existing. It uses the yahoo.finance.xchange data store for existing currencies. For extinct currencies without an ISO 4217 code, use this table.

URL

http://api.worldcoindatabase.com/xrate.php

Parameters

  • from - Currency ISO 4217 code to convert from
  • to - Currency ISO 4217 code to convert to

Example

Request:
http://api.worldcoindatabase.com/xrate.php?from=DEM&to=USD

Result:
{"error":"Invalid ISO 4217 Code"}
You are not logged in.
 Click here to login.
email: brent@ebrent.net
since 4/6/2004
powered by: ICDSoft
PHP v5.6.32 & MySQL v 5.7.19