API reference
POSThttps://ftl.fasttrack.net/v1/portfolios/dynamicmodel
Dynamic Model
String together multiple static models to get the results of an actively traded portfolio. Returns performance, charting, and position.
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 |
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 |
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 |
details | query | Optional | integer | include or exclude "modeldetails" object in resutl. Pass "0" to reduce result size. |
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. |
basis | query | Optional | string | Basis used for correlation, beta, sharpe ratio, ulcer performance index |
len | query | Optional | integer | Correlation length, described in market days |
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
{
"marginrate": "0.03",
"models": [
{
"model": [
{
"ticker": "SPY",
"weight": "50"
}
],
"start": "2001-01-11"
}
],
"name": "Example Dynamic Model",
"seedvalue": "1000",
"ticker": "$XX",
"rebalanceperiod": "week"
}
Request example
curl --request POST \
--url 'https://ftl.fasttrack.net/v1/portfolios/dynamicmodel' \
--header 'appid: YOUR_APP_ID' \
--header 'token: YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"marginrate":"0.03","models":[{"model":[{"ticker":"SPY","weight":"50"}],"start":"2001-01-11"}],"name":"Example Dynamic Model","seedvalue":"1000","ticker":"$XX","rebalanceperiod":"week"}'
Responses
| Status | Description |
|---|---|
200 | OK |