# Savings Plans

## Create Savings Plan

> Create a savings plan for a customer. The operation is asynchronous.

```json
{"openapi":"3.0.1","info":{"title":"Savings Plans","version":"1.0"},"tags":[{"name":"Savings Plans","description":"Savings Plans"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","refreshUrl":"","scopes":{}}}}},"schemas":{"SavingsPlanResult":{"title":"SavingsPlanResult","type":"object","description":"The result of creating a savings plan.","required":["uuid"],"properties":{"uuid":{"type":"string","format":"uuid","description":"The UUID of the newly created savings plan."}}},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"SavingsPlanData":{"title":"SavingsPlanData","type":"object","description":"Savings plan creation model.","required":["instrumentType","instrumentIdentifier","savingsAmount","currency","intervalPeriod","intervalDay","liquidityCustomerProductId","savingsCustomerProductId"],"properties":{"instrumentType":{"$ref":"#/components/schemas/InstrumentTypeEnum"},"instrumentIdentifier":{"type":"string","description":"Instrument identifier. For DIGITAL_ASSET this is the crypto symbol (e.g. BTC). For TRADITIONAL_ASSET this is the ISIN (e.g. US38259P5089)."},"savingsAmount":{"type":"string","description":"The amount to invest on each savings plan execution. Uses decimal string to avoid floating point precision issues."},"currency":{"type":"string","description":"Currency code in ISO 4217 format."},"intervalPeriod":{"$ref":"#/components/schemas/SavingsPlanIntervalPeriodEnum"},"intervalDay":{"$ref":"#/components/schemas/SavingsPlanIntervalDayEnum"},"liquidityCustomerProductId":{"type":"string","format":"uuid","description":"The customer product ID of the liquidity account (product_id = 8) used to fund the savings plan."},"savingsCustomerProductId":{"type":"string","format":"uuid","description":"The customer product ID of the savings account. Must be product_id = 2 for DIGITAL_ASSET or product_id = 15 for TRADITIONAL_ASSET."}}},"InstrumentTypeEnum":{"title":"InstrumentTypeEnum","enum":["DIGITAL_ASSET","TRADITIONAL_ASSET"],"description":"The type of instrument for the savings plan."},"SavingsPlanIntervalPeriodEnum":{"title":"SavingsPlanIntervalPeriodEnum","enum":["MONTH"],"description":"The interval period for savings plan execution."},"SavingsPlanIntervalDayEnum":{"title":"SavingsPlanIntervalDayEnum","enum":["1","16"],"type":"string","description":"The day of the interval period on which the savings plan executes."}}},"paths":{"/savings-plans":{"post":{"summary":"Create Savings Plan","operationId":"create-savings-plan","tags":["Savings Plans"],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsPlanResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Create a savings plan for a customer. The operation is asynchronous.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsPlanData"}}}}}}}}
```

## Get Savings Plan

> Get a savings plan by its ID. Returns 404 if the plan has been deleted.

