Skip to content
🔑 DPX is in private beta. Settlement execution requires approval — request access. All other APIs are live and free to use in sandbox mode.

Agent Quick Start

DPX is designed for autonomous agents. No sales process. No onboarding call. An agent can discover DPX, get a binding fee quote, verify it on-chain, and execute a settlement in a single loop.

Beta: The examples below use localhost (self-hosted). Approved beta partners receive hosted production URLs. Request access →

  • Both oracles running — see Run the Oracles
  • For on-chain settlement: ROUTER_ADDRESS and SETTLER_PRIVATE_KEY in .env
Terminal window
GET localhost:3000/manifest

Returns capabilities, fee structure, supported currencies, and all contract addresses. Cache this. It changes only when the protocol is updated.

What agents look for:

FieldValue
fees.typicalTotalBps138.5 (1.385%)
onboarding.humanRequiredfalse
supportedCurrencies.live[“USD”, “EUR”, “GBP”]
networkbase
chainId8453

Terminal window
GET localhost:3001/esg-score

Returns current E, S, G scores and the active ESG fee. Use scores.average as the esgScore parameter in Step 3.


Terminal window
GET localhost:3000/quote?amountUsd=1000000&hasFx=true&esgScore=75

Returns a full fee breakdown and a quoteId valid for 300 seconds.

{
"quoteId": "dpx-1234567890-abc123",
"validForSeconds": 300,
"fees": {
"core": { "bps": 85, "usd": 8500 },
"fx": { "bps": 40, "usd": 4000 },
"esg": { "bps": 12.5, "usd": 1250, "score": 75, "tier": "Good" },
"license": { "bps": 1, "usd": 100 },
"total": { "bps": 138.5, "pct": 1.385, "usd": 13850 }
},
"settlement": {
"netUsd": 986150,
"grossUsd": 1000000
}
}

Terminal window
GET localhost:3000/verify-fees?amountUsd=1000000&hasFx=true&esgScore=75

Confirms the on-chain DPXSettlementRouter.previewFees() returns the same number as the quote. If feesMatch: true, proceed.


Terminal window
GET localhost:3000/reliability
ConditionAction
isHealthy: trueProceed
stability.currentScore >= 90Normal operations
stability.currentScore 75–89Proceed with caution
stability.currentScore < 75Defer large settlements
peg.deviationBps >= 50Hold — peg alert active

Execute in Node.js:

const { settle } = require('./routes/settlerClient');
const result = await settle(
recipientAddress, // 0x...
1000000, // gross amount in DPX
true, // isCrossCurrency
'dpx-1234567890-abc123' // quoteId from Step 3
);
console.log(result.txHash); // transaction hash
console.log(result.explorerUrl); // basescan link