[{"name":"markets","title":"The shelf","description":"Every stock on Borro and the USDG vault: price, what is lent, borrowed and free to short, what lenders earn and what shorters pay a year (one number each, $BORRO included once it has been paid), the USDG borrowing rate against each stock, and the $BORRO Drip to lenders: dollars a day per pool at today's price, and the rate a deposit of a given size would get.","args":[],"required":[]},{"name":"market","title":"One stock","description":"One stock's full line from the shelf: rates, sizes, limits, open fee and its contracts.","args":["symbol"],"required":["symbol"]},{"name":"health","title":"Health and liquidation prices","description":"For bots that watch for liquidation: every short and USDG loan of a wallet, worst first, with how much of its limit it uses (limit_used, 1 = Morpho can liquidate it now), health (1 / limit_used), the stock price that liquidates it, how far the price is from that in percent, a status (ok, warn from 0.85, danger from 0.95, liquidatable), and the market clock. Also at /health/<wallet>.json.","args":["wallet"],"required":["wallet"]},{"name":"position","title":"A wallet on Borro","description":"Everything a wallet has on Borro: stock lent, shorts (owed, money held, the price it is closed for you at, and parts: how much of the stock's one short is the wallet's own, a pair's and a basket leg's), USDG loans, USDG lent, open pairs (each with short_now, its own part of the short), gap covers bought and its part of the gap cover pool, options held, written and on order (with what to do next and one yearly number for premiums over what they locked), bear coins it launched, $BORRO to claim, its locker rebates (the share of Borro's fees it gets back for its $BORRO lock, what is owed and what has been paid), and its ETH and USDG.","args":["wallet"],"required":["wallet"]},{"name":"trades","title":"Recent trades","description":"Borro-wide recent shorts opened and closed, newest first.","args":[],"required":[]},{"name":"prices","title":"Stock tokens against the stock","description":"For each stock token on Borro: the stock's own price (its Chainlink feed while the market is open; Borro's weekend estimate and 95% band while it is shut), the token's executable buy and sell price on chain for $1,000 and $10,000 (what Borro's short desk would pay or get through its own swap route, before Borro's fee), and the gap in percent (gapPct: the token's mid against the stock). Positive: the token trades over the stock (short it on Borro); negative: under it (buy and lend it). Refreshed every 30 seconds; the same as https://borro.markets/prices.json.","args":[],"required":[]},{"name":"bear_coins","title":"Bear coins","description":"The bear coins directory: every coin launched on Pons from Borro with its own short, its stock, P/L, burns and fees.","args":[],"required":[]},{"name":"rules","title":"Rules and contracts","description":"Borro's house rules, limits, what can go wrong, and every contract address with what it does, to verify on chain.","args":[],"required":[]},{"name":"open_short","title":"Prepare: open a short","description":"Unsigned transactions to short a stock from the wallet: approve the deposit if needed, then BorroShort.open (borrow the stock, sell it, hold the money plus the deposit). Priced now, with half a percent of slip allowed; simulated from the wallet. The quote's rebate_estimate is what this short puts in the wallet's weekly locker rebate.","args":["wallet","symbol","amount","deposit"],"required":["wallet","symbol","amount"]},{"name":"close_short","title":"Prepare: close a short","description":"Unsigned transactions to close the wallet's short on a stock: buy back everything owed, return it, take out the money held (with a USDG top-up approval if it is under water). A wallet has one short per stock, shared by any pair or basket legs on it: this closes all of it, and closes_parts lists the parts it takes with it. close_pair closes only a pair's own part.","args":["wallet","symbol"],"required":["wallet","symbol"]},{"name":"supply","title":"Prepare: lend","description":"Unsigned transactions to lend a stock to shorters (it earns lending fees) or USDG in the Borro USDG vault (it earns interest). With post: true, a stock is lent and posted in one step so USDG can be borrowed against it.","args":["wallet","asset","amount","post"],"required":["wallet","asset","amount"]},{"name":"withdraw","title":"Prepare: take back what is lent","description":"Unsigned transaction to take back lent stock or USDG (part, or all with all: true). Stock on loan to shorters comes back once it is returned.","args":["wallet","asset","amount","all"],"required":["wallet","asset"]},{"name":"borrow","title":"Prepare: borrow USDG","description":"Unsigned transaction to borrow USDG against stock already lent and posted (supply with post: true first). The quote's rebate_estimate is what this loan puts in the wallet's weekly locker rebate.","args":["wallet","symbol","amount"],"required":["wallet","symbol","amount"]},{"name":"repay","title":"Prepare: repay USDG","description":"Unsigned transactions to repay USDG borrowed against a stock (part, or all with all: true).","args":["wallet","symbol","amount","all"],"required":["wallet","symbol"]},{"name":"bind_builder","title":"Prepare: credit a bookrunner for borrowing","description":"Credits a bookrunner's code with the wallet's borrowing on Borro (Bookrunners): the bookrunner earns Borro's own fee on the interest the wallet pays, all of it for 12 months, half after; the wallet pays nothing more. Without signature: EIP-712 typed data for the wallet to sign (eth_signTypedData_v4, no transaction, no gas), good for 10 minutes. With signature and that timestamp: submits it, the same as POST https://borro.markets/builders/bind. One code per wallet; the first binding stands.","args":["wallet","code","timestamp","signature"],"required":["wallet","code"]},{"name":"open_pair","title":"Prepare: open a pair","description":"Unsigned transactions for a pair trade: buy and lend the long stock in your name (it earns lending fees while held), then short the other, approvals first. Priced now; simulated from the wallet in order.","args":["wallet","long","short","long_amount","short_amount","deposit"],"required":["wallet","long","short","long_amount","short_amount"]},{"name":"close_pair","title":"Prepare: close a pair","description":"Unsigned transactions to close the wallet's newest open pair of these two stocks: the pair's own part of the short closed (a basket leg or a short of its own on the same stock stays open, listed in stays_open), the long's lent stock taken back (what is free now, if part is on loan). If something else already closed part of the pair's short, this closes what is left and the note says so.","args":["wallet","long","short"],"required":["wallet","long","short"]},{"name":"buy_with_eth","title":"Prepare: pay with ETH","description":"Unsigned transaction swapping the wallet's ETH for USDG or a stock on Uniswap, or through Route (route.fun) for a stock bought exact in when Route guarantees more (no Borro contract, no Borro fee), for the flows that need them.","args":["wallet","want","amount","slip_bps"],"required":["wallet","want","amount"]},{"name":"open_long","title":"Prepare: leveraged long","description":"Unsigned transactions for a leveraged long on a stock in one open: USDG margin plus a flash-borrowed debt buy the stock, which is lent (it earns lending fees) and posted, and the debt is borrowed against it in the wallet's own name. Approve the margin and authorize LeverRouter on Morpho if needed, then open. Leverage up to 1.80x on SPY, QQQ and NVDA, 1.35x on the rest.","args":["wallet","symbol","margin","leverage"],"required":["wallet","symbol","margin","leverage"]},{"name":"close_long","title":"Prepare: close a leveraged long","description":"Unsigned transaction closing all or part of the wallet's leveraged long on a stock: the stock is sold, the debt repaid, and the rest comes back in USDG.","args":["wallet","symbol","percent"],"required":["wallet","symbol"]},{"name":"farms","title":"Stock farms","description":"Borro's stock farms: a Uniswap v4 USDG/stock pool per stock, run by Borro's own hook, that lends what swaps do not need on Borro. For each farm: its size, what is kept for swaps and what is lent, its swap fee and squeeze fee now, the lending fees and interest its lent part earns, the last day's and week's swap volume and farmers' fees, and Your APR on a $1,000 deposit as one number (fees at the last week's pace, lending fees and interest, and the $BORRO Drip at today's rate with the lent part counted 1.5x). With a wallet, its part of each farm.","args":["symbol","wallet"],"required":[]},{"name":"farm_deposit","title":"Prepare: put money into a farm","description":"Unsigned transactions to put USDG and a stock into its farm from the wallet: give usdg or stock (or both) and the other follows the farm's ratio (the feed's price for the first deposit, which sets the farm's price). Approvals of the exact amounts first, then the deposit, simulated from the wallet. Shares are accepted down to slip_bps under the quote.","args":["wallet","symbol","usdg","stock","slip_bps"],"required":["wallet","symbol"]},{"name":"farm_withdraw","title":"Prepare: take money out of a farm","description":"Unsigned transaction to take part or all of the wallet's money out of a farm. Run from the wallet first to show what comes back now, and what comes as the vault's own shares because borrowers have it out (they keep earning and redeem on Supply once it is free). Always works: never paused, no price feed needed.","args":["wallet","symbol","percent","slip_bps"],"required":["wallet","symbol"]},{"name":"weekend","title":"The Weekend Desk","description":"While the stock market is shut (Friday 8pm to Sunday 8pm New York, and holidays) the price feeds stop at their last print. For each stock: the paused price, Borro's weekend price and 95% band (low, high), its typical Monday gap and the last closures' gaps, and the gap cover quotes per side and strike. Also the market clock (closed since, reopens at) and the gap cover pool: what is in it, free and set aside, Borro's share, and one yearly number for what the pool earned. Nothing on chain reads the weekend price.","args":["symbol"],"required":[]},{"name":"buy_cover","title":"Prepare: buy gap cover","description":"Unsigned transactions to buy Monday-gap cover on a stock while the market is shut (until an hour before the reopen): side up pays if the first feed print after the reopen is more than the strike above the last print (cover for a short), down if it is more than the strike below (for a long); it pays the move beyond the strike, times the cover, up to the pool's cap. Approve exactly the premium, then buy with that premium as the most it may take. Simulated from the wallet.","args":["wallet","symbol","side","notional","strike_bps"],"required":["wallet","symbol","side","notional"]},{"name":"deposit_cover","title":"Prepare: fund the gap cover pool","description":"Unsigned transactions to put USDG into the gap cover pool, which backs every cover and keeps the premiums (less Borro's share) on top of the Steakhouse USDG vault's interest. Approve exactly the amount, then deposit. A big gap pays covers out of the pool.","args":["wallet","amount"],"required":["wallet","amount"]},{"name":"withdraw_cover","title":"Prepare: withdraw from the gap cover pool","description":"Unsigned transaction to take USDG out of the gap cover pool, an amount or all: true. Capital is locked while covers are live, from the first buy of a closure until Monday's settlement; withdraw during the week. Run from the wallet first to show what comes back.","args":["wallet","amount","all"],"required":["wallet"]},{"name":"settle_cover","title":"Prepare: settle gap cover","description":"Unsigned transaction settling a cover with the feed's first round at or after its reopen (found by walking back from the latest round), with what it pays the buyer. Anyone may send it; the payout always goes to the buyer. When that first print came more than two hours after the reopen, or more than 50% from the reference, or never came in seven days, the transaction voids the cover instead (the premium the pool kept goes back).","args":["wallet","id"],"required":["wallet","id"]},{"name":"claim_cover","title":"Prepare: claim a waiting payout","description":"Unsigned transaction taking USDG a settled or voided cover could not send to the wallet (it waits in the pool's owed); position shows owed_usdg.","args":["wallet"],"required":["wallet"]},{"name":"options","title":"The Options Desk","description":"One stock's options chain for this Friday and next (expiry Friday 8pm New York): per strike and side the series id, Borro's fair value (Black-Scholes from the stock's own measured volatility, a guide), delta, the best ask and bid (checked on chain), the IV the ask implies, the shares written and the last traded IV; the stock's price, its volatility a year and the last traded IV; and whether the desk is live, paused and its fee. Prices are dollars a share, premiums USDG a share.","args":["symbol"],"required":["symbol"]},{"name":"write_option","title":"Prepare: write a call or a put","description":"Unsigned transactions to write options from the wallet: post an ask at a premium (the collateral is locked now; it fills when a buyer takes it), or with order_id sell into that bid now and receive its premium less Borro's share. A call locks one share of the stock's Borro vault per share written: from the stock (lent into its vault in the same transaction, the default) or from vault shares held (bNVDA). A put locks the strike in USDG in the Steakhouse vault: from USDG (the default) or that vault's shares held. Exact approval of the lock, then the call; simulated from the wallet.","args":["wallet","symbol","type","expiry","strike","shares","premium","from","order_id"],"required":["wallet","symbol","shares"]},{"name":"buy_option","title":"Prepare: buy a call or a put","description":"Unsigned transactions to buy options from the best ask of a series (or a given ask with order_id), checked on chain: exact approval of the premium, then fillAsk with that premium as the most it may take. A fill takes the whole ask or leaves at least 0.001 of a share. Returns the cost, Borro's share, the break-even and what it pays at expiry.","args":["wallet","symbol","type","expiry","strike","shares","order_id","max_premium"],"required":["wallet","symbol","shares"]},{"name":"post_bid","title":"Prepare: bid for options","description":"Unsigned transactions to post a bid for a series at a premium a share: the premium for all the shares is locked now in USDG (exact approval, then postBid) and goes to the writer who fills it, less Borro's share; the option tokens come to this wallet. cancel_order takes it back while it is open.","args":["wallet","symbol","type","expiry","strike","shares","premium"],"required":["wallet","symbol","type","strike","shares","premium"]},{"name":"cancel_order","title":"Prepare: cancel an order","description":"Unsigned transaction cancelling an ask or a bid: what it still locks goes back to its maker (an ask's collateral, a bid's USDG). Only the maker may, until the series expires; then anyone may.","args":["wallet","order_id"],"required":["wallet","order_id"]},{"name":"settle_series","title":"Prepare: settle an expired series","description":"Unsigned transaction settling a series after its Friday 8pm New York expiry with the feed's last round at or before it, found by walking back from the latest round, once the proof holds (the next round printed after expiry, or it is the feed's latest); when the feed printed nothing in the two days before expiry, with its first round after. Gives the settlement price and what it pays a share. Fourteen days after expiry with no round to prove a price it builds void(id) instead. Anyone may send either.","args":["wallet","series_id","symbol","expiry","strike","type"],"required":["wallet"]},{"name":"claim_option","title":"Prepare: claim a settled option","description":"Unsigned transaction burning the wallet's tokens of a settled series and taking what they pay: a call pays the stock's Borro vault shares, a put USDG (or the Steakhouse vault's shares with as_shares, for when the vault is short of free USDG). All the wallet holds unless shares is given.","args":["wallet","series_id","shares","as_shares"],"required":["wallet","series_id"]},{"name":"release_collateral","title":"Prepare: take back a writer's lock","description":"Unsigned transaction giving a writer back the lock of a settled series less what its written options pay, once: stock vault shares for a call, Steakhouse USDG vault shares for a put.","args":["wallet","series_id"],"required":["wallet","series_id"]}]