# Throttle

## POST /start\_throttle

> Try to turn on throttle mode

```json
{"openapi":"3.0.3","info":{"title":"emily-openapi-spec","version":"0.1.0"},"servers":[{"url":"http://localhost:3031","description":"Local Emily server"},{"url":"https://sbtc-emily.com","description":"Production Emily server"},{"url":"https://temp.sbtc-emily-dev.com","description":"Testnet Emily server"}],"paths":{"/start_throttle":{"post":{"tags":["throttle"],"summary":"Try to turn on throttle mode","operationId":"startThrottle","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThrottleRequest"}}},"required":true},"responses":{"200":{"description":"Throttle started successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Limits"}}}},"403":{"description":"Key is revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Throttle key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ThrottleRequest":{"type":"object","description":"Represents the throttle reqwest","required":["name","secret"],"properties":{"name":{"type":"string","description":"The name of the key."},"secret":{"type":"string","description":"The secret associated with this key."}}},"Limits":{"type":"object","description":"Represents the current sBTC limits.","required":["accountCaps"],"properties":{"accountCaps":{"type":"object","description":"Represents the individual limits for requests coming from different accounts.","additionalProperties":{"$ref":"#/components/schemas/AccountLimits"}},"availableToWithdraw":{"type":"integer","format":"int64","description":"Total amount sBTC still available for withdrawals in current window. All withdrawals except rejected\ncounted here","nullable":true,"minimum":0},"pegCap":{"type":"integer","format":"int64","description":"Represents the total cap for all pegged-in BTC/sBTC.","nullable":true,"minimum":0},"perDepositCap":{"type":"integer","format":"int64","description":"Per deposit cap. If none then there is no cap.","nullable":true,"minimum":0},"perDepositMinimum":{"type":"integer","format":"int64","description":"Per deposit minimum. If none then there is no minimum.","nullable":true,"minimum":0},"perWithdrawalCap":{"type":"integer","format":"int64","description":"Per withdrawal cap. If none then there is no cap.","nullable":true,"minimum":0},"rollingWithdrawalBlocks":{"type":"integer","format":"int64","description":"Number of blocks that define the rolling withdrawal window.","nullable":true,"minimum":0},"rollingWithdrawalCap":{"type":"integer","format":"int64","description":"Maximum total sBTC that can be withdrawn within the rolling withdrawal window.","nullable":true,"minimum":0},"throttleModeInitiator":{"type":"string","description":"Name of key which triggered throttle mode (if throttle mode is active)","nullable":true}}},"AccountLimits":{"type":"object","description":"The representation of a limit for a specific account.","properties":{"pegCap":{"type":"integer","format":"int64","description":"Represents the current sBTC limits.","nullable":true,"minimum":0},"perDepositCap":{"type":"integer","format":"int64","description":"Per deposit cap. If none then the cap is the same as the global per deposit cap.","nullable":true,"minimum":0},"perDepositMinimum":{"type":"integer","format":"int64","description":"Per deposit minimum. If none then there is no minimum.","nullable":true,"minimum":0},"perWithdrawalCap":{"type":"integer","format":"int64","description":"Per withdrawal cap. If none then the cap is the same as the global per withdrawal cap.","nullable":true,"minimum":0},"rollingWithdrawalBlocks":{"type":"integer","format":"int64","description":"Number of blocks that define the rolling withdrawal window.","nullable":true,"minimum":0},"rollingWithdrawalCap":{"type":"integer","format":"int64","description":"Maximum total sBTC that can be withdrawn within the rolling withdrawal window.","nullable":true,"minimum":0},"throttleModeInitiator":{"type":"string","description":"Throttle key initiated throttle","nullable":true}}},"ErrorResponse":{"type":"object","description":"Structure representing an error response\nThis is used to serialize error messages in HTTP responses","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```
