Skip to content
Recurring Investment

Create or Modify Recurring Investment Plan

Creates a recurring investment plan when plan_id is omitted, or modifies the cycle, debit day, and amount per installment of the plan when it is passed. On success, the plan debits automatically on the chosen cycle and creates one fund buy order per installment. When creating a plan, setting invest_now to true invests the first installment immediately and uses the corresponding cash.

Prerequisites: the trade token is valid; Get Fund Tradable Types has confirmed is_allow_aip is true; Validate Fund Order Risk (user_pi is 2) and Get Fund Order Certification Checks (no is_force item) have been completed; the amount per installment is not below the minimum subscription amount and, when investing immediately, does not exceed limit_amount from Get Fund Purchasing Power; and the Client has accepted the recurring investment agreement. You can call Calculate Next Recurring Investment Debit Time first to show the first debit date.

On failure, the plan is not created or modified. Handle compliance business codes as described and show message to the Client for other errors. Whether the service deduplicates repeated submissions is not confirmed. Prevent repeated taps, and after a timeout, check Get My Recurring Investment Plans before retrying.

When you call this endpoint through WhaleCore requestService(), set requiresTradeToken to true.

POSThttps://api.lbkrs.com/v2/aip/edit

Request body application/x-www-form-urlencoded

plan_idstring

ID of the plan to modify. Pass an empty string when creating

counter_idstringrequired

Fund ID (counter_id)

cycleintegerrequired

Investment cycle:

  • 1 - Daily
  • 2 - Weekly
  • 3 - Every two weeks
  • 4 - Monthly
Values
1
2
3
4
cycle_dayintegerrequired

Debit day: 1-5 (Monday to Friday) for weekly and biweekly cycles; 1-31 for monthly, where 32 means the last day of the month. Not used for the daily cycle

invest_amountstringrequired

Amount per installment in the fund settlement currency

invest_nowboolean

Whether to invest the first installment immediately when creating. Pass false when modifying

Responses

HTTP 200The request succeeded. The response body contains the result of the “Create or modify recurring investment plan” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
plan_idstring

Plan ID. For a new plan, this is the ID of the created plan

HTTP 400The service rejected the request because a business rule or input validation failed. Review the business codes and correct the request before retrying.
codeintegerrequired

Business status code, 0 indicates success

messagestringrequired

Human-readable result or error message.

Whale Docs