Terminology : Operations are associated with Operational Wallets (OpWallets). API responses may use managedWalletId or opWalletId - these fields are interchangeable and both refer to the operational wallet ID. See the Glossary for details.
Operations Endpoints
Manage operation queue, approvals, and execution history.
GET /api/core/operations/queue
Get pending and in-progress operations.
Headers :
Authorization: Bearer YOUR_ACCESS_TOKEN
Response :
{
"success" : true ,
"data" : {
"intents" : [
{
"id" : 789 ,
"type" : "SUPPLY" ,
"status" : "PENDING_APPROVAL" ,
"managedWalletId" : 456 ,
"amount" : "10000.00" ,
"token" : "USDC" ,
"createdAt" : "2025-10-23T14:00:00Z" ,
"estimatedAPY" : "6.5%"
}
],
"count" : 1
}
}
Operations in PENDING_APPROVAL status require manual approval before execution.
POST /api/core/operations/:id/approve
Approve a pending operation.
Headers :
Authorization: Bearer YOUR_ACCESS_TOKEN
Response :
{
"success" : true ,
"data" : {
"id" : 789 ,
"status" : "EXECUTING" ,
"approvedAt" : "2025-10-23T14:30:00Z"
}
}
Once approved, the operation will be picked up by your custody agent for execution.
POST /api/core/operations/:id/reject
Reject a pending operation.
Headers :
Authorization: Bearer YOUR_ACCESS_TOKEN
Response :
{
"success" : true ,
"data" : {
"id" : 789 ,
"status" : "REJECTED" ,
"rejectedAt" : "2025-10-23T14:30:00Z"
}
}
Rejecting an operation will release any reserved funds. This action cannot be undone.
GET /api/core/operations/:id
Get detailed information for a specific operation, including execution steps, blockchain transactions, and timing.
Headers :
Authorization: Bearer YOUR_ACCESS_TOKEN
URL Parameters :
Response :
{
"success" : true ,
"data" : {
"id" : 789 ,
"type" : "SUPPLY" ,
"status" : "COMPLETED" ,
"opWallet" : {
"id" : 456 ,
"address" : "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin" ,
"blockchain" : "SOLANA"
},
"token" : {
"symbol" : "USDC" ,
"decimals" : 6 ,
"mintAddress" : "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
},
"amount" : {
"amount" : "1000.00" ,
"currency" : "USDC"
},
"steps" : [
{
"id" : 1 ,
"type" : "SUPPLY_TO_PROVIDER" ,
"status" : "COMPLETED" ,
"provider" : {
"name" : "Drift Protocol" ,
"protocol" : "DRIFT"
},
"amount" : {
"amount" : "1000.00" ,
"currency" : "USDC"
}
}
],
"blockchainTransactions" : [
{
"id" : 2001 ,
"txHash" : "5K7Wv8X9YbN3cPdQ6tRzH4mEfJsL2kUiG1nVpWqXoAy" ,
"type" : "SUPPLY" ,
"status" : "CONFIRMED" ,
"amount" : {
"amount" : "1000.00" ,
"currency" : "USDC"
},
"timestamps" : {
"detectedAt" : {
"iso" : "2025-01-30T10:25:00Z" ,
"unix" : 1706611500
},
"confirmedAt" : {
"iso" : "2025-01-30T10:26:00Z" ,
"unix" : 1706611560
}
}
}
],
"timestamps" : {
"createdAt" : {
"iso" : "2025-01-30T10:20:00Z" ,
"unix" : 1706611200
},
"completedAt" : {
"iso" : "2025-01-30T10:26:00Z" ,
"unix" : 1706611560
}
}
}
}
Use Cases :
Track Operation Execution
Monitor the progress of an operation from creation through completion: // Poll for operation status
async function waitForCompletion ( operationId : number ) {
while ( true ) {
const response = await fetch (
`https://api.rebelfi.io/api/core/operations/ ${ operationId } ` ,
{ headers: { 'Authorization' : `Bearer ${ token } ` } }
);
const { data } = await response . json ();
if ( data . status === 'COMPLETED' ) {
console . log ( 'Operation completed!' );
console . log ( 'TxHash:' , data . blockchainTransactions [ 0 ]. txHash );
break ;
} else if ( data . status === 'FAILED' ) {
console . error ( 'Operation failed' );
break ;
}
await new Promise ( resolve => setTimeout ( resolve , 5000 )); // Poll every 5s
}
}
Get complete execution details for compliance and debugging: const operation = await fetch (
`https://api.rebelfi.io/api/core/operations/789` ,
{ headers: { 'Authorization' : `Bearer ${ token } ` } }
). then ( r => r . json ());
// Log for audit
console . log ( 'Operation ID:' , operation . data . id );
console . log ( 'Type:' , operation . data . type );
console . log ( 'Amount:' , operation . data . amount );
console . log ( 'Created:' , operation . data . timestamps . createdAt . iso );
console . log ( 'Completed:' , operation . data . timestamps . completedAt . iso );
console . log ( 'Blockchain TxHash:' , operation . data . blockchainTransactions [ 0 ]. txHash );
Link to Blockchain Explorer
Use transaction hashes to link to blockchain explorers: const { data } = await fetch (
`https://api.rebelfi.io/api/core/operations/789` ,
{ headers: { 'Authorization' : `Bearer ${ token } ` } }
). then ( r => r . json ());
// Generate Solana explorer link
const txHash = data . blockchainTransactions [ 0 ]. txHash ;
const explorerUrl = `https://solscan.io/tx/ ${ txHash } ` ;
console . log ( 'View on explorer:' , explorerUrl );
Operation details include all execution steps and blockchain transactions. For completed SUPPLY operations, see the Allocations API for yield metrics and performance data.
GET /api/core/operations/history
Get operation history with filtering.
Headers :
Authorization: Bearer YOUR_ACCESS_TOKEN
Query Parameters :
limit (optional) - Number of results (default: 50, max: 100)
offset (optional) - Pagination offset (default: 0)
status (optional) - Filter by status: COMPLETED, FAILED, etc.
Response :
{
"success" : true ,
"data" : {
"items" : [
{
"id" : 788 ,
"type" : "SUPPLY" ,
"status" : "COMPLETED" ,
"managedWalletId" : 456 ,
"amount" : "5000.00" ,
"token" : "USDC" ,
"createdAt" : "2025-10-22T10:00:00Z" ,
"completedAt" : "2025-10-22T10:02:15Z" ,
"txHash" : "5aApzp1XxiNzFotAiZt6z7BaTTYCS7964ycpxwYp4eVy..." ,
"actualAPY" : "6.3%"
}
],
"total" : 45 ,
"limit" : 50 ,
"offset" : 0 ,
"hasMore" : false
}
}
GET /api/core/operations/stats
Get operation statistics for your organization.
Headers :
Authorization: Bearer YOUR_ACCESS_TOKEN
Response :
{
"success" : true ,
"data" : {
"totalOperations" : 127 ,
"completedOperations" : 120 ,
"failedOperations" : 2 ,
"pendingOperations" : 5 ,
"totalDeployed" : "175000.00" ,
"averageCompletionTime" : "142" ,
"successRate" : "98.4%"
}
}
Operation Lifecycle
Operations progress through the following states:
PLANNING
Operation created, funds reserved from available balance
PENDING_APPROVAL
Awaiting manual approval (if required by policy)
EXECUTING
Transaction being signed by custody agent
CONFIRMING
Transaction submitted to blockchain, awaiting confirmation
COMPLETED
Transaction confirmed, allocation active and earning yield
Terminal States :
COMPLETED - Successfully executed
FAILED - Execution failed (funds released)
REJECTED - Manually rejected (funds released)
ABORTED - System aborted (funds released)
Example Usage
// Get pending operations
const queueResponse = await fetch ( 'https://api.rebelfi.io/api/core/operations/queue' , {
headers: { 'Authorization' : `Bearer ${ accessToken } ` }
});
const { data } = await queueResponse . json ();
console . log ( 'Pending operations:' , data . intents );
// Approve an operation
const approveResponse = await fetch ( 'https://api.rebelfi.io/api/core/operations/789/approve' , {
method: 'POST' ,
headers: { 'Authorization' : `Bearer ${ accessToken } ` }
});
// Get operation history with filtering
const historyResponse = await fetch ( 'https://api.rebelfi.io/api/core/operations/history?status=COMPLETED&limit=20' , {
headers: { 'Authorization' : `Bearer ${ accessToken } ` }
});
// Get statistics
const statsResponse = await fetch ( 'https://api.rebelfi.io/api/core/operations/stats' , {
headers: { 'Authorization' : `Bearer ${ accessToken } ` }
});
Approval Workflows
Configure approval requirements based on your operational needs:
Automatic Approval
Operations execute automatically without manual intervention.
Best for :
Trusted yield deployments
Small amounts
Low-risk operations
Manual Approval
All operations require explicit approval.
Best for :
Large deployments
New integrations
High-security requirements
Compliance workflows
Conditional Approval
Approval required based on rules:
Amount thresholds
Wallet types
Time of day
Counterparty addresses
Configure approval policies in the dashboard under Settings → Operations → Approval Rules .
Monitoring Operations
Best practices for monitoring operation execution:
Poll the queue regularly - Check for pending approvals
Monitor history for failures - Investigate failed operations
Track completion times - Identify performance issues
Review success rates - Ensure high reliability
Webhook Notifications
Subscribe to operation events:
operation.approved
operation.executing
operation.completed
operation.failed
Contact us to enable webhook notifications for your organization.
Data Types
This API uses standard data types for consistency across all endpoints:
See the complete Data Types Reference for details.