Savings

Create a savings plan

Use this method to create a savings plan based on a specific preset.

POST
/api/v2/my/savings/plans

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/my/savings/plans" \  -H "Content-Type: application/json" \  -d '{    "presetId": "09d5ce50-5fe8-469f-b6c4-c39698f98c22",    "walletId": "4815162342"  }'
{  "data": {    "id": "49825070-d077-419e-bbec-6b9a65381901",    "presetId": "09d5ce50-5fe8-469f-b6c4-c39698f98c22",    "walletId": "4815162342",    "status": "active",    "strategy": "fixed",    "abilities": {      "cancel": true,      "additionalInvestment": false    },    "cancelledAt": "2023-11-17T11:32:01Z",    "createdAt": "2023-11-17T11:30:01Z",    "updatedAt": "2023-11-17T11:30:01Z",    "details": {      "currencyAlpha": "USD",      "investmentAmount": 1000.5,      "admissionFee": 50,      "cancellationPenalty": 100,      "startAt": "2023-11-17T11:30:01Z",      "maturityAt": "2023-11-17T10:30:01Z"    }  }}
{  "error": {    "message": "Unauthorized"  }}
{  "error": {    "message": "Insufficient wallet balance"  }}
{  "error": {    "message": "Service Unavailable"  }}