Sandbox
Sandbox Environment
Test Stackit.ai API endpoints with sandbox credentials before going live. Same endpoints, same safety rails, no real money.
Test Keys vs Live Keys
Test Keys
- Sandbox environment only
- Mock balances and responses
- No real transactions
- Same API structure as production
Live Keys
- Production environment
- Real treasury operations
- Real fees apply
- Issued during onboarding
Get Sandbox Access
Sandbox test keys will be available for self-service sign-up. In the meantime, book a Treasury Design Call to get early access to the sandbox environment.
How to get test keys
- Book a Treasury Design Call at stackit.ai/meet
- Request sandbox access during onboarding
- Receive
sk_test_*credentials via email - Start testing against
sandbox.api.stackit.ai
Base URL
https://api.stackit.ai
https://sandbox.api.stackit.ai
All endpoints work identically in both environments. Only the base URL and key prefix differ.
Test Scenarios
Deposit Flow
Test a full deposit cycle: create deposit, verify allocation, check treasury status.
// 1. Create a test deposit
const deposit = await fetch('https://sandbox.api.stackit.ai/api/v1/deposits', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
amount: 10000,
allocation: { btc: 60, eth: 40 },
}),
}).then(r => r.json());
console.log(deposit.deposit_id); // "dep_test_abc123"
console.log(deposit.fee_usdc); // 200
console.log(deposit.net_amount); // 9800
// 2. Check treasury after deposit
const treasury = await fetch('https://sandbox.api.stackit.ai/api/v1/treasury', {
headers: { 'Authorization': 'Bearer sk_test_your_key' },
}).then(r => r.json());
console.log(treasury.holdings); // Updated balancesBorrowing Limits
Test LTV enforcement: try borrowing within limits and verify rejection when exceeding the configured LTV ceiling (default 60%).
// 1. Check current health
const health = await fetch('https://sandbox.api.stackit.ai/api/v1/health', {
headers: { 'Authorization': 'Bearer sk_test_your_key' },
}).then(r => r.json());
console.log(health.ltv); // 36.5
console.log(health.ltv_zone); // "active"
// 2. Borrow within safe range — should succeed
const safeBorrow = await fetch('https://sandbox.api.stackit.ai/api/v1/borrow', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ amount: 5000 }),
}).then(r => r.json());
console.log(safeBorrow.status); // "approved"
// 3. Borrow that would exceed ceiling — should return 403
const unsafeBorrow = await fetch('https://sandbox.api.stackit.ai/api/v1/borrow', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ amount: 999999 }),
});
console.log(unsafeBorrow.status); // 403 — LTV ceiling enforcedHealth Monitoring
Test health score polling and LTV zone transitions for agent monitoring workflows.
// Poll health score — typical agent monitoring loop
async function monitorHealth() {
const health = await fetch('https://sandbox.api.stackit.ai/api/v1/health', {
headers: { 'Authorization': 'Bearer sk_test_your_key' },
}).then(r => r.json());
console.log(`Health: ${health.health_score}`);
console.log(`LTV: ${health.ltv}% (${health.ltv_zone})`);
console.log(`Auto-repay: ${health.auto_repay_active}`);
// Alert conditions
if (health.health_score < 70) {
console.warn('Health score below 70 — attention needed');
}
if (health.ltv > 48) {
console.warn('LTV approaching ceiling — consider repayment');
}
}Sandbox Limitations
No real transactions
All deposits, borrows, and conversions are simulated.
Mock balances
Sandbox accounts start with pre-set BTC, ETH, and USDC balances.
Static rates
Aave rates and DEX spreads are fixed mock values.
No webhooks yet
Webhook delivery is not available in sandbox (coming soon).
Ready to test?
Book a Treasury Design Call to get sandbox access and start building.