Agent Transactions
View transaction history for trading agents, including buys, sells, and other on-chain activity.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/agent-transactions | List transactions |
GET | /api/v1/agent-transactions/:id | Get a specific transaction |
POST | /api/v1/agent-transactions | Create a transaction record |
PUT | /api/v1/agent-transactions/:id | Update a transaction |
DELETE | /api/v1/agent-transactions/:id | Delete a transaction |
All transaction endpoints require JWT authentication.
List Transactions
Get transactions for an agent with optional filtering.
GET /api/v1/agent-transactions?agentId=:agentIdQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | UUID | Yes | Agent ID |
walletAddress | string | No | Filter by wallet |
transactionType | string | No | Filter by type: BUY, SELL |
startTime | ISO 8601 | No | Filter from date |
endTime | ISO 8601 | No | Filter to date |
signalId | integer | No | Filter by signal ID |
isDca | boolean | No | Filter DCA transactions |
limit | integer | No | Max results (default: 100, max: 1000) |
offset | integer | No | Skip results (default: 0) |
Response
Success (200)
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"transactionType": "BUY",
"transactionValueUsd": "100.00",
"transactionTime": "2025-01-20T08:00:00.000Z",
"destinationAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"signalId": 12345,
"fees": "0.002",
"routes": ["Jupiter"],
"inputMint": "So11111111111111111111111111111111111111112",
"inputSymbol": "SOL",
"inputAmount": "1.0",
"inputPrice": "100.00",
"outputMint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"outputSymbol": "BONK",
"outputAmount": "1000000",
"outputPrice": "0.0001",
"slippage": "300",
"priceImpact": "0.05",
"isDca": false,
"createdAt": "2025-01-20T08:00:00.000Z",
"updatedAt": "2025-01-20T08:00:00.000Z"
}
]Response Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Transaction ID |
agentId | UUID | Agent ID |
walletAddress | string | Wallet that executed the transaction |
transactionType | string | BUY or SELL |
transactionValueUsd | string | Transaction value in USD |
transactionTime | ISO 8601 | When the transaction occurred |
destinationAddress | string | Target token/wallet address |
signalId | integer | Associated signal ID (if any) |
fees | string | Transaction fees |
routes | array | Swap routes used |
inputMint | string | Input token mint address |
inputSymbol | string | Input token symbol |
inputAmount | string | Amount of input token |
inputPrice | string | Price of input token |
outputMint | string | Output token mint address |
outputSymbol | string | Output token symbol |
outputAmount | string | Amount of output token |
outputPrice | string | Price of output token |
slippage | string | Slippage in basis points |
priceImpact | string | Price impact percentage |
isDca | boolean | Whether this was a DCA order |
Example
curl -X GET "https://your-instance.com/api/v1/agent-transactions?agentId=123e...&transactionType=BUY&limit=50" \
-H "Authorization: Bearer <access_token>"Get Transaction
Get a specific transaction by ID.
GET /api/v1/agent-transactions/:idPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Transaction ID |
Response
Success (200)
Returns the transaction object.
Create Transaction
Create a new transaction record. Typically used internally when trades execute.
POST /api/v1/agent-transactionsRequest
{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"transactionType": "BUY",
"transactionValueUsd": "100.00",
"inputMint": "So11111111111111111111111111111111111111112",
"inputAmount": "1.0",
"outputMint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"outputAmount": "1000000"
}Response
Success (201)
Returns the created transaction record.
Update Transaction
Update an existing transaction record.
PUT /api/v1/agent-transactions/:idResponse
Success (200)
Returns the updated transaction record.
Delete Transaction
Delete a transaction record.
DELETE /api/v1/agent-transactions/:idResponse
Success (200)
{
"success": true
}Transaction Types
| Type | Description |
|---|---|
BUY | Token purchase (SOL → Token) |
SELL | Token sale (Token → SOL) |
Related Endpoints
- Agents - Manage agents
- Agent Positions - View open positions
- Historical Swaps - View completed trades