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>"
}
'import requests
url = "https://app.digitalsurge.com.au/api/private/broker/schedules/"
payload = {
"asset": "<string>",
"quantity": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({asset: '<string>', quantity: '<string>'})
};
fetch('https://app.digitalsurge.com.au/api/private/broker/schedules/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"asset": "<string>",
"asset_name": "<string>",
"in_discovery_zone": true,
"quantity": "<string>",
"direction": 10,
"start": "2023-11-07T05:31:56Z",
"period": "<string>",
"enabled": true
}Create Recurring Buy
Recurring buys that automatically purchase an asset on a schedule — this is the DCA / scheduled trade flow. For instant one-shot trades, use the swaps endpoints instead.
Set a fixed AUD amount, an asset, and a cadence, and the platform will place the buy at each scheduled time. Changing the cadence resets the next run to the current moment so the new schedule starts immediately, unless a specific start time is provided.
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>"
}
'import requests
url = "https://app.digitalsurge.com.au/api/private/broker/schedules/"
payload = {
"asset": "<string>",
"quantity": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({asset: '<string>', quantity: '<string>'})
};
fetch('https://app.digitalsurge.com.au/api/private/broker/schedules/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"asset": "<string>",
"asset_name": "<string>",
"in_discovery_zone": true,
"quantity": "<string>",
"direction": 10,
"start": "2023-11-07T05:31:56Z",
"period": "<string>",
"enabled": true
}Authorizations
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.
1Amount 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 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 asset20- sell asset
10, 20 0 <= x <= 32767Response
A recurring buy (DCA) schedule: automatically buys a set amount of an asset at a regular interval.
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 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 asset20- sell asset
10, 20 0 <= x <= 32767