Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Recurring Buy Plans

Read a wallet's recurring-buy plans and the execution row for each scheduled date. Create a plan and prefund the shared balance on Recurring Buys.

A non-trading day or a failed estimate appears only on the execution list. It does not become a subscription in the fund ledger. The public weekly simulation, which is not tied to a wallet, is DCA history.

List plans

GET /users/{address}/recurring-buys

curl "https://mainnet-gw.sodex.dev/api/v1/wealth/users/0x1111111111111111111111111111111111111111/recurring-buys?status=active" \
  -H "Accept: application/json"
Name
Location
Type
Required
Description

address

path

string

Yes

User EVM address.

status

query

string

No

active or history. Default active.

active includes plans that are running or paused. history includes only cancelled plans. Cancelling a plan does not erase its index.

availableAssets is the shared deposit balance, not the amount already used by one plan.

Field
Type
Description

address

string

Wallet address.

availableAssets

string, optional

Shared deposit balance.

plans

array

Matching plans.

Plan field
Type
Description

chainId

string

Chain id.

dcaAddress

string

DCA contract address.

planIndex

string

Plan index. Stable across cancellation.

fundId

string, optional

Fund identifier.

target

string

Target token or fund.

amount

string

Amount contributed each period.

planType

string

DAILY, WEEKLY, BI_WEEKLY, or MONTHLY.

dayOfPeriod

integer

Day within the period.

createdAt

string

Creation time.

status

string

ACTIVE, PAUSED, or CANCELLED.

successfulExecutionCount

integer

Executions that completed.

nextScheduledAt

string, optional

Next scheduled time.

share

object

Share token: coin, address, decimals.

totalBuyAmount

string

Cumulative amount spent.

totalBuyShares

string

Cumulative shares bought.

avgCost

string, optional

Average cost.

processingAmount

string

Amount currently processing.

processingAmountEstimated

string, optional

Estimated processing amount.

statisticsComplete

boolean

Whether the totals are complete.

totalsAllocated

boolean

Whether totals have been allocated.

anomalyCount

integer

Count of anomalous executions.

Plan executions

GET /users/{address}/recurring-buys/{planIndex}/executions

One row per scheduled local date. Retries on the same day stay on that row. The newest date comes first. When two deployments share a plan index, pass dcaAddress to choose one.

Name
Location
Type
Required
Description

address

path

string

Yes

User EVM address.

planIndex

path

string

Yes

Plan index from the plan list.

dcaAddress

query

string

No

DCA contract. Required to choose between two deployments that share a plan index.

Field
Type
Description

address

string

Wallet address.

chainId

string

Chain id.

dcaAddress

string

DCA contract address.

planIndex

string

Plan index.

executions

array

Newest date first.

Execution field
Type
Description

scheduledLocalDate

string

Scheduled local date.

scheduledAt

string, optional

Scheduled time.

status

string

Execution status.

reasonCode

string, optional

Machine-readable reason.

message

string, optional

Reason text.

amount

string

Amount for this date.

attemptedAt

string, optional

When execution was attempted.

executedAt

string, optional

When execution completed.

txHash

string, optional

Transaction hash.

intentId

string, optional

Intent id.

vaultRequestId

string, optional

Vault request id.

finalSharesRaw

string, optional

Shares received, in the token's native integer units.

destination

integer, optional

0 EVM, 1 SPOT, 2 PERP.

Last updated