API Access

TuringTrader.com provides an API to access your portfolio's asset allocation. You can use this API to automate portfolio maintenance and rebalancing.

The TuringTrader API provides a simple https endpoint, which returns the current asset allocation. The format of the URL is as follows:


This URL includes the following parameters:

  • API_KEY: The API key identifies you, similar to your account's login and password. You can find your API key on the member-info page.
  • PORTFOLIO_SLUG: This is the portfolio's name, as used in the URL of the portfolio page. If your portfolio's page is at www.turingtrader.com/classic-60-40, the slug is classic-40-40.

Here is an example of a valid URL: https://www.turingtrader.com/api/v1/alloc?id=123&pf=classic-60-40. The endpoint returns an object in JSON format, similar to this:

    portfolio: "classic-60-40",
    rebalanceDate: "October 13, 2020",
    columnFormat: ["Symbol", "Name", "Allocation", "Price"],
    assetAllocation: [
      ["SPY", "SPDR S&P 500 Trust ETF", "60.00%", "350.13"],
      ["TLT", "iShares 20 Plus Year Treasury Bond ETF", "40.00%", "161.75"],

The response includes the following fields:

  • portfolio: This is the portfolio slug you passed in as a parameter.
  • rebalanceDate: This is the date of the portfolio's last rebalancing. The date is specified in the exchange's time zone, and the asset allocation was calculated after the exchange closed on that day.
  • columnFormat: This field provides the format of the asset allocation rows. Each row includes the asset's ticker symbol, a descriptive name, the percentage of capital allocated to the asset, and the closing price.
  • assetAllocation: This is an array of arrays, one row per asset, with each row formatted according to columnFormat.