Portfolio Trades
Retrieves trade instructions for a portfolio on latest rebalance date.
Endpoint
GET
/data/v1/portfolio_trades/:idParameters
api_key string
required
Your authentication key needed to make requests.
value int
required
Portfolio value in USD. E.g. 1000000 for USD 1 million.
allowFractional Boolean
default: False
Whether to allow for fractional shares (typically by sepcifying exact amount to be invested if broker allows).
format string
default: json
Defines return format of response. Options are json or csv. Default is json.
Example Request
cURL
curl -X GET "https://sensaai.com/data/v1/portfolio_trades/332&value=1000000&api_key=API_KEY"
Response
Returns a list of portfolio trades if a valid portfolio ID and value were provided. Returns an error otherwise.
[
{
"date": "2023-10-02",
"id": 176,
"ticker": "AME",
"name": "AMETEK INC/",
"price": 147.42,
"quantity": 136.0,
"value": 20049.12,
"pct": 0.02004912,
"order_type": "Buy"
},
{
"date": "2023-10-02",
"id": 67,
"ticker": "ADM",
"name": "ARCHER DANIELS MIDLAND CO",
"price": 74.2,
"quantity": 270.0,
"value": 20034.0,
"pct": 0.020034,
"order_type": "Buy"
},
{
"date": "2023-10-02",
"id": 71,
"ticker": "ADP",
"name": "AUTOMATIC DATA PROCESSING INC",
"price": 239.37,
"quantity": 84.0,
"value": 20107.08,
"pct": 0.020107080000000003,
"order_type": "Buy"
},
...more trades
]
Table of Contents