Skip to main content
POST
/
api
/
private
/
broker
/
schedules
/
Create Recurring Buy
curl --request POST \
  --url https://app.digitalsurge.com.au/api/private/broker/schedules/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "asset": "<string>",
  "quantity": "<string>"
}
'
{
  "id": 123,
  "asset": "<string>",
  "asset_name": "<string>",
  "in_discovery_zone": true,
  "quantity": "<string>",
  "start": "2023-11-07T05:31:56Z",
  "period": "<string>",
  "enabled": true
}

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