Skip to main content
POST
Create Recurring Buy

Authorizations

Authorization
string
header
required

Personal API key, created in the Digital Surge app under Account Settings → API Keys. Send it with every request as Authorization: Bearer <your-api-key>.

Body

A recurring buy (DCA) schedule: automatically buys a set amount of an asset at a regular interval.

asset
string
required
Minimum string length: 1
quantity
string<decimal>
required

Amount to trade at each recurrence. When direction = BUY_ASSET, this is the AUD amount to spend buying the asset; when direction = SELL_ASSET, this is the quantity of the asset (in its native units) to sell.

direction
enum<number>
required

Direction of the recurring trade against AUD. BUY_ASSET = spend AUD to buy this schedule's asset on each fire; SELL_ASSET = sell this schedule's asset for AUD on each fire.

  • 10 - buy asset
  • 20 - sell asset
Available options:
10,
20
Required range: 0 <= x <= 32767
start
string<date-time>
period
string
enabled
boolean

Response

201 - application/json

A recurring buy (DCA) schedule: automatically buys a set amount of an asset at a regular interval.

id
integer
required
read-only
asset
string
required
asset_name
string
required
read-only
in_discovery_zone
boolean
required
read-only
quantity
string<decimal>
required

Amount to trade at each recurrence. When direction = BUY_ASSET, this is the AUD amount to spend buying the asset; when direction = SELL_ASSET, this is the quantity of the asset (in its native units) to sell.

direction
enum<number>
required

Direction of the recurring trade against AUD. BUY_ASSET = spend AUD to buy this schedule's asset on each fire; SELL_ASSET = sell this schedule's asset for AUD on each fire.

  • 10 - buy asset
  • 20 - sell asset
Available options:
10,
20
Required range: 0 <= x <= 32767
start
string<date-time>
period
string
enabled
boolean