Get trade history
curl --request GET \
--url https://api.itoflow.ai/portfolios/{id}/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/portfolios/{id}/trades"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/portfolios/{id}/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"metadata": {
"limit": 123,
"offset": 123,
"total": 123
},
"trades": [
{
"action": "BUY",
"cancelReason": "<string>",
"commission": "<string>",
"createdAt": "<string>",
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decisionPrice": "<string>",
"executedAt": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intendedNotional": "<string>",
"price": "<string>",
"priceCurrency": "<string>",
"quantity": "<string>",
"status": "awaiting_approval",
"strategyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"totalValue": "<string>",
"brokerActionRequired": {
"actionLabel": "<string>",
"actionUrl": "<string>",
"brokerType": "<string>",
"code": "robinhood_investor_profile_required",
"description": "<string>",
"severity": "blocking",
"title": "<string>"
},
"errorMessage": "<string>",
"historySource": "strategy_trade",
"reasoning": "<string>"
}
]
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}Portfolios
Get trade history
Returns paginated trade history for a portfolio. Supports paper and live (broker) trades with optional pending trade inclusion.
Operation ID: get__portfolios_id_trades.
GET
https://api.itoflow.ai
/
portfolios
/
{id}
/
trades
Get trade history
curl --request GET \
--url https://api.itoflow.ai/portfolios/{id}/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/portfolios/{id}/trades"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/portfolios/{id}/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"metadata": {
"limit": 123,
"offset": 123,
"total": 123
},
"trades": [
{
"action": "BUY",
"cancelReason": "<string>",
"commission": "<string>",
"createdAt": "<string>",
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decisionPrice": "<string>",
"executedAt": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intendedNotional": "<string>",
"price": "<string>",
"priceCurrency": "<string>",
"quantity": "<string>",
"status": "awaiting_approval",
"strategyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"totalValue": "<string>",
"brokerActionRequired": {
"actionLabel": "<string>",
"actionUrl": "<string>",
"brokerType": "<string>",
"code": "robinhood_investor_profile_required",
"description": "<string>",
"severity": "blocking",
"title": "<string>"
},
"errorMessage": "<string>",
"historySource": "strategy_trade",
"reasoning": "<string>"
}
]
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}{
"error": "<string>",
"available": "<string>",
"billing_action": {
"href": "<string>",
"kind": "upgrade",
"label": "<string>"
},
"code": "<string>",
"currentVersion": 123,
"details": "<unknown>",
"expectedVersion": 123,
"message": "<string>",
"requested": "<string>",
"usage": "<unknown>"
}