[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-sui-deepbook-sdk":3,"mdc--x2igz7-key":39,"related-org-sui-deepbook-sdk":854,"related-repo-sui-deepbook-sdk":1006},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":28,"repoUrl":29,"updatedAt":30,"license":31,"forks":32,"topics":33,"repo":34,"sourceUrl":37,"mdContent":38},"deepbook-sdk","build trading applications with DeepBook SDK","DeepBook V3 TypeScript SDK integration. Use when building trading applications, bots, or scripts that interact with DeepBook pools using the @mysten\u002Fdeepbook-v3 SDK. Covers client setup, BalanceManager lifecycle, placing limit and market orders, swaps, querying order books, order management, and fee handling.\nFor DeepBook architecture and contract addresses, see the `deepbook-overview` skill. For Move smart contract integration, see the `deepbook-move` skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"sui","Sui (Mysten Labs)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fsui.png","MystenLabs",[13,16,19,22,25],{"name":14,"slug":8,"type":15},"Sui","tag",{"name":17,"slug":18,"type":15},"TypeScript","typescript",{"name":20,"slug":21,"type":15},"Web3","web3",{"name":23,"slug":24,"type":15},"Trading","trading",{"name":26,"slug":27,"type":15},"SDK","sdk",9,"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fskills","2026-08-24T03:57:02.735676",null,2,[],{"repoUrl":29,"stars":28,"forks":32,"topics":35,"description":36},[],"Sui development skills maintained by Mysten Labs","https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fskills\u002Ftree\u002FHEAD\u002Fdeepbook-sdk","---\nname: deepbook-sdk\ndescription: >\n  DeepBook V3 TypeScript SDK integration. Use when building trading applications,\n  bots, or scripts that interact with DeepBook pools using the @mysten\u002Fdeepbook-v3\n  SDK. Covers client setup, BalanceManager lifecycle, placing limit and market\n  orders, swaps, querying order books, order management, and fee handling.\n\n  For DeepBook architecture and contract addresses, see the `deepbook-overview` skill.\n  For Move smart contract integration, see the `deepbook-move` skill.\n---\n\n# DeepBook V3 SDK\n\n> **MCP tool:** When available in your environment, also query the Sui documentation MCP server (`https:\u002F\u002Fsui.mcp.kapa.ai`) for up-to-date answers. Use it for verification and for details not covered by these reference files.\n\n> **Source constraint:** All information in this skill is sourced exclusively from [docs.sui.io](https:\u002F\u002Fdocs.sui.io\u002Fonchain-finance\u002Fdeepbook\u002Fdeepbookv3), the [deepbook-sandbox examples](https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fdeepbook-sandbox\u002Ftree\u002Fmain\u002Fexamples\u002Fsandbox), and the [deepbookv3 repository](https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fdeepbookv3). When extending or updating this skill, only pull from these sources. Do not use third-party blogs, tutorials, or unofficial documentation.\n\nThe `@mysten\u002Fdeepbook-v3` SDK provides a TypeScript client for interacting with DeepBook V3 pools on Sui. This skill covers how to set up the client, manage balances, place orders, execute swaps, and handle fees. Common AI-coding mistakes include hardcoding on-chain IDs instead of using SDK pool\u002Fcoin keys, creating a new BalanceManager per transaction instead of reusing one, and using non-numeric `clientOrderId` values.\n\nThis skill routes to focused reference files. Load only the ones relevant to the current task.\n\nAll patterns in this skill are derived from:\n  https:\u002F\u002Fdocs.sui.io\u002Fonchain-finance\u002Fdeepbook\u002Fdeepbookv3\u002Fspot-workflow\n  https:\u002F\u002Fdocs.sui.io\u002Fonchain-finance\u002Fdeepbook\u002Fdeepbookv3-sdk\n  https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fdeepbook-sandbox\u002Ftree\u002Fmain\u002Fexamples\u002Fsandbox\n\nIf unsure about any API, fetch the relevant page before answering.\nDo not guess or extrapolate from other SDKs or libraries.\n\n---\n\n## Reference files\n\n### client-setup — Client Initialization and BalanceManager Lifecycle\n**Path:** `client-setup.md`\n**Load when:** setting up a DeepBook client, creating or reusing a BalanceManager, configuring the SDK for testnet or mainnet, or understanding the three-tier setup pattern (read-only, basic, advanced).\n**Covers:** SDK installation, `SuiGrpcClient` construction with `$extend(deepbook({...}))`, keypair setup, BalanceManager creation and reuse, deposits and withdrawals, the sandbox setup patterns.\n\n### trading — Orders, Swaps, and Order Lifecycle\n**Path:** `trading.md`\n**Load when:** placing limit or market orders, executing swaps, querying order books, checking order status, canceling orders, or understanding the order lifecycle.\n**Covers:** limit order placement (`POST_ONLY`, `NO_RESTRICTION`), market order placement with retry patterns, swap functions (with and without BalanceManager), order book queries, open order queries, order cancellation, self-matching behavior, the complete order lifecycle from placement to withdrawal.\n\n### fees — Fee Structure and DEEP Staking\n**Path:** `fees.md`\n**Load when:** the user asks about trading fees, DEEP token staking, fee discounts, how to fund a BalanceManager with DEEP, or how fees are calculated.\n**Covers:** DEEP vs input-token fee payment, fee calculation via `DeepPrice`, governance fee parameters, staking for fee discounts, acquiring testnet DEEP, referral system.\n\n---\n\n## Routing guide\n\n| Task | Load |\n|------|------|\n| Setting up a DeepBook client | client-setup |\n| Creating or reusing a BalanceManager | client-setup |\n| Depositing or withdrawing funds | client-setup |\n| Placing a limit order | trading |\n| Placing a market order | trading |\n| Executing a swap | trading |\n| Querying the order book | trading |\n| Checking or canceling orders | trading |\n| Understanding fees or staking | fees |\n| Funding a BalanceManager with DEEP | fees |\n| Building a complete trading bot | **all reference files** |\n| Full spot trading workflow | **all reference files** |\n\n---\n\n## Skill Content\n\n### Key concepts\n\n- **DeepBook client via `$extend`.** The SDK uses the `deepbook` function (imported from `@mysten\u002Fdeepbook-v3`) with `SuiGrpcClient.$extend(deepbook({...}))` to add DeepBook-specific transaction builders. Methods follow a curried pattern under two namespaces: `client.deepbook.deepBook.method({ params })(tx)` for trading operations and `client.deepbook.balanceManager.method({ params })(tx)` for balance management, where `tx` is a `Transaction` object.\n\n- **Pool and coin keys.** The SDK references pools and coins by string keys (e.g., `\"DEEP_SUI\"`, `\"SUI\"`) rather than raw on-chain addresses. The SDK maps these to the correct addresses per network.\n\n- **BalanceManager lifecycle.** A BalanceManager is a shared on-chain object. Create it once, persist its ID, and reuse it across transactions. Creating a new one per transaction wastes gas and creates orphaned objects.\n\n- **Swaps vs orders.** Swaps operate directly on wallet `Coin` objects without a BalanceManager. Orders require a BalanceManager with deposited funds.\n\n### Rules\n\n1. **Always use SDK keys for pools and coins.** Never hardcode on-chain IDs — the SDK handles address resolution per network.\n2. **`clientOrderId` must be a numeric string** (encoded as `u64`). Labels like `\"order-1\"` will fail.\n3. **Reuse BalanceManagers.** Persist the ID from creation and pass it when constructing the client.\n4. **Size deposits to wallet balance.** The SDK validates at build time — depositing more than the wallet holds causes an `Insufficient balance` error before the transaction is even submitted.\n5. **Handle the market maker rebalance window** on localnet\u002Fsandbox. The sandbox market maker has a ~15-second rebalance cycle where liquidity temporarily disappears. Use retry helpers.\n\n### Common mistakes\n\n- **Creating a new BalanceManager every run.** This creates orphaned shared objects. Check for existing managers via the indexer or persist the ID.\n- **Using `POST_ONLY` for taker orders.** `POST_ONLY` guarantees the order rests on the book. If it would cross and fill, it is silently rejected — no order is returned and no error is thrown.\n- **Forgetting to deposit before trading.** Orders draw from BalanceManager balances, not wallet balances. Funds must be deposited first.\n- **Not depositing DEEP for fees.** On non-whitelisted pools, DEEP must be in the BalanceManager to pay fees. Without it, trades fail.\n- **Ignoring self-matching.** When `selfMatchingOption` is not specified, the SDK defaults to `SelfMatchingOptions.SELF_MATCHING_ALLOWED`, which means your taker order can fill against your own resting maker orders. This is often unintentional. Explicitly set `SelfMatchingOptions.CANCEL_TAKER` or `SelfMatchingOptions.CANCEL_MAKER` to prevent self-fills.\n",{"data":40,"body":41},{"name":4,"description":6},{"type":42,"children":43},"root",[44,53,78,120,141,146,168,173,177,184,191,237,243,285,291,325,328,334,515,518,524,530,661,667,750,756],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"deepbook-v3-sdk",[50],{"type":51,"value":52},"text","DeepBook V3 SDK",{"type":45,"tag":54,"props":55,"children":56},"blockquote",{},[57],{"type":45,"tag":58,"props":59,"children":60},"p",{},[61,67,69,76],{"type":45,"tag":62,"props":63,"children":64},"strong",{},[65],{"type":51,"value":66},"MCP tool:",{"type":51,"value":68}," When available in your environment, also query the Sui documentation MCP server (",{"type":45,"tag":70,"props":71,"children":73},"code",{"className":72},[],[74],{"type":51,"value":75},"https:\u002F\u002Fsui.mcp.kapa.ai",{"type":51,"value":77},") for up-to-date answers. Use it for verification and for details not covered by these reference files.",{"type":45,"tag":54,"props":79,"children":80},{},[81],{"type":45,"tag":58,"props":82,"children":83},{},[84,89,91,100,102,109,111,118],{"type":45,"tag":62,"props":85,"children":86},{},[87],{"type":51,"value":88},"Source constraint:",{"type":51,"value":90}," All information in this skill is sourced exclusively from ",{"type":45,"tag":92,"props":93,"children":97},"a",{"href":94,"rel":95},"https:\u002F\u002Fdocs.sui.io\u002Fonchain-finance\u002Fdeepbook\u002Fdeepbookv3",[96],"nofollow",[98],{"type":51,"value":99},"docs.sui.io",{"type":51,"value":101},", the ",{"type":45,"tag":92,"props":103,"children":106},{"href":104,"rel":105},"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fdeepbook-sandbox\u002Ftree\u002Fmain\u002Fexamples\u002Fsandbox",[96],[107],{"type":51,"value":108},"deepbook-sandbox examples",{"type":51,"value":110},", and the ",{"type":45,"tag":92,"props":112,"children":115},{"href":113,"rel":114},"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fdeepbookv3",[96],[116],{"type":51,"value":117},"deepbookv3 repository",{"type":51,"value":119},". When extending or updating this skill, only pull from these sources. Do not use third-party blogs, tutorials, or unofficial documentation.",{"type":45,"tag":58,"props":121,"children":122},{},[123,125,131,133,139],{"type":51,"value":124},"The ",{"type":45,"tag":70,"props":126,"children":128},{"className":127},[],[129],{"type":51,"value":130},"@mysten\u002Fdeepbook-v3",{"type":51,"value":132}," SDK provides a TypeScript client for interacting with DeepBook V3 pools on Sui. This skill covers how to set up the client, manage balances, place orders, execute swaps, and handle fees. Common AI-coding mistakes include hardcoding on-chain IDs instead of using SDK pool\u002Fcoin keys, creating a new BalanceManager per transaction instead of reusing one, and using non-numeric ",{"type":45,"tag":70,"props":134,"children":136},{"className":135},[],[137],{"type":51,"value":138},"clientOrderId",{"type":51,"value":140}," values.",{"type":45,"tag":58,"props":142,"children":143},{},[144],{"type":51,"value":145},"This skill routes to focused reference files. Load only the ones relevant to the current task.",{"type":45,"tag":58,"props":147,"children":148},{},[149,151,157,163],{"type":51,"value":150},"All patterns in this skill are derived from:\n",{"type":45,"tag":92,"props":152,"children":155},{"href":153,"rel":154},"https:\u002F\u002Fdocs.sui.io\u002Fonchain-finance\u002Fdeepbook\u002Fdeepbookv3\u002Fspot-workflow",[96],[156],{"type":51,"value":153},{"type":45,"tag":92,"props":158,"children":161},{"href":159,"rel":160},"https:\u002F\u002Fdocs.sui.io\u002Fonchain-finance\u002Fdeepbook\u002Fdeepbookv3-sdk",[96],[162],{"type":51,"value":159},{"type":45,"tag":92,"props":164,"children":166},{"href":104,"rel":165},[96],[167],{"type":51,"value":104},{"type":45,"tag":58,"props":169,"children":170},{},[171],{"type":51,"value":172},"If unsure about any API, fetch the relevant page before answering.\nDo not guess or extrapolate from other SDKs or libraries.",{"type":45,"tag":174,"props":175,"children":176},"hr",{},[],{"type":45,"tag":178,"props":179,"children":181},"h2",{"id":180},"reference-files",[182],{"type":51,"value":183},"Reference files",{"type":45,"tag":185,"props":186,"children":188},"h3",{"id":187},"client-setup-client-initialization-and-balancemanager-lifecycle",[189],{"type":51,"value":190},"client-setup — Client Initialization and BalanceManager Lifecycle",{"type":45,"tag":58,"props":192,"children":193},{},[194,199,201,207,212,214,219,221,227,229,235],{"type":45,"tag":62,"props":195,"children":196},{},[197],{"type":51,"value":198},"Path:",{"type":51,"value":200}," ",{"type":45,"tag":70,"props":202,"children":204},{"className":203},[],[205],{"type":51,"value":206},"client-setup.md",{"type":45,"tag":62,"props":208,"children":209},{},[210],{"type":51,"value":211},"Load when:",{"type":51,"value":213}," setting up a DeepBook client, creating or reusing a BalanceManager, configuring the SDK for testnet or mainnet, or understanding the three-tier setup pattern (read-only, basic, advanced).\n",{"type":45,"tag":62,"props":215,"children":216},{},[217],{"type":51,"value":218},"Covers:",{"type":51,"value":220}," SDK installation, ",{"type":45,"tag":70,"props":222,"children":224},{"className":223},[],[225],{"type":51,"value":226},"SuiGrpcClient",{"type":51,"value":228}," construction with ",{"type":45,"tag":70,"props":230,"children":232},{"className":231},[],[233],{"type":51,"value":234},"$extend(deepbook({...}))",{"type":51,"value":236},", keypair setup, BalanceManager creation and reuse, deposits and withdrawals, the sandbox setup patterns.",{"type":45,"tag":185,"props":238,"children":240},{"id":239},"trading-orders-swaps-and-order-lifecycle",[241],{"type":51,"value":242},"trading — Orders, Swaps, and Order Lifecycle",{"type":45,"tag":58,"props":244,"children":245},{},[246,250,251,257,261,263,267,269,275,277,283],{"type":45,"tag":62,"props":247,"children":248},{},[249],{"type":51,"value":198},{"type":51,"value":200},{"type":45,"tag":70,"props":252,"children":254},{"className":253},[],[255],{"type":51,"value":256},"trading.md",{"type":45,"tag":62,"props":258,"children":259},{},[260],{"type":51,"value":211},{"type":51,"value":262}," placing limit or market orders, executing swaps, querying order books, checking order status, canceling orders, or understanding the order lifecycle.\n",{"type":45,"tag":62,"props":264,"children":265},{},[266],{"type":51,"value":218},{"type":51,"value":268}," limit order placement (",{"type":45,"tag":70,"props":270,"children":272},{"className":271},[],[273],{"type":51,"value":274},"POST_ONLY",{"type":51,"value":276},", ",{"type":45,"tag":70,"props":278,"children":280},{"className":279},[],[281],{"type":51,"value":282},"NO_RESTRICTION",{"type":51,"value":284},"), market order placement with retry patterns, swap functions (with and without BalanceManager), order book queries, open order queries, order cancellation, self-matching behavior, the complete order lifecycle from placement to withdrawal.",{"type":45,"tag":185,"props":286,"children":288},{"id":287},"fees-fee-structure-and-deep-staking",[289],{"type":51,"value":290},"fees — Fee Structure and DEEP Staking",{"type":45,"tag":58,"props":292,"children":293},{},[294,298,299,305,309,311,315,317,323],{"type":45,"tag":62,"props":295,"children":296},{},[297],{"type":51,"value":198},{"type":51,"value":200},{"type":45,"tag":70,"props":300,"children":302},{"className":301},[],[303],{"type":51,"value":304},"fees.md",{"type":45,"tag":62,"props":306,"children":307},{},[308],{"type":51,"value":211},{"type":51,"value":310}," the user asks about trading fees, DEEP token staking, fee discounts, how to fund a BalanceManager with DEEP, or how fees are calculated.\n",{"type":45,"tag":62,"props":312,"children":313},{},[314],{"type":51,"value":218},{"type":51,"value":316}," DEEP vs input-token fee payment, fee calculation via ",{"type":45,"tag":70,"props":318,"children":320},{"className":319},[],[321],{"type":51,"value":322},"DeepPrice",{"type":51,"value":324},", governance fee parameters, staking for fee discounts, acquiring testnet DEEP, referral system.",{"type":45,"tag":174,"props":326,"children":327},{},[],{"type":45,"tag":178,"props":329,"children":331},{"id":330},"routing-guide",[332],{"type":51,"value":333},"Routing guide",{"type":45,"tag":335,"props":336,"children":337},"table",{},[338,357],{"type":45,"tag":339,"props":340,"children":341},"thead",{},[342],{"type":45,"tag":343,"props":344,"children":345},"tr",{},[346,352],{"type":45,"tag":347,"props":348,"children":349},"th",{},[350],{"type":51,"value":351},"Task",{"type":45,"tag":347,"props":353,"children":354},{},[355],{"type":51,"value":356},"Load",{"type":45,"tag":358,"props":359,"children":360},"tbody",{},[361,375,387,399,411,423,435,447,459,472,484,500],{"type":45,"tag":343,"props":362,"children":363},{},[364,370],{"type":45,"tag":365,"props":366,"children":367},"td",{},[368],{"type":51,"value":369},"Setting up a DeepBook client",{"type":45,"tag":365,"props":371,"children":372},{},[373],{"type":51,"value":374},"client-setup",{"type":45,"tag":343,"props":376,"children":377},{},[378,383],{"type":45,"tag":365,"props":379,"children":380},{},[381],{"type":51,"value":382},"Creating or reusing a BalanceManager",{"type":45,"tag":365,"props":384,"children":385},{},[386],{"type":51,"value":374},{"type":45,"tag":343,"props":388,"children":389},{},[390,395],{"type":45,"tag":365,"props":391,"children":392},{},[393],{"type":51,"value":394},"Depositing or withdrawing funds",{"type":45,"tag":365,"props":396,"children":397},{},[398],{"type":51,"value":374},{"type":45,"tag":343,"props":400,"children":401},{},[402,407],{"type":45,"tag":365,"props":403,"children":404},{},[405],{"type":51,"value":406},"Placing a limit order",{"type":45,"tag":365,"props":408,"children":409},{},[410],{"type":51,"value":24},{"type":45,"tag":343,"props":412,"children":413},{},[414,419],{"type":45,"tag":365,"props":415,"children":416},{},[417],{"type":51,"value":418},"Placing a market order",{"type":45,"tag":365,"props":420,"children":421},{},[422],{"type":51,"value":24},{"type":45,"tag":343,"props":424,"children":425},{},[426,431],{"type":45,"tag":365,"props":427,"children":428},{},[429],{"type":51,"value":430},"Executing a swap",{"type":45,"tag":365,"props":432,"children":433},{},[434],{"type":51,"value":24},{"type":45,"tag":343,"props":436,"children":437},{},[438,443],{"type":45,"tag":365,"props":439,"children":440},{},[441],{"type":51,"value":442},"Querying the order book",{"type":45,"tag":365,"props":444,"children":445},{},[446],{"type":51,"value":24},{"type":45,"tag":343,"props":448,"children":449},{},[450,455],{"type":45,"tag":365,"props":451,"children":452},{},[453],{"type":51,"value":454},"Checking or canceling orders",{"type":45,"tag":365,"props":456,"children":457},{},[458],{"type":51,"value":24},{"type":45,"tag":343,"props":460,"children":461},{},[462,467],{"type":45,"tag":365,"props":463,"children":464},{},[465],{"type":51,"value":466},"Understanding fees or staking",{"type":45,"tag":365,"props":468,"children":469},{},[470],{"type":51,"value":471},"fees",{"type":45,"tag":343,"props":473,"children":474},{},[475,480],{"type":45,"tag":365,"props":476,"children":477},{},[478],{"type":51,"value":479},"Funding a BalanceManager with DEEP",{"type":45,"tag":365,"props":481,"children":482},{},[483],{"type":51,"value":471},{"type":45,"tag":343,"props":485,"children":486},{},[487,492],{"type":45,"tag":365,"props":488,"children":489},{},[490],{"type":51,"value":491},"Building a complete trading bot",{"type":45,"tag":365,"props":493,"children":494},{},[495],{"type":45,"tag":62,"props":496,"children":497},{},[498],{"type":51,"value":499},"all reference files",{"type":45,"tag":343,"props":501,"children":502},{},[503,508],{"type":45,"tag":365,"props":504,"children":505},{},[506],{"type":51,"value":507},"Full spot trading workflow",{"type":45,"tag":365,"props":509,"children":510},{},[511],{"type":45,"tag":62,"props":512,"children":513},{},[514],{"type":51,"value":499},{"type":45,"tag":174,"props":516,"children":517},{},[],{"type":45,"tag":178,"props":519,"children":521},{"id":520},"skill-content",[522],{"type":51,"value":523},"Skill Content",{"type":45,"tag":185,"props":525,"children":527},{"id":526},"key-concepts",[528],{"type":51,"value":529},"Key concepts",{"type":45,"tag":531,"props":532,"children":533},"ul",{},[534,608,633,643],{"type":45,"tag":535,"props":536,"children":537},"li",{},[538,551,553,559,561,566,568,574,576,582,584,590,592,598,600,606],{"type":45,"tag":62,"props":539,"children":540},{},[541,543,549],{"type":51,"value":542},"DeepBook client via ",{"type":45,"tag":70,"props":544,"children":546},{"className":545},[],[547],{"type":51,"value":548},"$extend",{"type":51,"value":550},".",{"type":51,"value":552}," The SDK uses the ",{"type":45,"tag":70,"props":554,"children":556},{"className":555},[],[557],{"type":51,"value":558},"deepbook",{"type":51,"value":560}," function (imported from ",{"type":45,"tag":70,"props":562,"children":564},{"className":563},[],[565],{"type":51,"value":130},{"type":51,"value":567},") with ",{"type":45,"tag":70,"props":569,"children":571},{"className":570},[],[572],{"type":51,"value":573},"SuiGrpcClient.$extend(deepbook({...}))",{"type":51,"value":575}," to add DeepBook-specific transaction builders. Methods follow a curried pattern under two namespaces: ",{"type":45,"tag":70,"props":577,"children":579},{"className":578},[],[580],{"type":51,"value":581},"client.deepbook.deepBook.method({ params })(tx)",{"type":51,"value":583}," for trading operations and ",{"type":45,"tag":70,"props":585,"children":587},{"className":586},[],[588],{"type":51,"value":589},"client.deepbook.balanceManager.method({ params })(tx)",{"type":51,"value":591}," for balance management, where ",{"type":45,"tag":70,"props":593,"children":595},{"className":594},[],[596],{"type":51,"value":597},"tx",{"type":51,"value":599}," is a ",{"type":45,"tag":70,"props":601,"children":603},{"className":602},[],[604],{"type":51,"value":605},"Transaction",{"type":51,"value":607}," object.",{"type":45,"tag":535,"props":609,"children":610},{},[611,616,618,624,625,631],{"type":45,"tag":62,"props":612,"children":613},{},[614],{"type":51,"value":615},"Pool and coin keys.",{"type":51,"value":617}," The SDK references pools and coins by string keys (e.g., ",{"type":45,"tag":70,"props":619,"children":621},{"className":620},[],[622],{"type":51,"value":623},"\"DEEP_SUI\"",{"type":51,"value":276},{"type":45,"tag":70,"props":626,"children":628},{"className":627},[],[629],{"type":51,"value":630},"\"SUI\"",{"type":51,"value":632},") rather than raw on-chain addresses. The SDK maps these to the correct addresses per network.",{"type":45,"tag":535,"props":634,"children":635},{},[636,641],{"type":45,"tag":62,"props":637,"children":638},{},[639],{"type":51,"value":640},"BalanceManager lifecycle.",{"type":51,"value":642}," A BalanceManager is a shared on-chain object. Create it once, persist its ID, and reuse it across transactions. Creating a new one per transaction wastes gas and creates orphaned objects.",{"type":45,"tag":535,"props":644,"children":645},{},[646,651,653,659],{"type":45,"tag":62,"props":647,"children":648},{},[649],{"type":51,"value":650},"Swaps vs orders.",{"type":51,"value":652}," Swaps operate directly on wallet ",{"type":45,"tag":70,"props":654,"children":656},{"className":655},[],[657],{"type":51,"value":658},"Coin",{"type":51,"value":660}," objects without a BalanceManager. Orders require a BalanceManager with deposited funds.",{"type":45,"tag":185,"props":662,"children":664},{"id":663},"rules",[665],{"type":51,"value":666},"Rules",{"type":45,"tag":668,"props":669,"children":670},"ol",{},[671,681,712,722,740],{"type":45,"tag":535,"props":672,"children":673},{},[674,679],{"type":45,"tag":62,"props":675,"children":676},{},[677],{"type":51,"value":678},"Always use SDK keys for pools and coins.",{"type":51,"value":680}," Never hardcode on-chain IDs — the SDK handles address resolution per network.",{"type":45,"tag":535,"props":682,"children":683},{},[684,694,696,702,704,710],{"type":45,"tag":62,"props":685,"children":686},{},[687,692],{"type":45,"tag":70,"props":688,"children":690},{"className":689},[],[691],{"type":51,"value":138},{"type":51,"value":693}," must be a numeric string",{"type":51,"value":695}," (encoded as ",{"type":45,"tag":70,"props":697,"children":699},{"className":698},[],[700],{"type":51,"value":701},"u64",{"type":51,"value":703},"). Labels like ",{"type":45,"tag":70,"props":705,"children":707},{"className":706},[],[708],{"type":51,"value":709},"\"order-1\"",{"type":51,"value":711}," will fail.",{"type":45,"tag":535,"props":713,"children":714},{},[715,720],{"type":45,"tag":62,"props":716,"children":717},{},[718],{"type":51,"value":719},"Reuse BalanceManagers.",{"type":51,"value":721}," Persist the ID from creation and pass it when constructing the client.",{"type":45,"tag":535,"props":723,"children":724},{},[725,730,732,738],{"type":45,"tag":62,"props":726,"children":727},{},[728],{"type":51,"value":729},"Size deposits to wallet balance.",{"type":51,"value":731}," The SDK validates at build time — depositing more than the wallet holds causes an ",{"type":45,"tag":70,"props":733,"children":735},{"className":734},[],[736],{"type":51,"value":737},"Insufficient balance",{"type":51,"value":739}," error before the transaction is even submitted.",{"type":45,"tag":535,"props":741,"children":742},{},[743,748],{"type":45,"tag":62,"props":744,"children":745},{},[746],{"type":51,"value":747},"Handle the market maker rebalance window",{"type":51,"value":749}," on localnet\u002Fsandbox. The sandbox market maker has a ~15-second rebalance cycle where liquidity temporarily disappears. Use retry helpers.",{"type":45,"tag":185,"props":751,"children":753},{"id":752},"common-mistakes",[754],{"type":51,"value":755},"Common mistakes",{"type":45,"tag":531,"props":757,"children":758},{},[759,769,792,802,812],{"type":45,"tag":535,"props":760,"children":761},{},[762,767],{"type":45,"tag":62,"props":763,"children":764},{},[765],{"type":51,"value":766},"Creating a new BalanceManager every run.",{"type":51,"value":768}," This creates orphaned shared objects. Check for existing managers via the indexer or persist the ID.",{"type":45,"tag":535,"props":770,"children":771},{},[772,784,785,790],{"type":45,"tag":62,"props":773,"children":774},{},[775,777,782],{"type":51,"value":776},"Using ",{"type":45,"tag":70,"props":778,"children":780},{"className":779},[],[781],{"type":51,"value":274},{"type":51,"value":783}," for taker orders.",{"type":51,"value":200},{"type":45,"tag":70,"props":786,"children":788},{"className":787},[],[789],{"type":51,"value":274},{"type":51,"value":791}," guarantees the order rests on the book. If it would cross and fill, it is silently rejected — no order is returned and no error is thrown.",{"type":45,"tag":535,"props":793,"children":794},{},[795,800],{"type":45,"tag":62,"props":796,"children":797},{},[798],{"type":51,"value":799},"Forgetting to deposit before trading.",{"type":51,"value":801}," Orders draw from BalanceManager balances, not wallet balances. Funds must be deposited first.",{"type":45,"tag":535,"props":803,"children":804},{},[805,810],{"type":45,"tag":62,"props":806,"children":807},{},[808],{"type":51,"value":809},"Not depositing DEEP for fees.",{"type":51,"value":811}," On non-whitelisted pools, DEEP must be in the BalanceManager to pay fees. Without it, trades fail.",{"type":45,"tag":535,"props":813,"children":814},{},[815,820,822,828,830,836,838,844,846,852],{"type":45,"tag":62,"props":816,"children":817},{},[818],{"type":51,"value":819},"Ignoring self-matching.",{"type":51,"value":821}," When ",{"type":45,"tag":70,"props":823,"children":825},{"className":824},[],[826],{"type":51,"value":827},"selfMatchingOption",{"type":51,"value":829}," is not specified, the SDK defaults to ",{"type":45,"tag":70,"props":831,"children":833},{"className":832},[],[834],{"type":51,"value":835},"SelfMatchingOptions.SELF_MATCHING_ALLOWED",{"type":51,"value":837},", which means your taker order can fill against your own resting maker orders. This is often unintentional. Explicitly set ",{"type":45,"tag":70,"props":839,"children":841},{"className":840},[],[842],{"type":51,"value":843},"SelfMatchingOptions.CANCEL_TAKER",{"type":51,"value":845}," or ",{"type":45,"tag":70,"props":847,"children":849},{"className":848},[],[850],{"type":51,"value":851},"SelfMatchingOptions.CANCEL_MAKER",{"type":51,"value":853}," to prevent self-fills.",{"items":855,"total":1005},[856,872,883,893,910,926,938,951,964,975,986,997],{"slug":857,"name":857,"fn":858,"description":859,"org":860,"tags":861,"stars":869,"repoUrl":870,"updatedAt":871},"move-bytecode-comprehension","analyze and disassemble Move bytecode","Use when reading or reasoning about compiled Move bytecode or `sui move disassemble` output. Mental model for the binary format, what survives compilation (and what's lost), and how to read disassembly soundly. Trigger on \"what does this package do?\", \"read this .mv module\", \"interpret this disassembly\", or whenever an analysis needs to interpret bytecode faithfully.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[862,865,868],{"name":863,"slug":864,"type":15},"Code Analysis","code-analysis",{"name":866,"slug":867,"type":15},"Engineering","engineering",{"name":14,"slug":8,"type":15},7724,"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002Fsui","2026-07-16T05:59:32.904886",{"slug":873,"name":873,"fn":874,"description":875,"org":876,"tags":877,"stars":869,"repoUrl":870,"updatedAt":882},"official-sui-skills","access official Sui development resources","Pointer to the official Mysten Labs skills for building on Sui — language fundamentals, object model, PTBs, SDKs, publishing, upgrades, frontend integration, accessing on-chain data. Maintained upstream at github.com\u002FMystenLabs\u002Fskills; pinned to the same ref the audit catalog derives from (see maintenance\u002FUPSTREAMS.md). Trigger on \"build a contract\", \"publish a package\", \"upgrade a module or package\", \"use the TypeScript SDK\", \"write a PTB\", \"set up a Sui client\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[878,881],{"name":879,"slug":880,"type":15},"Documentation","documentation",{"name":14,"slug":8,"type":15},"2026-07-16T06:00:59.641382",{"slug":884,"name":884,"fn":885,"description":886,"org":887,"tags":888,"stars":869,"repoUrl":870,"updatedAt":892},"sui-and-move-tools","disassemble Sui Move bytecode","Use to get bytecode for a deployed Sui package and produce a disassembled working view. One GraphQL call fetches every module's raw bytecode bytes; `sui move disassemble` (already on the system, running `sui prompt`) produces `.asm` files for analysis. Trigger on \"fetch this package's bytecode\", \"get me the .mv for package X\", \"disassemble this package\", or \"I need to read a deployed Sui package\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[889,890,891],{"name":863,"slug":864,"type":15},{"name":866,"slug":867,"type":15},{"name":14,"slug":8,"type":15},"2026-07-16T06:02:25.3633",{"slug":894,"name":894,"fn":895,"description":896,"org":897,"tags":898,"stars":869,"repoUrl":870,"updatedAt":909},"sui-move-security-review","audit Sui Move smart contracts","Use when auditing, reviewing, or hunting for vulnerabilities in Move code on Sui. Applies equally to source code (.move files) and to disassembly of compiled bytecode (on-chain packages). A checklist of invariants whose VIOLATION causes exploitable bugs: access control & capabilities, struct abilities & type safety, object lifecycle & ownership, shared-object and PTB attack surface, dynamic fields & collections, arithmetic & coins, init\u002FOTW\u002Fpackage upgrades, hot-potato composability, time & on-chain randomness, and test-only code leakage. Trigger on \"audit this Move code\", \"find vulnerabilities in this Sui contract\", \"security review\", \"is this package safe?\", \"I suspect there's a bug in X\", \"something is wrong with this contract\", or when reasoning about whether a Move function can be abused.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[899,902,905,908],{"name":900,"slug":901,"type":15},"Code Review","code-review",{"name":903,"slug":904,"type":15},"Security","security",{"name":906,"slug":907,"type":15},"Smart Contracts","smart-contracts",{"name":14,"slug":8,"type":15},"2026-07-16T06:02:55.691149",{"slug":911,"name":911,"fn":912,"description":913,"org":914,"tags":915,"stars":923,"repoUrl":924,"updatedAt":925},"memwal","integrate Walrus Memory SDK","Walrus Memory SDK — portable agent memory that works across apps, sessions, and workflows.\n\nUse when users say:\n- \"add memory to my app\"\n- \"portable agent memory\"\n- \"integrate Walrus Memory\"\n- \"AI agent memory\"\n- \"memory across agents\"\n- \"Walrus memory storage\"\n- \"setup Walrus Memory\"\n- \"recall memories\"\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[916,919,922],{"name":917,"slug":918,"type":15},"Agents","agents",{"name":920,"slug":921,"type":15},"Memory","memory",{"name":26,"slug":27,"type":15},57,"https:\u002F\u002Fgithub.com\u002FMystenLabs\u002FMemWal","2026-08-20T03:29:22.543459",{"slug":927,"name":927,"fn":928,"description":929,"org":930,"tags":931,"stars":28,"repoUrl":29,"updatedAt":937},"accessing-data","read data from the Sui network","How to read data from the Sui network. Use when choosing or implementing a data access strategy — queries for on-chain state, indexing pipelines, historical lookups, event subscriptions, cross-chain reads, or off-chain blob storage. Covers the two live Sui APIs (gRPC and GraphQL RPC), the Archival Store, the General-Purpose Indexer, the `sui-indexer-alt` custom indexing framework, and Walrus for off-chain blobs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[932,935,936],{"name":933,"slug":934,"type":15},"Data Analysis","data-analysis",{"name":14,"slug":8,"type":15},{"name":20,"slug":21,"type":15},"2026-08-01T05:44:32.775598",{"slug":939,"name":939,"fn":940,"description":941,"org":942,"tags":943,"stars":28,"repoUrl":29,"updatedAt":950},"composable-move-functions","design composable Sui Move functions","Use when writing Move functions on Sui, especially public APIs. Applies to function visibility (public vs entry), parameter ordering, and return patterns. Use whenever designing function signatures or deciding whether functions should transfer objects or return them.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[944,947,948,949],{"name":945,"slug":946,"type":15},"API Development","api-development",{"name":906,"slug":907,"type":15},{"name":14,"slug":8,"type":15},{"name":20,"slug":21,"type":15},"2026-07-16T06:02:49.198495",{"slug":952,"name":952,"fn":953,"description":954,"org":955,"tags":956,"stars":28,"repoUrl":29,"updatedAt":963},"deepbook-margin","build margin trading applications on Sui","DeepBook Margin leveraged trading on Sui. Use when building margin trading applications, understanding leveraged positions, risk ratios, liquidation mechanics, interest rate models, MarginManager lifecycle, or integrating margin trading into a protocol. Also use when the user asks about borrowing against collateral on DeepBook, margin pool parameters, or the differences between spot and margin trading.\nFor spot trading and the DeepBook SDK, see the `deepbook-sdk` skill. For DeepBook architecture and contract addresses, see the `deepbook-overview` skill. For Move smart contract integration, see the `deepbook-move` skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[957,960,961,962],{"name":958,"slug":959,"type":15},"Finance","finance",{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},"2026-08-24T03:57:04.577326",{"slug":965,"name":965,"fn":966,"description":967,"org":968,"tags":969,"stars":28,"repoUrl":29,"updatedAt":974},"deepbook-move","integrate DeepBook pools into Move contracts","DeepBook V3 Move smart contract integration. Use when writing, reviewing, or debugging Move code that integrates with DeepBook pools — placing orders from on-chain contracts, creating pools, using flash loans, accessing BalanceManager from Move, or composing DeepBook operations in programmable transaction blocks.\nFor DeepBook architecture and contract addresses, see the `deepbook-overview` skill. For TypeScript SDK usage, see the `deepbook-sdk` skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[970,971,972,973],{"name":906,"slug":907,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},"2026-08-24T03:57:01.149367",{"slug":976,"name":976,"fn":977,"description":978,"org":979,"tags":980,"stars":28,"repoUrl":29,"updatedAt":985},"deepbook-overview","explain DeepBook V3 architecture and concepts","High-level overview of DeepBook V3 on Sui — architecture, key concepts, integration models, contract addresses, supported coins, and pool information. Use when explaining DeepBook to someone new, comparing integration approaches (Move vs SDK vs read-only), looking up mainnet\u002Ftestnet contract addresses, or understanding the Pool\u002FBook\u002FState\u002FVault design.\nFor TypeScript SDK usage and trading, see the `deepbook-sdk` skill. For Move smart contract integration, see the `deepbook-move` skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[981,982,983,984],{"name":879,"slug":880,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},"2026-08-24T03:57:01.535714",{"slug":987,"name":987,"fn":988,"description":989,"org":990,"tags":991,"stars":28,"repoUrl":29,"updatedAt":996},"deepbook-predict","build prediction market applications on Sui","DeepBook Predict — expiry-based prediction market protocol on Sui. Use when building prediction market applications, minting binary or vertical range positions, understanding oracle lifecycle, working with PredictManager accounts, or integrating vault liquidity (PLP). Also use when the user asks about DeepBook binary options, range positions, DUSDC, OracleSVI, or settlement.\nNote: DeepBook Predict is currently on Testnet only. Smart contracts may change before Mainnet deployment.\nFor spot trading, see the `deepbook-sdk` skill. For margin trading, see the `deepbook-margin` skill. For DeepBook architecture, see the `deepbook-overview` skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[992,993,994,995],{"name":958,"slug":959,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},"2026-08-24T03:57:04.953545",{"slug":4,"name":4,"fn":5,"description":6,"org":998,"tags":999,"stars":28,"repoUrl":29,"updatedAt":30},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1000,1001,1002,1003,1004],{"name":26,"slug":27,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},42,{"items":1007,"total":1057},[1008,1014,1021,1028,1035,1042,1049],{"slug":927,"name":927,"fn":928,"description":929,"org":1009,"tags":1010,"stars":28,"repoUrl":29,"updatedAt":937},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1011,1012,1013],{"name":933,"slug":934,"type":15},{"name":14,"slug":8,"type":15},{"name":20,"slug":21,"type":15},{"slug":939,"name":939,"fn":940,"description":941,"org":1015,"tags":1016,"stars":28,"repoUrl":29,"updatedAt":950},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1017,1018,1019,1020],{"name":945,"slug":946,"type":15},{"name":906,"slug":907,"type":15},{"name":14,"slug":8,"type":15},{"name":20,"slug":21,"type":15},{"slug":952,"name":952,"fn":953,"description":954,"org":1022,"tags":1023,"stars":28,"repoUrl":29,"updatedAt":963},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1024,1025,1026,1027],{"name":958,"slug":959,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"slug":965,"name":965,"fn":966,"description":967,"org":1029,"tags":1030,"stars":28,"repoUrl":29,"updatedAt":974},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1031,1032,1033,1034],{"name":906,"slug":907,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"slug":976,"name":976,"fn":977,"description":978,"org":1036,"tags":1037,"stars":28,"repoUrl":29,"updatedAt":985},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1038,1039,1040,1041],{"name":879,"slug":880,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"slug":987,"name":987,"fn":988,"description":989,"org":1043,"tags":1044,"stars":28,"repoUrl":29,"updatedAt":996},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1045,1046,1047,1048],{"name":958,"slug":959,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":20,"slug":21,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":1050,"tags":1051,"stars":28,"repoUrl":29,"updatedAt":30},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1052,1053,1054,1055,1056],{"name":26,"slug":27,"type":15},{"name":14,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},25]