{"format":"opendoc-document","version":1,"url":"https://docs.storm.tg/developers/operations/getvaultrates","title":"Get vault rate history","description":"GET /api/vaults/{vault}/rates/{timeframe}: Get vault rate history","kind":"api-operation","locale":"en","inLanguage":"en","lastModified":"2026-10-09T14:26:32+03:00","revision":"d36475e7b456c737fae6933fa27b7e1bc2687f2c19291b05725ab2c4e8f79d7a","section":{"title":"For Developers","url":"https://docs.storm.tg/developers"},"representations":{"html":"https://docs.storm.tg/developers/operations/getvaultrates","markdown":"https://docs.storm.tg/developers/operations/getvaultrates.md","json":"https://docs.storm.tg/developers/operations/getvaultrates.json"},"translations":{"en":"https://docs.storm.tg/developers/operations/getvaultrates"},"operation":{"id":"GetVaultRates","method":"GET","path":"/api/vaults/{vault}/rates/{timeframe}","summary":"Get vault rate history","tags":["Vaults and liquidity"],"deprecated":false,"parameters":[{"name":"vault","location":"path","schema":{"type":"string","types":["string"],"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string","required":true,"example":"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660"},{"name":"timeframe","location":"path","schema":{"type":"string · enum","types":["string"],"enum":["week","month","year"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"string · enum","required":true,"example":"week"}],"bodies":[],"responses":[{"status":"200","description":"Response","mediaType":"application/json","properties":[{"name":"roiPercentage","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"history","type":"object[]","required":true,"example":"[\n  {\n    \"timestamp\": \"2026-01-01T00:00:00Z\",\n    \"value\": \"0\",\n    \"balance\": \"0\"\n  }\n]","schema":{"type":"object[]","types":["array"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"timestamp","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"value","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"balance","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}}],"variants":[]},"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/Data.VaultRatesResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"roiPercentage","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"history","type":"object[]","required":true,"example":"[\n  {\n    \"timestamp\": \"2026-01-01T00:00:00Z\",\n    \"value\": \"0\",\n    \"balance\": \"0\"\n  }\n]","schema":{"type":"object[]","types":["array"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"timestamp","type":"string · date-time","required":true,"example":"2026-01-01T00:00:00Z","schema":{"type":"string · date-time","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"date-time"},"properties":[],"variants":[]}},{"name":"value","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}},{"name":"balance","type":"string · int64","required":true,"example":"0","schema":{"type":"string · int64","types":["string"],"example":"0","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int64","pattern":"^(0|-?[1-9][0-9]*)$"},"properties":[],"variants":[]}}],"variants":[]},"variants":[]}}],"variants":[]},"example":"{\n  \"roiPercentage\": \"0\",\n  \"history\": [\n    {\n      \"timestamp\": \"2026-01-01T00:00:00Z\",\n      \"value\": \"0\",\n      \"balance\": \"0\"\n    }\n  ]\n}","headers":[]}],"security":[],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.storm.tg/api/vaults/{vault}/rates/{timeframe}' \\\n  --header 'Accept: application/json'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.storm.tg/api/vaults/{vault}/rates/{timeframe}\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\"\n  },\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.storm.tg/api/vaults/{vault}/rates/{timeframe}\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"⚡ About Storm Trade","url":"https://docs.storm.tg"},{"title":"For Developers","url":"https://docs.storm.tg/developers"},{"title":"Get vault rate history","url":"https://docs.storm.tg/developers/operations/getvaultrates"}],"headings":[{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Get vault rate history\n\n`GET /api/vaults/{vault}/rates/{timeframe}`\n\n## Authorization\n\n\n\n## Parameters\n\n- path: vault (string; required). \n\nType: string\n\nExample: \"0:72c310c83de5060d21674d58379b9a153854338a63d82588f8d912f83a3f8660\"\n\n- path: timeframe (string · enum; required). \n\nType: string · enum\n\nAllowed values: [\"week\",\"month\",\"year\"]\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.storm.tg/api/vaults/{vault}/rates/{timeframe}' \\\n  --header 'Accept: application/json'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.storm.tg/api/vaults/{vault}/rates/{timeframe}\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\"\n  },\n});\nconsole.log(response.status, await response.text());\n```\n\n## Example · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.storm.tg/api/vaults/{vault}/rates/{timeframe}\",\n    headers={\"Accept\":\"application/json\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n## Response 200 · Data.VaultRatesResponse\n\n**200** application/json — Response\n\nSchema: Data.VaultRatesResponse\n\nType: object\n\nRequired fields: roiPercentage, history\n\nRequired field types: roiPercentage (string · int64; required), history (object[]; required)\n\n- roiPercentage (string · int64; required)\n\nroiPercentage example: 0\n\nroiPercentage.Type: string · int64\n\nroiPercentage.format: int64\n\nroiPercentage.pattern: ^(0|-?[1-9][0-9]*)$\n\n- history (object[]; required)\n\nhistory example: [\n  {\n    \"timestamp\": \"2026-01-01T00:00:00Z\",\n    \"value\": \"0\",\n    \"balance\": \"0\"\n  }\n]\n\nhistory.Type: object[]\n\nhistory.[]Type: object\n\nhistory.[]Required fields: timestamp, value, balance\n\nhistory.[]Required field types: timestamp (string · date-time; required), value (string · int64; required), balance (string · int64; required)\n\n- history.[]timestamp (string · date-time; required)\n\nhistory.[]timestamp example: 2026-01-01T00:00:00Z\n\nhistory.[]timestamp.Type: string · date-time\n\nhistory.[]timestamp.format: date-time\n\n- history.[]value (string · int64; required)\n\nhistory.[]value example: 0\n\nhistory.[]value.Type: string · int64\n\nhistory.[]value.format: int64\n\nhistory.[]value.pattern: ^(0|-?[1-9][0-9]*)$\n\n- history.[]balance (string · int64; required)\n\nhistory.[]balance example: 0\n\nhistory.[]balance.Type: string · int64\n\nhistory.[]balance.format: int64\n\nhistory.[]balance.pattern: ^(0|-?[1-9][0-9]*)$\n\nExample\n\n\n\n```json\n{\n  \"roiPercentage\": \"0\",\n  \"history\": [\n    {\n      \"timestamp\": \"2026-01-01T00:00:00Z\",\n      \"value\": \"0\",\n      \"balance\": \"0\"\n    }\n  ]\n}\n```","text":"Get vault rate history GET /api/vaults/{vault}/rates/{timeframe} Vaults and liquidity vault string timeframe string · enum 200 Response roiPercentage string · int64 history object[]","api":{"title":"Storm API reference","version":"3.0","documentation":"https://docs.storm.tg/developers/overview","playgroundServer":"https://api.storm.tg"}}