Documentation Index
Fetch the complete documentation index at: https://docs.renesis.fi/llms.txt
Use this file to discover all available pages before exploring further.
Token Holdings Management Endpoints
This section covers all token holdings management operations including balance tracking, updates, and bulk operations across both testnet and mainnet Stellar networks.Overview
The token holdings system provides real-time balance tracking for Stellar vaults across multiple tokens and networks. All token operations support both testnet and mainnet environments with automatic network detection and validation.Key Features
- Real-time Balance Updates: Direct integration with Stellar network for accurate balance fetching
- Multi-Network Support: Seamless operation across testnet and mainnet
- Bulk Operations: Efficient batch updates for multiple vaults
- Token Validation: Automatic validation against supported token lists
- Balance History: Track balance changes over time
Supported Networks
- Testnet: Development and testing environment with test tokens
- Mainnet: Production environment with live tokens and assets
POST /api/vaults/:id/update-holdings
Update token holdings for a specific vault by fetching current balances from the Stellar network.Parameters
Path Parameters- id (string, required): MongoDB ObjectId of the vault
- network (string, optional): Target Stellar network -
testnetormainnet(default:mainnet)
- tokens (array, optional): Specific token contracts to update (if omitted, updates all supported tokens)
- forceUpdate (boolean, optional): Force update even if recently updated (default: false)
Request Examples
Update All Supported Tokens (Mainnet)
Update Specific Tokens (Mainnet)
Force Update for Real-time Trading (Mainnet)
Update Holdings on Testnet
Response Examples
Successful Holdings Update (Multiple Tokens)
Single Token Update Response
Testnet Holdings Update Response
Error Responses
400 Bad Request - Invalid Vault IDGET /api/vaults/:id/holdings
Retrieve current token holdings for a specific vault with optional filtering and pagination.Parameters
Path Parameters- id (string, required): MongoDB ObjectId of the vault
- page (number, optional): Page number for pagination (default: 1)
- limit (number, optional): Number of items per page (default: 10, max: 100)
- tokenSymbol (string, optional): Filter by specific token symbol (e.g., “USDC”, “XLM”)
- minBalance (number, optional): Filter holdings with balance greater than this amount
- maxBalance (number, optional): Filter holdings with balance less than this amount
- sortBy (string, optional): Sort field -
balance,tokenSymbol,lastUpdated(default:balance) - sortOrder (string, optional): Sort order -
ascordesc(default:desc) - includeZeroBalances (boolean, optional): Include tokens with zero balance (default: false)
Request Example
Response Example
Error Responses
400 Bad Request - Invalid Vault IDPOST /api/vaults/update-all-holdings
Bulk operation to update token holdings for multiple vaults simultaneously.Parameters
Query Parameters- network (string, optional): Target Stellar network -
testnetormainnet(default:mainnet) - batchSize (number, optional): Number of vaults to process per batch (default: 10, max: 50)
- vaultIds (array, optional): Specific vault IDs to update (if omitted, updates all vaults)
- tokens (array, optional): Specific token contracts to update (if omitted, updates all supported tokens)
- forceUpdate (boolean, optional): Force update even if recently updated (default: false)
- owner (string, optional): Update only vaults owned by this Stellar address
- tradePermissionOnly (boolean, optional): Update only vaults with trade permission enabled (default: false)
Request Example
Response Example
Error Responses
400 Bad Request - Invalid ParametersSupported Token Lists
The API maintains curated lists of supported tokens for each network environment.Mainnet Supported Tokens
Major Tokens- XLM (Stellar Lumens):
CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA - USDC (USD Coin):
CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQAOBKYCYOEZ - USDT (Tether USD):
CCFCXDCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCFCF - AQUA (Aquarius):
CB64D3G7SM2RTH6JSGG34DDTFTQ5CFDKVDZJPKQ3CWBJ2WQXKWBCPO64 - yXLM (Ultra Stellar):
CDKLFZLJLWEO6Y7CCNITMB262N4JWFZR2KOQVUUQRXHX2RGG2BGXOZJM
- MOBI (Mobius):
CD25MNVTZDL4Y3XBCPCJXGXATV5WUHHOWMYFF4YBEGU5FCPGMYTVG5JY - RMT (SureRemit):
CDBLRD2XOHRPX7KQJC4VDCQQ7KGTLYILLO2BKDQCQX7KQJC4VDCQQ7KG - TERN (Ternio):
CDGQCSAFWECEQRCQD6QCHSQBJA3DKDQCQX7KQJC4VDCQQ7KGTLYILLO
- EURT (Euro Tether):
CEURT6TCDJH6Q5MEGJLS3LNGKDNGK6RQCHSQBJA3DKDQCQX7KQJC4VD - ARST (ARST):
CARST6TCDJH6Q5MEGJLS3LNGKDNGK6RQCHSQBJA3DKDQCQX7KQJC4VD
Testnet Supported Tokens
Test Tokens- XLM (Test Lumens):
CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA - USDC (Test USD Coin):
CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQAOBKYCYOEZ - TEST1 (Test Token 1):
CTEST1TCDJH6Q5MEGJLS3LNGKDNGK6RQCHSQBJA3DKDQCQX7KQJC4VD - TEST2 (Test Token 2):
CTEST2TCDJH6Q5MEGJLS3LNGKDNGK6RQCHSQBJA3DKDQCQX7KQJC4VD
- DEV (Development Token):
CDEV6TCDJH6Q5MEGJLS3LNGKDNGK6RQCHSQBJA3DKDQCQX7KQJC4VD - MOCK (Mock Token):
CMOCK6TCDJH6Q5MEGJLS3LNGKDNGK6RQCHSQBJA3DKDQCQX7KQJC4VD
Token List Updates
Token lists are regularly updated to include new supported assets. To request addition of new tokens:- Mainnet Tokens: Must be established tokens with sufficient liquidity and community adoption
- Testnet Tokens: Development and testing tokens for integration purposes
- Validation: All tokens undergo security and compatibility validation
- Network Compatibility: Tokens must be compatible with Stellar network standards
TypeScript Interfaces
Core TokenHolding Interface
Request/Response Interfaces
Example Data Objects
Bulk Update Response Interface
Common Use Cases
Update Holdings for Single Vault (Mainnet)
Update Holdings for Single Vault (Testnet)
Get Holdings with Filtering
Bulk Update All Trade-Enabled Vaults
Bulk Update Specific Vaults
Update Holdings for Specific Owner
Get Holdings Including Zero Balances
Performance Considerations
Rate Limiting
- Token update operations are subject to rate limiting to prevent Stellar network overload
- Bulk operations automatically implement batching to respect rate limits
- Consider using
forceUpdate: falseto avoid unnecessary network calls
Caching Strategy
- Token holdings are cached for 5 minutes by default
- Use
forceUpdate: trueonly when real-time accuracy is critical - Bulk operations optimize network calls by batching requests
Network Selection
- Testnet: Faster response times, suitable for development and testing
- Mainnet: Production environment with real assets, may have higher latency
Best Practices
- Batch Updates: Use bulk operations for updating multiple vaults
- Selective Updates: Specify token contracts to update only needed tokens
- Pagination: Use appropriate page sizes for large holdings lists
- Error Handling: Implement retry logic for network-related failures
- Monitoring: Track update frequencies to optimize performance
Next Steps
- Vault Endpoints - Core vault management operations
- Search & Filtering - Advanced query capabilities
- Error Handling - Error codes and troubleshooting

