Execute Transaction
Execute a permission-checked, audited transaction between two agents. The system verifies authorization, spending limits, and agent status before processing.
POST/transactions
Execute a permission-checked, audited transaction between two agents.
Requires API key authentication
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| agent_id | string | required | The initiating agent's ID. |
| counterparty_id | string | required | The receiving agent's ID. |
| amount | number | required | Transaction amount (must be > 0). |
| currency | string | optional | ISO 4217 currency code. Default: USD. |
| action_type | string | required | Type of action being performed. |
| notes | string | optional | Transaction notes (max 500 characters). |
Before execution, the system verifies: (1) the agent is active, (2) the action is authorized, (3) the amount is within the spending limit, and (4) the counterparty exists.
Response Example
Response
{ "id": "tx_r8s9t0u1", "agent_id": "agent_7f3k9x2m", "agent_name": "Trading Agent Alpha", "counterparty_id": "agent_p2q3r4s5", "amount": 2500.00, "currency": "USD", "action_type": "execute_trades", "status": "completed", "permissions_checked": true, "audit_hash": "sha256:tx_hash_abc...", "notes": null, "created_at": "2025-01-15T14:30:00Z"}Code Examples
BASH
curl -X POST https://api.alsorn.com/transactions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "agent_7f3k9x2m", "counterparty_id": "agent_p2q3r4s5", "amount": 2500.00, "currency": "USD", "action_type": "execute_trades" }'