List pending trades
curl --request GET \
--url https://api.itoflow.ai/portfolios/{id}/pending-trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/portfolios/{id}/pending-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}/pending-trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currentPrices": {},
"metadata": {
"autoExecute": true,
"awaitingApprovalCount": 123,
"brokerConnectionStatus": {
"actionRequired": true,
"actionRequiredReason": "inactive",
"brokerType": "<string>",
"connectionId": "<string>",
"isActive": true,
"sessionExpired": true,
"sessionExpiresAt": "<string>",
"syncStatus": "<string>"
},
"buyCount": 123,
"count": 123,
"exchanges": [
"<string>"
],
"executingCount": 123,
"executionMode": "<string>",
"liveActionability": {
"approvalPreparationState": "<string>",
"approvalSetStale": true,
"approvalSetVersion": "<string>",
"blockingReason": "<string>",
"blockingReasonCode": "<string>",
"canApprove": true,
"canCancelBrokerBacked": true,
"canCancelLocal": true,
"canPrepareApproval": true,
"canReconcile": true,
"derivedFrom": {
"approval": {
"approvalSetVersion": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stale": true,
"state": "<string>"
},
"brokerFamily": {
"defaultOrderFamily": "<string>",
"requiresReconnectSync": true,
"supportsSessionExpiryUx": true
},
"brokerType": "<string>",
"connection": {
"isActive": true,
"missingPermissions": [
"<string>"
],
"rawSyncStatus": "<string>",
"sessionExpired": true
},
"portfolio": {
"pendingAgeMs": 123,
"rawSyncStatus": "<string>",
"reconcileInFlight": true
},
"trade": {
"ageMs": 123,
"brokerOrderIdPresent": true,
"executionAttemptCount": 123,
"hasExecutionAttempt": true,
"orderType": "<string>",
"rawStatus": "awaiting_approval",
"retryBudgetExhausted": true
}
},
"effectiveConnectionState": "<string>",
"effectivePortfolioState": "<string>",
"effectiveTradeLogicalState": "<string>",
"illegalCombinationSignal": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recommendedAction": "<string>",
"reconciling": true
},
"netChange": 123,
"reconciliationRequiredCount": 123,
"reconciling": true,
"sellCount": 123,
"stateUnknownCount": 123,
"totalBuyAmount": 123,
"totalSellAmount": 123,
"approvalPreparationState": "<string>",
"approvalProposal": {
"blockingReasonCode": "<string>",
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hash": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"reviewRequired": true,
"state": "ready"
},
"approvalSetStale": true,
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"trades": [
{
"action": "<string>",
"actionability": {
"approvalPreparationState": "<string>",
"approvalSetStale": true,
"approvalSetVersion": "<string>",
"blockingReason": "<string>",
"blockingReasonCode": "<string>",
"canApprove": true,
"canCancelBrokerBacked": true,
"canCancelLocal": true,
"canPrepareApproval": true,
"canReconcile": true,
"derivedFrom": {
"approval": {
"approvalSetVersion": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stale": true,
"state": "<string>"
},
"brokerFamily": {
"defaultOrderFamily": "<string>",
"requiresReconnectSync": true,
"supportsSessionExpiryUx": true
},
"brokerType": "<string>",
"connection": {
"isActive": true,
"missingPermissions": [
"<string>"
],
"rawSyncStatus": "<string>",
"sessionExpired": true
},
"portfolio": {
"pendingAgeMs": 123,
"rawSyncStatus": "<string>",
"reconcileInFlight": true
},
"trade": {
"ageMs": 123,
"brokerOrderIdPresent": true,
"executionAttemptCount": 123,
"hasExecutionAttempt": true,
"orderType": "<string>",
"rawStatus": "awaiting_approval",
"retryBudgetExhausted": true
}
},
"effectiveConnectionState": "<string>",
"effectivePortfolioState": "<string>",
"effectiveTradeLogicalState": "<string>",
"illegalCombinationSignal": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recommendedAction": "<string>",
"reconciling": true
},
"actionRequired": true,
"brokerDetailState": "<string>",
"brokerExecutionId": "<string>",
"canonicalStatus": "awaiting_approval",
"companyName": "<string>",
"createdAt": "<string>",
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decisionPrice": "<string>",
"detailLabel": "<string>",
"errorMessage": "<string>",
"executionMode": "<string>",
"filledQuantity": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intendedNotional": "<string>",
"limitPrice": "<string>",
"orderFamily": "<string>",
"portfolioId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restingLocation": "<string>",
"shortLabel": "<string>",
"status": "awaiting_approval",
"statusAnimate": true,
"statusLabel": "<string>",
"statusTone": "<string>",
"symbol": "<string>",
"triggerPrice": "<string>",
"updatedAt": "<string>",
"brokerActionRequired": {
"actionLabel": "<string>",
"actionUrl": "<string>",
"brokerType": "<string>",
"code": "robinhood_investor_profile_required",
"description": "<string>",
"severity": "blocking",
"title": "<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
List pending trades
Returns pending trades awaiting approval for a portfolio, with current prices, net change, and auto-execute status.
Operation ID: get__portfolios_id_pending_trades.
GET
https://api.itoflow.ai
/
portfolios
/
{id}
/
pending-trades
List pending trades
curl --request GET \
--url https://api.itoflow.ai/portfolios/{id}/pending-trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/portfolios/{id}/pending-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}/pending-trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currentPrices": {},
"metadata": {
"autoExecute": true,
"awaitingApprovalCount": 123,
"brokerConnectionStatus": {
"actionRequired": true,
"actionRequiredReason": "inactive",
"brokerType": "<string>",
"connectionId": "<string>",
"isActive": true,
"sessionExpired": true,
"sessionExpiresAt": "<string>",
"syncStatus": "<string>"
},
"buyCount": 123,
"count": 123,
"exchanges": [
"<string>"
],
"executingCount": 123,
"executionMode": "<string>",
"liveActionability": {
"approvalPreparationState": "<string>",
"approvalSetStale": true,
"approvalSetVersion": "<string>",
"blockingReason": "<string>",
"blockingReasonCode": "<string>",
"canApprove": true,
"canCancelBrokerBacked": true,
"canCancelLocal": true,
"canPrepareApproval": true,
"canReconcile": true,
"derivedFrom": {
"approval": {
"approvalSetVersion": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stale": true,
"state": "<string>"
},
"brokerFamily": {
"defaultOrderFamily": "<string>",
"requiresReconnectSync": true,
"supportsSessionExpiryUx": true
},
"brokerType": "<string>",
"connection": {
"isActive": true,
"missingPermissions": [
"<string>"
],
"rawSyncStatus": "<string>",
"sessionExpired": true
},
"portfolio": {
"pendingAgeMs": 123,
"rawSyncStatus": "<string>",
"reconcileInFlight": true
},
"trade": {
"ageMs": 123,
"brokerOrderIdPresent": true,
"executionAttemptCount": 123,
"hasExecutionAttempt": true,
"orderType": "<string>",
"rawStatus": "awaiting_approval",
"retryBudgetExhausted": true
}
},
"effectiveConnectionState": "<string>",
"effectivePortfolioState": "<string>",
"effectiveTradeLogicalState": "<string>",
"illegalCombinationSignal": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recommendedAction": "<string>",
"reconciling": true
},
"netChange": 123,
"reconciliationRequiredCount": 123,
"reconciling": true,
"sellCount": 123,
"stateUnknownCount": 123,
"totalBuyAmount": 123,
"totalSellAmount": 123,
"approvalPreparationState": "<string>",
"approvalProposal": {
"blockingReasonCode": "<string>",
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hash": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"reviewRequired": true,
"state": "ready"
},
"approvalSetStale": true,
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"trades": [
{
"action": "<string>",
"actionability": {
"approvalPreparationState": "<string>",
"approvalSetStale": true,
"approvalSetVersion": "<string>",
"blockingReason": "<string>",
"blockingReasonCode": "<string>",
"canApprove": true,
"canCancelBrokerBacked": true,
"canCancelLocal": true,
"canPrepareApproval": true,
"canReconcile": true,
"derivedFrom": {
"approval": {
"approvalSetVersion": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stale": true,
"state": "<string>"
},
"brokerFamily": {
"defaultOrderFamily": "<string>",
"requiresReconnectSync": true,
"supportsSessionExpiryUx": true
},
"brokerType": "<string>",
"connection": {
"isActive": true,
"missingPermissions": [
"<string>"
],
"rawSyncStatus": "<string>",
"sessionExpired": true
},
"portfolio": {
"pendingAgeMs": 123,
"rawSyncStatus": "<string>",
"reconcileInFlight": true
},
"trade": {
"ageMs": 123,
"brokerOrderIdPresent": true,
"executionAttemptCount": 123,
"hasExecutionAttempt": true,
"orderType": "<string>",
"rawStatus": "awaiting_approval",
"retryBudgetExhausted": true
}
},
"effectiveConnectionState": "<string>",
"effectivePortfolioState": "<string>",
"effectiveTradeLogicalState": "<string>",
"illegalCombinationSignal": "<string>",
"latestDecisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recommendedAction": "<string>",
"reconciling": true
},
"actionRequired": true,
"brokerDetailState": "<string>",
"brokerExecutionId": "<string>",
"canonicalStatus": "awaiting_approval",
"companyName": "<string>",
"createdAt": "<string>",
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decisionPrice": "<string>",
"detailLabel": "<string>",
"errorMessage": "<string>",
"executionMode": "<string>",
"filledQuantity": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"intendedNotional": "<string>",
"limitPrice": "<string>",
"orderFamily": "<string>",
"portfolioId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restingLocation": "<string>",
"shortLabel": "<string>",
"status": "awaiting_approval",
"statusAnimate": true,
"statusLabel": "<string>",
"statusTone": "<string>",
"symbol": "<string>",
"triggerPrice": "<string>",
"updatedAt": "<string>",
"brokerActionRequired": {
"actionLabel": "<string>",
"actionUrl": "<string>",
"brokerType": "<string>",
"code": "robinhood_investor_profile_required",
"description": "<string>",
"severity": "blocking",
"title": "<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>"
}