Retrieve synchronization status for an address to check when portfolio and transaction data were last updated.
Endpoint
GET https://api.octav.fi/v1/status
Parameters
Wallet address (EVM / SOL)addresses=0x6426af179aabebe47666f345d69fd9079673f6cd
Example
curl "https://api.octav.fi/v1/status?addresses=0x6426af..." \
-H "Authorization: Bearer YOUR_API_KEY"
Response
ISO 8601 timestamp of last portfolio synchronization
Example: "2025-05-08T14:43:12.020Z"
ISO 8601 timestamp of last transaction synchronization
Example: "2025-05-08T14:38:15.920Z"
Whether transactions are currently syncing
true = sync in progress, false = no active sync
Example Response
[
{
"address": "0x6426af179aabebe47666f345d69fd9079673f6cd",
"portfolioLastSync": "2025-05-08T14:43:12.020Z",
"transactionsLastSync": "2025-05-08T14:38:15.920Z",
"syncInProgress": false
}
]
Use Cases
Check Freshness
Wait for Sync
Check if data is fresh enough:async function isDataFresh(address, maxAgeMinutes = 10) {
const response = await fetch(
`https://api.octav.fi/v1/status?addresses=${address}`,
{ headers: { 'Authorization': `Bearer ${apiKey}` } }
);
const [status] = await response.json();
const lastSync = new Date(status.portfolioLastSync);
const now = new Date();
const ageMinutes = (now - lastSync) / 1000 / 60;
return ageMinutes <= maxAgeMinutes;
}
const isFresh = await isDataFresh(address);
if (!isFresh) {
console.log('Data is stale, consider syncing');
}
Wait for sync to complete:async function waitForSync(address, timeoutSeconds = 60) {
const start = Date.now();
while (true) {
const response = await fetch(
`https://api.octav.fi/v1/status?addresses=${address}`,
{ headers: { 'Authorization': `Bearer ${apiKey}` } }
);
const [status] = await response.json();
if (!status.syncInProgress) {
console.log('Sync completed!');
return status;
}
if ((Date.now() - start) / 1000 > timeoutSeconds) {
throw new Error('Sync timeout');
}
await new Promise(resolve => setTimeout(resolve, 2000));
}
}
// Trigger sync then wait
await fetch('https://api.octav.fi/v1/sync-transactions', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ addresses: [address] })
});
await waitForSync(address);
Best Practices
This endpoint costs 0 credits, so call it freely:
- Check before expensive operations
- Monitor sync status
- Verify data freshness
Understanding sync times:
- Portfolio: 1-minute cache
- Transactions: 10-minute cache
- Check
syncInProgress before triggering new sync
Sync Transactions
Trigger manual sync
Credits
Check credit balance (also free)