API reference
POSThttps://ftl.fasttrack.net/v1/portfolios/staticmodel
Static Model
Calculates the specified portfolio over the specified rebalance period
Legacy API: This read-only reference is preserved for existing v1 integrations. New integrations should use the current API documentation.
Parameters
| Name | In | Requirement | Type | Description |
|---|---|---|---|---|
start | query | Optional | string | First day in the date range of all calculations/requests |
end | query | Optional | string | Last day in the date range of all calculations/requests. If not provided, the last market day in the database is used |
basis | query | Optional | string | Basis used for correlation, beta, sharpe ratio, ulcer performance index |
len | query | Optional | integer | Correlation length, described in market days |
maxdraw | query | Optional | integer | Includes or exclude max draw data data in result. Max draw is a HEAVY calculation, so omit when not necessary to improve performance |
chart | query | Optional | integer | Include or exclude chart data in result. Chart data is substantially larger than other data and substantially increase the size of the result. Only request if necessary. |
count | query | Optional | string | Total number of datapoints returned in the FTChartData object. This helps improve API response time and minimizes the data loaded into charts. Value must be A to return ALL data points or a number greater than 0 |
monthend | query | Optional | integer | convert all calculated date ranges to month end. ie 1 year return from 6/28/2019 will calculate back to 6/29/2018 (the last market day of the month) instead of 6/28/2018. |
riskfree | query | Optional | string | ticker or % rate of return used as the "risk free rate" in alpha calculation. Default is VMFXX, Vanguard Money Market Fund |
details | query | Optional | integer | include or exclude "modeldetails" object in resutl. Pass "0" to reduce result size. |
appid | header | Required | string | 36 character GUID received from the welcome email. The header name must be sent exactly as lowercase appid. Sign up for a trial at http://apitrial.fasttrack.net |
token | header | Required | string | 36 character GUID returned by the auth/login endpoint. The header name must be sent exactly as lowercase token. |
Request body
Content type: application/json
{
"start": "string",
"rebalanceperiod": "week",
"marginrate": 0,
"seedvalue": 0,
"model": [
{
"ticker": "SPY",
"weight": "50"
}
],
"name": "string",
"waitForAllSecurities": "string"
}
Request example
curl --request POST \
--url 'https://ftl.fasttrack.net/v1/portfolios/staticmodel' \
--header 'appid: YOUR_APP_ID' \
--header 'token: YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"start":"string","rebalanceperiod":"week","marginrate":0,"seedvalue":0,"model":[{"ticker":"SPY","weight":"50"}],"name":"string","waitForAllSecurities":"string"}'
Responses
| Status | Description |
|---|---|
200 | data points associated with static model |
400 | bad input parameter |