Approve pending trades
curl --request POST \
--url https://api.itoflow.ai/portfolios/{id}/pending-trades/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.itoflow.ai/portfolios/{id}/pending-trades/approve"
payload = { "decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({decisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.itoflow.ai/portfolios/{id}/pending-trades/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"approved": 123,
"executionMode": "<string>",
"message": "<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>"
}{
"code": "<string>",
"error": "<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>"
}Portfolios
Approve pending trades
Approves trades with status “awaiting_approval” and changes their status to “pending” so they can execute.
Operation ID: post__portfolios_id_pending_trades_approve.
POST
https://api.itoflow.ai
/
portfolios
/
{id}
/
pending-trades
/
approve
Approve pending trades
curl --request POST \
--url https://api.itoflow.ai/portfolios/{id}/pending-trades/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.itoflow.ai/portfolios/{id}/pending-trades/approve"
payload = { "decisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({decisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.itoflow.ai/portfolios/{id}/pending-trades/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"approved": 123,
"executionMode": "<string>",
"message": "<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>"
}{
"code": "<string>",
"error": "<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>"
}