GET Notional Cap
/notional_cap
/notional_cap/{symbol_id}https://base-hedger82.rasa.capital/notional_cap/1{
"total_cap": "2344336.83177192369792522000000000",
"used": "17746.15500000000000000000000000"
}Data Source
Notional Cap Implementation (Rasa)
Router
@common_router.get(
'/notional_cap/{symbol_id}',
responses={status.HTTP_200_OK: {"model": OpenInterestResponseSchema}},
response_model=OpenInterestResponseSchema,
dependencies=[
Depends(CustomRateLimiter(times=1, seconds=1)),
Depends(CustomRateLimiter(times=40, minutes=1)),
Depends(CustomRateLimiter(times=1500, hours=1)),
]
)
@with_context_db_session
async def get_notional_cap(symbol_id: int):
symbol_id_validator(symbol_id)
total_cap, used = await OpenCapEngine.get_cap_and_used_amount_async(symbol_id, from_stats=True)
apm.label(total_cap=total_cap, used=used)
return {"total_cap": total_cap, "used": used}
Logic
Steps to Implement Your Own Version
Last updated
