Prepare: open an agent credit line, post or borrow
credit_openUnsigned transactions. Without account: open a line owned by the signing wallet for an agent (never the wallet itself), in a market credit_markets lists ("CREDIT", the default), post its credits and optionally borrow USDG at once (to the wallet unless to names an allowlisted address); exact credit approval to the factory first. The owner's limits: ceiling (USDG, default the most the target allows today), daily_limit (USDG out in any 24 hours, borrows and the agent's withdrawals together, or "none"; default the ceiling, or $100 with a gas station; at most $5,000 with one), target_ltv (a fraction under 1 like 0.18, or a percent with its sign like "18%"; the market's default, 0.18 for CREDIT, at most the market's max trigger), trigger_ltv for protect (by the market's rule; CREDIT: the target plus 7 points, at least 0.27 and at most 0.3), allow (addresses borrowed USDG may go to, 16 at most), gas_station (true: put the agent's gas station on the allowlist), bills (true: bill pay, the agent's own wallet on the allowlist, for x402 bills through credit_bill; the daily limit then defaults to $100), keeper ("borro", the default, "none" or an address), sell_bps and slip_bps for protect's sales (CREDIT defaults 2500 and 300; 0 in a market with no pool). With account: post more credits (anyone) and/or borrow (the line's agent or owner) to an allowed address. A wallet holding $BORRO borrows for less once Holder Credit counts it (holder_benefits). Refuses locally what the line would refuse (over the daily limit, the ceiling or the target, during a write-off, past what the market has free, past 90% used, past what the depth gate allows, before CREDIT's price starts); simulated from the wallet. Check each transaction's to: the factory, a line the factory confirms (isAccount), or the credit for an exact approval. Policy credit: when the agent has claimed a policy in the registry and the line has a gas station or bill pay, its default daily limit is the policy's earned default for the claim's rung (the policy tool shows it) whenever that is more, capped by the ceiling, and daily_limit_note names the policy, its tier and the rung.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"wallet": "<wallet>"
},
"name": "credit_open"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Where borrowed USDG goes: the owner or an allowlisted address (default the wallet, or the owner) | |
| agent | No | New line: the agent's address, the wallet that will borrow from it (not the owner's) | |
| allow | No | New line: addresses borrowed USDG may go to (16 at most) | |
| bills | No | New line: bill pay, the agent's own wallet on the allowlist, so it can borrow what it is short of an x402 bill (credit_bill); the line then needs a daily limit ($100 unless given) | |
| borrow | No | USDG to borrow now (optional), in whole units as a decimal string, like "1.5" | |
| keeper | No | New line: "borro" (Borro's keeper, the default), "none", or an address | |
| market | No | New line: which market, by its symbol in credit_markets (default CREDIT) | |
| wallet | Yes | The wallet's address (0x...); the transactions are built for it to sign | |
| account | No | An existing line: post more and/or borrow from it (leave out to open a new line) | |
| ceiling | No | New line: the most USDG the line may owe (optional), in whole units as a decimal string, like "1.5" | |
| credits | No | Credits to post, in whole units as a decimal string, like "1.5" | |
| sell_bps | No | New line: most of the credits one protect sale may sell, in hundredths of a percent (0 to 2500; CREDIT default 2500; 0 in a market with no pool) | |
| slip_bps | No | New line: most a protect sale may fill under the feed's price, in hundredths of a percent (0 to 1000, default 300) | |
| target_ltv | No | New line: target LTV, a fraction under 1 like 0.18 or a percent with its sign like "18%" (the market's default: 0.18 for CREDIT) | |
| daily_limit | No | New line: the most USDG out in any 24 hours, like "100", or "none" (default the ceiling; $100 with a gas station, at most $5,000) | |
| gas_station | No | New line: put the agent's gas station on the allowlist, so the agent can borrow its own gas (credit_gas) | |
| trigger_ltv | No | New line: LTV above which the keeper may protect it (default by the market's rule) |