All mutation flows share quote → action → sign → broadcast. Replace 0xYourWallet and token addresses with your user’s values.

Discovery

Bootstrap your app before any wallet connection:
curl -sS https://api.dfb.network/v2/health
curl -sS https://api.dfb.network/v2/networks
curl -sS https://api.dfb.network/v2/providers
curl -sS -X POST https://api.dfb.network/v2/rpc/137 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
curl -sS 'https://api.dfb.network/v2/pools?network=polygon'
curl -sS https://api.dfb.network/v2/vaults
Filter tokens: GET /v2/tokens?network=polygon&query=brz

Swap workflow

1

Request a quote

curl -sS -X POST https://api.dfb.network/v2/swaps/quote \
  -H 'Content-Type: application/json' \
  -d '{
    "network": "polygon",
    "fromToken": "0x4eD141110F6EeeAbA9A1df36d8c26f684d2475Dc",
    "toToken": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
    "amount": "1000000000000000000",
    "address": "0xYourWallet"
  }'
Response: signed quoteId, pair, price, expiresAt.
2

Optional: show quote details

GET /v2/swaps/quote/{quoteId} while the token is valid.
3

Build unsigned action

POST /v2/swaps/{quoteId}/actiontransactions[] with to, data, value, chainId.
4

Sign and broadcast

User wallet or your custody service signs and submits to the network.

Pool workflow

List and explore (live)

# All pools
curl -sS https://api.dfb.network/v2/pools

# Filter
curl -sS 'https://api.dfb.network/v2/pools?network=polygon&protocol=uniswap_v3'

# Detail
curl -sS 'https://api.dfb.network/v2/pools/137:0x4Af62a93775C093Af3e32949EF23C9a323d20817'
Catalog fields include pair, protocol, tvlUsd, apr, volume24hUsd, and fees24hUsd. Live APR from indexed on-chain data is on the roadmap; preview values may appear until then.

Add / remove liquidity (rolling out)

StepEndpoint
AnalyticsGET /v2/pools/{poolId}/tvl, /volume, /fees, /apr
QuotePOST /v2/pools/{poolId}/quote with action: add or remove
ActionPOST /v2/pools/{poolId}/action → unsigned LP transaction(s)
PositionsGET /v2/pools/{poolId}/positions?wallet=0x…
Pool id format: {chainId}:{poolAddress} (v4 pools use bytes32 ids).

Vault workflow

List vaults (live)

curl -sS https://api.dfb.network/v2/vaults
curl -sS 'https://api.dfb.network/v2/vaults/137:0x2222222222222222222222222222222222222222'
Catalog includes strategy, asset, apy, tvlUsd, riskScore, and fees. Live APY is on the roadmap.

Deposit / withdraw (rolling out)

StepEndpoint
QuotePOST /v2/vaults/{vaultId}/quote
Deposit / withdrawPOST /v2/vaults/{vaultId}/action
Deploy new vaultPOST /v2/vaults/deploy/quote/deploy/action
Manage / rebalancePOST /v2/vaults/{vaultId}/manage/action, /rebalance/action

Bridge workflow

  1. GET /v2/bridges/routes?fromChain=base&toChain=polygon
  2. POST /v2/bridges/quote
  3. POST /v2/bridges/{quoteId}/action
Same quote → action pattern as swaps. For Polygon BRZ → Tron USDT, use fromChain=polygon, toChain=tron, BRZ on Polygon (0x4eD141110F6EeeAbA9A1df36d8c26f684d2475Dc), and USDT on Tron (TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t). If the upstream provider has no route, v2 returns 502 upstream_error with a requestId; retry only after route/liquidity changes.

RPC workflow

Use v2 RPC when your app needs a read-only JSON-RPC call but should not expose the internal rpc-dispatcher key. API v2 forwards the request server-side to DFB rpc-dispatcher.
curl -sS -X POST https://api.dfb.network/v2/rpc/137 \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["0x0000000000000000000000000000000000000000", "latest"],
    "id": 1
  }'
chainId is the numeric chain id, for example Polygon 137 or Tron 728126428 when JSON-RPC support is available upstream.

Portfolio workflow

1

Batch balances

curl -sS 'https://api.dfb.network/v2/portfolio/0xYourWallet?network=polygon&tokens=0xTokenA,0xTokenB&includeNative=true'
Returns atomic integer balances per token. USD pricing is not included yet.
2

Positions (rolling out)

GET /v2/portfolio/{address}/positions — LP and vault exposure across networks.
Native balance: set includeNative=true or include the zero address 0x0000000000000000000000000000000000000000.

Availability summary

FlowStatus
Discovery, pool/vault catalogsLive
Swap quote + actionLive (supported networks)
Pool/vault analytics & LP/vault actionsRolling out
BridgesLive where upstream routes exist
Portfolio balancesRolling out by network
Portfolio positionsPlanned
RPC proxyLive
Transaction relay via APINot supported — client broadcast
When a feature is unavailable, expect 503 provider_unavailable after valid input.