1. Get live prices (no auth required)
Public market data works without an account. Fetch the current buy/sell price for every tradeable asset:
curl "https://app.digitalsurge.com.au/api/public/broker/ticker/"
The returned prices are indicative — for a binding price, request a swap estimate (step 4).
2. Create an API key
Private endpoints need an API key:
Log in to the Digital Surge app .
Go to Account Settings → API Keys .
Choose Read Only (portfolio access) or Read & Write (can also trade and withdraw).
Confirm with your two-factor code, then copy the key immediately — it is shown only once.
See Authentication for details and key-safety guidance.
3. Read your balances
Send the key as a Bearer token:
curl "https://app.digitalsurge.com.au/api/private/balances/" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"count" : 1 ,
"next" : null ,
"previous" : null ,
"results" : [
{
"total" : { "AUD" : "1500.50" , "BTC" : "0.02500000" },
"available" : { "AUD" : "1500.50" , "BTC" : "0.02500000" },
"withdrawable" : { "AUD" : "1500.50" , "BTC" : "0.02500000" }
}
]
}
All monetary amounts are returned as strings — parse them with a decimal type, never a float. See Conventions .
4. Quote a swap
Swaps are how you trade on Digital Surge: AUD → crypto is a buy, crypto → AUD is a sell. Always estimate first — the estimate is your binding quote:
curl -X POST "https://app.digitalsurge.com.au/api/private/swaps/estimate/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"src_asset": "AUD",
"dst_asset": "BTC",
"req_spend_amount": "100.00"
}'
The response includes estimated_price_exact and the fees you’d pay.
5. Execute the swap
This places a real order with real funds.
Pass the same parameters plus expected_price from the estimate — if the market moves beyond tolerance, the swap is rejected instead of filling at a worse price:
curl -X POST "https://app.digitalsurge.com.au/api/private/swaps/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"src_asset": "AUD",
"dst_asset": "BTC",
"req_spend_amount": "100.00",
"expected_price": "ESTIMATED_PRICE_EXACT_FROM_STEP_4"
}'
The response returns the swap id with status: "processing". Poll GET /api/private/swaps/{id}/ about once per second (up to ~10 seconds) until the status becomes processed.
Next steps
API Reference Withdrawals, recurring buys, price triggers, transaction history, and more.
Connect an AI agent Skip the code entirely — let Claude or another agent use your account via MCP.