# Endgame: sealed stock trades for AI agents and people, over MCP > AI agents and people trade Robinhood Chain stock tokens with sealed orders over MCP: orders stay hidden until the batch locks, then every match clears at one Chainlink price. Each order burns $ENDGAME. > In detail: a sealed-batch exchange for stock tokens on Robinhood Chain (chain id 4663). Traders deposit into the Endgame contract, commit hidden orders (a hash of side, size, limit and a secret salt) during a batch's 10-minute commit window, reveal them in the 5-minute window right after, and every revealed order in the batch clears at one price: the Chainlink "Robinhood X / USD" feed round in force when the reveal window closed (in USDG, adjusted by the USDG/USD feed), or for tokens with no feed, a Uniswap v3 pool's 30-minute TWAP. Unfilled size goes straight back to the trader's free balance. This API and MCP server are free; they read public chain data and build UNSIGNED transactions. They never hold keys and never store order details, salts or tickets. Contract: 0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b Token: $ENDGAME 0x6d13bda5bFE0a2e00ea8a6e4F7CD2D0d737ad655. Each order (commit) burns a fixed amount of $ENDGAME from the trader, set by the owner between 0 and 100,000; burned tokens are gone. The token has no other role. Status: new, not audited. Deposits are capped per wallet and in total per asset. ## Connect - Remote MCP (Streamable HTTP, JSON replies, no install): https://endgamechess.click/api/mcp `claude mcp add --transport http endgame https://endgamechess.click/api/mcp` Cursor and other clients: `{"mcpServers":{"endgame":{"url":"https://endgamechess.click/api/mcp"}}}` - JSON API: https://endgamechess.click/api/, GET with query parameters or POST with a JSON body. CORS is open. No key needed. - Docs for people: https://endgamechess.click/docs.html ## The flow, end to end 1. `markets`: pick a market (number or symbol). Check `live.settlesNow`: stock feeds rest at weekends, and a batch whose feed is older than the market's maxAgeSec when its reveal window closes voids (everyone gets their funds back). 2. `build_tx action=deposit`: put USDG (to buy) or the stock token (to sell) into Endgame. Deposits are public; deposit early or a round amount so it doesn't point at your order. 3. `build_commit_tx` during the commit window: returns the hash, the transactions (an exact $ENDGAME approve if needed, then commit) and a ticket. Keep the ticket private until the reveal window. 4. `build_reveal_tx` with the ticket, between ticket.revealFrom and ticket.revealUntil (unix seconds). The reveal locks size x limit in USDG for a buy, or the size for a sell. Anyone may send a reveal. 5. Settlement: after the reveal window, anyone sends settle. `batch_status` returns the exact feed rounds to pass, the price it will clear at, a fill preview and the unsigned settle transaction. The contract only accepts the round in force at the close, so the sender can't choose the price. 6. `my_orders`: fills, refunds and balances. `build_tx action=withdraw amount=all` takes free funds out. Withdrawals are never paused. ## Clearing rules - One price per batch. Buys with limit >= price and sells with limit <= price are in the book; matched = min(total buy size, total sell size). The bigger side fills pro rata (cumulative rounding; base is conserved exactly). Buyers pay price x fill rounded up; sellers get it rounded down; the difference (at most 1 unit of USDG per batch) stays in the contract as dust that nobody can take. - Chainlink markets: price = feed answer / USDG feed answer, per whole token. The batch voids if the feed is older than the market's max age (14 hours for stocks, 26 for SGOV), if USDG is more than 3% from $1 or its feed is over 26 hours old, if the token issuer has paused its oracle, or if a split/dividend multiplier took effect in the 6 hours before the close. - TWAP markets: the 30-minute time-weighted average tick ending at the close. The batch voids if the last minute's average is more than maxDevTicks from it, if the pool's liquidity over the window is under the market's floor, or if the pool has no history for the window. - Up to 100 revealed orders per batch. A batch nobody settles within 24 hours voids on the next settle or reclaim, and every order is reclaimable in full. ## What is private, and what isn't - Private until you reveal: your side, size and limit. Only a hash is onchain. - Public: deposits and withdrawals (who, what, how much), your balances in the contract, the fact that your address committed to a given batch of a given market, the $ENDGAME burn, and everything about an order once revealed (it has to be, to clear it). Fills and settlement are public. - A commit you never reveal stays sealed forever and locks nothing, but its burn is not refunded. Choosing not to reveal is possible; the burn prices that option. - Stock tokens are issued by Robinhood and can be paused or blocklisted by the issuer, which would also stop their withdrawal from Endgame. ## Routes (all free) - GET /api/markets[?market=TSLA]: markets, live prices, settle-ability now, current batch and deadlines. Works before launch (planned markets); planned=1 lists every planned market after launch too. - GET /api/batch_status?market=TSLA[&batch=N][&from=0x…]: phase, deadlines, revealed orders, result or void reason, settle preview + unsigned settle tx. - POST /api/build_commit_tx {"market":"TSLA","side":"buy","amount":"0.5","limit":"400","from":"0x…"[,"salt":"0x…64 hex"]} - POST /api/build_reveal_tx {"ticket":{…as returned…}} - GET /api/my_orders?address=0x…[&limit=25] - POST /api/build_tx {"action":"deposit|withdraw|settle|reclaim|cancel", …} - GET /api/status: paused or not, order burn, total burned, caps and holdings per asset. - POST /api/mcp: the MCP server (tools: markets, batch_status, build_commit_tx, build_reveal_tx, my_orders, build_tx, status). Queries never use `id`; use market=, batch=, address=. ## Examples ``` curl -s 'https://endgamechess.click/api/markets?market=TSLA' curl -s -X POST https://endgamechess.click/api/build_commit_tx -H 'content-type: application/json' -d '{"market":"TSLA","side":"buy","amount":"0.5","limit":"400","from":"0xYourAddress"}' curl -s -X POST https://endgamechess.click/api/mcp -H 'content-type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"batch_status","arguments":{"market":"TSLA"}}}' ``` The commit hash, so you can compute it yourself and never send your order anywhere: `keccak256(abi.encode(uint256 chainId=4663, address exchange, uint256 market, uint256 batch, address trader, uint8 side (0 buy, 1 sell), uint128 amount (raw base units), uint128 limitPrice (quote units per 1e18 base units), bytes32 salt))` ``` cast keccak $(cast abi-encode 'f(uint256,address,uint256,uint256,address,uint8,uint128,uint128,bytes32)' 4663 0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b 0 0 500000000000000000 400000000 ) cast send 0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b 'commit(uint256,uint256,bytes32)' 0 cast send 0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b 'reveal(uint256,uint256,address,uint8,uint128,uint128,bytes32)' 0 0 500000000000000000 400000000 cast call 0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b 'currentBatch(uint256)(uint256)' 0 ``` ## Owner limits The owner can list markets, open or close a market to new orders, pause new deposits and commits, set the order burn (0 to 100,000 $ENDGAME), set the token once, and set caps: lowering is immediate, raising waits 2 days and is at most double. The owner has no way to move user funds and cannot pause withdrawals, cancels, reveals, settlement or reclaims. One operator runs this site and the optional keeper that sends settle transactions; the keeper can't change prices or touch funds. ## Links - Website: https://endgamechess.click/ - X: https://x.com/EndgameClick - MCP server (streamable HTTP, protocol 2025-06-18): https://endgamechess.click/api/mcp - $ENDGAME token: 0x6d13bda5bFE0a2e00ea8a6e4F7CD2D0d737ad655 (https://robinhoodchain.blockscout.com/token/0x6d13bda5bFE0a2e00ea8a6e4F7CD2D0d737ad655) - Buy $ENDGAME on Pons: https://ponsfamily.com/launchpad/0x6d13bda5bfe0a2e00ea8a6e4f7cd2d0d737ad655 - Exchange: 0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b (https://robinhoodchain.blockscout.com/address/0x8EfAb00a8E3a32aEBF7b851Cb5CD62FBFb22523b) - This guide: https://endgamechess.click/llms.txt (the same text is at https://endgamechess.click/llms-full.txt) ## ERC-8004 agent identity Endgame exchange API is an ERC-8004 agent. It registers in the ERC-8004 Identity Registry on Robinhood Chain (eip155:4663:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432) at launch. - Registration file: https://endgamechess.click/.well-known/agent-registration.json - Identity Registry: https://robinhoodchain.blockscout.com/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 - Reputation Registry (feedback from other agents): https://robinhoodchain.blockscout.com/address/0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 - Sitemap: https://endgamechess.click/sitemap.xml