```json
{"openapi":"3.0.1","info":{"title":"Savings Plans","version":"1.0"},"tags":[{"name":"Savings Plans","description":"Savings Plans"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","refreshUrl":"","scopes":{}}}}},"schemas":{"SavingsPlan":{"type":"object","properties":{"savingPlanId":{"type":"string","format":"uuid","description":"Unique identifier of the savings plan."},"customerId":{"type":"string","format":"uuid","description":"Unique identifier of the customer who owns this savings plan."},"status":{"$ref":"#/components/schemas/SavingsPlanStatusEnum"},"createdOn":{"type":"string","format":"date-time","description":"When this savings plan was created."},"modifiedOn":{"type":"string","format":"date-time","description":"When this savings plan was last updated."},"instrumentType":{"$ref":"#/components/schemas/InstrumentTypeEnum"},"instrumentIdentifier":{"type":"string","description":"Instrument identifier. For DIGITAL_ASSET this is the crypto symbol (e.g. BTC). For TRADITIONAL_ASSET this is the ISIN (e.g. US38259P5089)."},"savingsAmount":{"type":"string","description":"The amount to invest on each savings plan execution. Uses decimal string to avoid floating point precision issues."},"currency":{"type":"string","description":"Currency code in ISO 4217 format."},"intervalPeriod":{"$ref":"#/components/schemas/SavingsPlanIntervalPeriodEnum"},"intervalDay":{"$ref":"#/components/schemas/SavingsPlanIntervalDayEnum"},"liquidityCustomerProductId":{"type":"string","format":"uuid","description":"The customer product ID of the liquidity account (product_id = 8) used to fund the savings plan."},"savingsCustomerProductId":{"type":"string","format":"uuid","description":"The customer product ID of the savings account. Must be product_id = 2 for DIGITAL_ASSET or product_id = 15 for TRADITIONAL_ASSET."}},"required":["createdOn","currency","customerId","instrumentIdentifier","instrumentType","intervalDay","intervalPeriod","liquidityCustomerProductId","modifiedOn","savingPlanId","savingsAmount","savingsCustomerProductId","status"],"title":"SavingsPlan","description":"Single savings plan model."},"SavingsPlanStatusEnum":{"title":"SavingsPlanStatusEnum","enum":["ACTIVE","INACTIVE","PENDING","DELETED"],"description":"The current status of the savings plan."},"InstrumentTypeEnum":{"title":"InstrumentTypeEnum","enum":["DIGITAL_ASSET","TRADITIONAL_ASSET"],"description":"The type of instrument for the savings plan."},"SavingsPlanIntervalPeriodEnum":{"title":"SavingsPlanIntervalPeriodEnum","enum":["MONTH"],"description":"The interval period for savings plan execution."},"SavingsPlanIntervalDayEnum":{"title":"SavingsPlanIntervalDayEnum","enum":["1","16"],"type":"string","description":"The day of the interval period on which the savings plan executes."},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/savings-plans/{savingPlanId}":{"get":{"summary":"Get Savings Plan","operationId":"get-savings-plan","tags":["Savings Plans"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsPlan"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Get a savings plan by its ID. Returns 404 if the plan has been deleted."}}}}
```

## Delete Savings Plan

> Soft delete a savings plan by its ID. Sets deletedAt timestamp. Deleted plans are excluded from GET responses.

```json
{"openapi":"3.0.1","info":{"title":"Savings Plans","version":"1.0"},"tags":[{"name":"Savings Plans","description":"Savings Plans"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","refreshUrl":"","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/savings-plans/{savingPlanId}":{"delete":{"summary":"Delete Savings Plan","operationId":"delete-savings-plan","tags":["Savings Plans"],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Soft delete a savings plan by its ID. Sets deletedAt timestamp. Deleted plans are excluded from GET responses."}}}}
```

## Update Savings Plan

> Update a savings plan by its ID. Cannot update a deleted savings plan.

```json
{"openapi":"3.0.1","info":{"title":"Savings Plans","version":"1.0"},"tags":[{"name":"Savings Plans","description":"Savings Plans"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","refreshUrl":"","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"SavingsPlanUpdate":{"title":"SavingsPlanUpdate","type":"object","description":"Savings plan update model. Used to toggle between ACTIVE and INACTIVE status.","properties":{"status":{"$ref":"#/components/schemas/SavingsPlanToggleStatusEnum"}}},"SavingsPlanToggleStatusEnum":{"title":"SavingsPlanToggleStatusEnum","enum":["ACTIVE","INACTIVE"],"description":"The target status when toggling a savings plan."}}},"paths":{"/savings-plans/{savingPlanId}":{"patch":{"summary":"Update Savings Plan","operationId":"patch-savings-plan","tags":["Savings Plans"],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Update a savings plan by its ID. Cannot update a deleted savings plan.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsPlanUpdate"}}}}}}}}
```

## Get Customer Savings Plans

> Get all savings plans for a customer. Deleted plans are excluded.

