Skip to main content

Vault API

Endpoints for managing Trust Vault staking positions.

Get Vault Status

Get current vault statistics.
curl -X GET "https://api.usmewe.com/v1/vault/status"

Get User Position

Get the authenticated user’s vault position.
curl -X GET "https://api.usmewe.com/v1/vault/position" \
  -H "Authorization: Bearer YOUR_TOKEN"

Deposit USDC

Stake USDC into the Trust Vault.
curl -X POST "https://api.usmewe.com/v1/vault/deposit" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000
  }'

Deposit Parameters

ParameterTypeRequiredDescription
amountnumberYesUSDC amount to deposit
You’ll receive tmUSDC based on the current exchange rate. As yield accrues, the exchange rate increases.

Withdraw

Redeem tmUSDC for USDC.
curl -X POST "https://api.usmewe.com/v1/vault/withdraw" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tmUSDCAmount": 500
  }'

Withdraw Parameters

ParameterTypeRequiredDescription
tmUSDCAmountnumberYestmUSDC amount to redeem

Get Yield History

Get historical yield earnings.
curl -X GET "https://api.usmewe.com/v1/vault/yield/history?period=30d" \
  -H "Authorization: Bearer YOUR_TOKEN"

Calculate Potential Yield

Estimate yield for a deposit amount.
curl -X POST "https://api.usmewe.com/v1/vault/yield/calculate" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000,
    "duration": 365
  }'

Get Interest Rate Model

Get current interest rate parameters.
curl -X GET "https://api.usmewe.com/v1/vault/rates"

Get Transaction History

Get vault transaction history.
curl -X GET "https://api.usmewe.com/v1/vault/transactions?limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"

Webhook Events

// Deposit completed
{
  "event": "vault.deposit",
  "data": {
    "userId": "user_abc123",
    "usdcAmount": "1000.00",
    "tmUSDCReceived": "975.61"
  }
}

// Withdrawal completed
{
  "event": "vault.withdraw",
  "data": {
    "userId": "user_abc123",
    "tmUSDCRedeemed": "500.00",
    "usdcReceived": "512.50"
  }
}

// Yield distributed
{
  "event": "vault.yield_distributed",
  "data": {
    "totalYield": "1500.00",
    "newExchangeRate": 1.026
  }
}

Error Responses

CodeErrorDescription
400INSUFFICIENT_BALANCENot enough USDC/tmUSDC
400AMOUNT_TOO_SMALLBelow minimum deposit
400INSUFFICIENT_LIQUIDITYNot enough liquidity
503VAULT_PAUSEDVault temporarily paused