curl --request GET \
--url https://app.digitalsurge.com.au/api/private/swaps/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.digitalsurge.com.au/api/private/swaps/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.digitalsurge.com.au/api/private/swaps/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"count": 123,
"results": [
{
"id": 123,
"status": 5,
"src_asset": "<string>",
"dst_asset": "<string>",
"bought_amount": "<string>",
"sold_amount": "<string>",
"src_fee": "<string>",
"dst_fee": "<string>",
"aud_value": "<string>",
"req_get_amount": "<string>",
"req_spend_amount": "<string>",
"expected_price": "<string>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}List Swaps
Swap one asset directly for another at the current market price — this is the instant / one-shot trade flow. For recurring or scheduled buys (DCA), use the broker schedules endpoints instead.
Direction is implied by which asset is AUD:
- BUY a crypto:
src_asset="AUD",dst_asset=<crypto code> - SELL a crypto:
src_asset=<crypto code>,dst_asset="AUD"
Listing returns swap history, most recent first. Retrieving by
id returns the current state of a single swap — used after
create to check whether status has moved from
processing to processed, error, or canceled.
Placing a new swap is a two-step flow: estimate first to
preview price, fees, and amounts, ask the user to confirm, then
create to execute.
See the per-operation documentation for details.
curl --request GET \
--url https://app.digitalsurge.com.au/api/private/swaps/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.digitalsurge.com.au/api/private/swaps/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.digitalsurge.com.au/api/private/swaps/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"count": 123,
"results": [
{
"id": 123,
"status": 5,
"src_asset": "<string>",
"dst_asset": "<string>",
"bought_amount": "<string>",
"sold_amount": "<string>",
"src_fee": "<string>",
"dst_fee": "<string>",
"aud_value": "<string>",
"req_get_amount": "<string>",
"req_spend_amount": "<string>",
"expected_price": "<string>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}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>.
Query Parameters
A page number within the paginated result set.
Number of results to return per page.