Appearance
API Reference
The Rhadow API provides real-time vault statistics.
Base URL
https://api.rhadow.xyzEndpoints
Health Check
GET /healthReturns 200 OK if service is running.
Vault Stats
GET /statsResponse:
json
{
"tvl": "1000000000000",
"tvl_formatted": 1000000.0,
"apr": 18.5,
"funding_rate": 0.000015,
"wbtc_balance": "950000000",
"wbtc_balance_formatted": 9.5,
"wbtc_value_usdc": "399000000000",
"wbtc_value_usdc_formatted": 399000.0,
"idle_usdc": "201000000000",
"idle_usdc_formatted": 201000.0,
"short_margin": "400000000000",
"short_margin_formatted": 400000.0,
"btc_price": "42000000000",
"btc_price_formatted": 42000.0,
"short_size": 9.5,
"short_entry_price": 41500.0,
"short_unrealized_pnl": 4750.0,
"short_leverage": 1.0,
"short_liquidation_price": 0.0
}| Field | Description |
|---|---|
tvl | Total value locked (6 decimals) |
apr | Annualized return % |
funding_rate | Current hourly rate |
wbtc_balance | Spot BTC held (8 decimals) |
idle_usdc | Liquid USDC in vault |
short_margin | USDC on Extended |
short_size | BTC amount short |
short_unrealized_pnl | Perp position PnL |
User Position
GET /user/{address}Parameters:
| Name | Type | Description |
|---|---|---|
address | string | Starknet address (hex) |
Response:
json
{
"address": "0x033e8faea82377fa5ef65c12fcb7871a4dd1f5bf477435c80b85c27ec00e9aab",
"shares_balance": "50000000000",
"shares_balance_formatted": 50000.0,
"value_usdc": "51500000000",
"value_usdc_formatted": 51500.0
}| Field | Description |
|---|---|
shares_balance | rUSDC shares owned (6 decimals) |
value_usdc | Current USDC value |