```json
{"openapi":"3.0.1","info":{"title":"Savings Plans","version":"1.0"},"tags":[{"name":"Savings Plans","description":"Savings Plans"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"","refreshUrl":"","scopes":{}}}}},"schemas":{"SavingsPlans":{"title":"SavingsPlans","type":"object","description":"List of savings plans returned.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SavingsPlan"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"SavingsPlan":{"type":"object","properties":{"savingPlanId":{"type":"string","format":"uuid","description":"Unique identifier of the savings plan."},"customerId":{"type":"string","format":"uuid","description":"Unique identifier of the customer who owns this savings plan."},"status":{"$ref":"#/components/schemas/SavingsPlanStatusEnum"},"createdOn":{"type":"string","format":"date-time","description":"When this savings plan was created."},"modifiedOn":{"type":"string","format":"date-time","description":"When this savings plan was last updated."},"instrumentType":{"$ref":"#/components/schemas/InstrumentTypeEnum"},"instrumentIdentifier":{"type":"string","description":"Instrument identifier. For DIGITAL_ASSET this is the crypto symbol (e.g. BTC). For TRADITIONAL_ASSET this is the ISIN (e.g. US38259P5089)."},"savingsAmount":{"type":"string","description":"The amount to invest on each savings plan execution. Uses decimal string to avoid floating point precision issues."},"currency":{"type":"string","description":"Currency code in ISO 4217 format."},"intervalPeriod":{"$ref":"#/components/schemas/SavingsPlanIntervalPeriodEnum"},"intervalDay":{"$ref":"#/components/schemas/SavingsPlanIntervalDayEnum"},"liquidityCustomerProductId":{"type":"string","format":"uuid","description":"The customer product ID of the liquidity account (product_id = 8) used to fund the savings plan."},"savingsCustomerProductId":{"type":"string","format":"uuid","description":"The customer product ID of the savings account. Must be product_id = 2 for DIGITAL_ASSET or product_id = 15 for TRADITIONAL_ASSET."}},"required":["createdOn","currency","customerId","instrumentIdentifier","instrumentType","intervalDay","intervalPeriod","liquidityCustomerProductId","modifiedOn","savingPlanId","savingsAmount","savingsCustomerProductId","status"],"title":"SavingsPlan","description":"Single savings plan model."},"SavingsPlanStatusEnum":{"title":"SavingsPlanStatusEnum","enum":["ACTIVE","INACTIVE","PENDING","DELETED"],"description":"The current status of the savings plan."},"InstrumentTypeEnum":{"title":"InstrumentTypeEnum","enum":["DIGITAL_ASSET","TRADITIONAL_ASSET"],"description":"The type of instrument for the savings plan."},"SavingsPlanIntervalPeriodEnum":{"title":"SavingsPlanIntervalPeriodEnum","enum":["MONTH"],"description":"The interval period for savings plan execution."},"SavingsPlanIntervalDayEnum":{"title":"SavingsPlanIntervalDayEnum","enum":["1","16"],"type":"string","description":"The day of the interval period on which the savings plan executes."},"Pagination":{"title":"Pagination","type":"object","properties":{"cursor":{"type":"string","description":"String value used for pagination, which should be set in next page request."},"limit":{"type":"integer","description":"Maximum number of returned items"}},"required":["cursor","limit"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/customers/{customerId}/savings-plans":{"get":{"summary":"Get Customer Savings Plans","operationId":"get-customer-savings-plans","tags":["Savings Plans"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsPlans"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Get all savings plans for a customer. Deleted plans are excluded.","parameters":[{"schema":{"$ref":"#/components/schemas/SavingsPlanStatusEnum"},"in":"query","name":"status","description":"Filter by savings plan status"},{"schema":{"$ref":"#/components/schemas/InstrumentTypeEnum"},"in":"query","name":"instrumentType","description":"Filter by instrument type"},{"schema":{"type":"string"},"in":"query","name":"instrumentIdentifier","description":"Filter by instrument identifier (ISIN or crypto symbol)"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"liquidityCustomerProductId","description":"Filter by liquidity customer product ID"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"savingsCustomerProductId","description":"Filter by savings customer product ID"}]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tradevest.ai/api-reference/asset-management/savings-plans.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
