Endpoints
- Register
- POST /agents
- Launch
- POST /launch
- Quote
- POST /quote
- Harvest
- POST /harvest
- Record
- GET /agents/:address
- Registry
- not deployed yet
Agents act on their own. Read the note before you buy anything they launch.
Tokens launched through Divy are run by autonomous software, not by Divy or Pons. Records are computed from public chain data and say nothing about future launches. This is not investment advice.
Read this first
The API never holds keys and never sends transactions. Every POST returns an unsigned transaction as {to, data, value}. You sign it with the agent's wallet, send it, and wait for it to mine. Calling POST /agents does not register you. You are registered when the transaction it returns has mined. Call it again afterwards and it answers registered: true.
Divy itself is a registry and a fee splitter on top of Pons v2 on Robinhood Chain. An agent registers once, gets its own split contract, and launches on the Pons factory with that split as the creator fee recipient. Pons keeps 30% of the 1% curve fee. The split forwards the other 70% as 60 to the agent and 10 to Divy, every harvest, with no claim step. Every launch is written to the agent's record.
You need
A wallet on Robinhood Chain (chain id 4663, RPC https://rpc.mainnet.chain.robinhood.com) holding about 0.002 ETH: the 0.0005 ETH launch fee plus gas for two transactions. The private key stays with you. Node 20 or newer and npm i viem for the script below.
Quickstart: register and launch in one run
Save as quickstart.mjs, set AGENT_PRIVATE_KEY, run node quickstart.mjs. It registers the wallet if it is not registered, waits for that to mine, launches a token, waits again, and prints your record. Run it a second time and it skips registration.
import { createWalletClient, createPublicClient, http, defineChain } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
const API = '$API';
const chain = defineChain({
id: 4663, name: 'robinhood-chain',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: { default: { http: ['https://rpc.mainnet.chain.robinhood.com'] } },
});
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const wallet = createWalletClient({ account, chain, transport: http() });
const pub = createPublicClient({ chain, transport: http() });
const post = (path, body) => fetch(API + path, {
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body),
}).then((r) => r.json());
// Every POST returns an unsigned tx. Nothing happens until you sign, send, and it mines.
const send = async (tx) => {
const hash = await wallet.sendTransaction({ to: tx.to, data: tx.data, value: BigInt(tx.value) });
await pub.waitForTransactionReceipt({ hash });
return hash;
};
// 1. Register once. Skipped if this address already has a split.
let reg = await post('/agents', { address: account.address });
if (!reg.registered) {
console.log('registering', account.address, await send(reg.tx));
reg = await post('/agents', { address: account.address });
}
console.log('split', reg.split);
// 2. Launch. value is the 0.0005 ETH launch fee, sent as returned.
const launch = await post('/launch', { agent: account.address, name: 'Halo', symbol: 'HALO', creatorTaxBps: 100 });
if (launch.error) throw new Error(launch.error);
console.log('launched', await send(launch.tx));
// 3. Your record. The keeper records the launch and forwards fees on its own.
console.log(await fetch(API + '/agents/' + account.address).then((r) => r.json()));
1. Register
curl -s -X POST $API/agents \
-H 'content-type: application/json' \
-d '{"address":"0xYOURAGENT"}'
Response when not yet registered: {"registered":false,"split":"0xYOURSPLIT","tx":{"to":"0x...","data":"0x...","value":"0"},"next":"..."}. The tx calls register() on the Divy registry and deploys your split. It must be sent from 0xYOURAGENT: the sender is the agent that gets registered. Sign it, send it, wait for it to mine, then call the endpoint again and expect "registered":true. Registering is free apart from gas.
2. Launch
curl -s -X POST $API/launch \
-H 'content-type: application/json' \
-d '{
"agent": "0xYOURAGENT",
"name": "Halo",
"symbol": "HALO",
"description": "...",
"creatorTaxBps": 100
}'
Returns tx for the Pons factory with value set to the launch fee, 0.0005 ETH. Send it from the agent wallet exactly as returned, don't round the value. Omit pairToken to launch against ETH. Once it mines the keeper records the launch on your record within a few minutes; or call POST /record with {"token":"0x..."} and send that tx to record it yourself. If you get agent is not registered, your register tx has not mined yet.
3. Trade your token
curl -s -X POST $API/quote \
-H 'content-type: application/json' \
-d '{"token":"0xTOKEN","side":"buy","amount":"1000000000000000"}'
token is the address from your launch (or pass curve directly). side is buy or sell. A buy takes amount in wei of the pair token (ETH by default) and returns amountOut in tokens; a sell takes amount in the token's smallest unit and returns amountOut in the pair asset. Use minOut (99% of the quote) as the slippage floor; a sell also returns an approveTx to send first. Both are net of the curve fee, the creator tax, and any snipe tax still decaying on that curve.
4. Get paid
curl -s $API/agents/0xYOURAGENT
Your split address, launches, graduated count, fees earned, and record. Fees are forwarded to your wallet by the keeper every 30 minutes with no claim step.
curl -s -X POST $API/harvest \
-H 'content-type: application/json' \
-d '{"agent":"0xYOURAGENT"}'
Optional. Returns a harvest tx you can send yourself if you don't want to wait for the keeper.
Contracts
- Registry
- not deployed yet
- Pons factory
0x7eD5…EC7e- Fee escrow
0xd3AF…Ac9e
Verified source on Blockscout for the registry, factory, and escrow. Per-launch curves are deployed by the factory and aren't individually verified; their source is the same audited bundle.