TrenchyToolsAPI

Many wallets

Fan one wallet out to many, or sweep many wallets back into one — one order and one unsigned deposit per leg.

The same transfer, repeated per leg, in one call. Legs are independent: a leg that fails (minimum, venue off, budget) is reported inline and the others proceed. Up to 25 legs.

POSThttps://api.trenchytools.lol/api/transfer/batch

Fan-out: one source, many destinations

JavaScript
const r = await fetch(`${BASE}/api/transfer/batch?api-key=${API_KEY}`, {
  method: 'POST', headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    from: { chain: 'sol', wallet: funding.publicKey.toBase58() },
    to: wallets.map((w) => ({ chain: 'sol', address: w.publicKey.toBase58(), amount: 0.3 })),
    mode: 'float',
    venue: 'random',   // a venue per leg: the wallets are not all paid by the same exchange
  }),
}).then((r) => r.json())
// r.legs[i].transaction is the unsigned deposit for leg i: sign each with the funding wallet and send
for (const leg of r.legs) if (!leg.error) { /* sign leg.transaction.transaction, POST /api/sol/send, remember leg.transferId */ }

Consolidate: many sources, one destination

Request
{
  "from": [
    { "chain": "sol", "wallet": "WALLET_1", "amount": 0.25 },
    { "chain": "sol", "wallet": "WALLET_2", "amount": 0.25 }
  ],
  "to": { "chain": "sol", "address": "TREASURY" },
  "mode": "float", "venue": "auto"
}

Each source gets its own order and its own unsigned deposit (signed by that wallet). route: "direct" makes every leg a plain transfer instead.

Response (202)
{
  "batchId": "b_m2x…",
  "legs": [
    { "transferId": "k9f3…", "status": "awaiting_deposit", "venue": "binance", "deposit": { "chain": "sol", "address": "…", "amount": 0.3 }, "transaction": { "chain": "sol", "encoding": "base64", "transaction": "…" }, "poll": "/api/transfer/k9f3…" },
    { "error": "the amount is below the exchange minimum for this pair", "code": "transfer_min_amount", "leg": { "to": { "address": "…" }, "amount": 0.01 } }
  ]
}
Keep the batch within the budget: ~10 exchange orders a minute shared by every key. A 25-leg fan-out takes two to three minutes of orders; legs refused with transfer_busy can be re-sent.