skills/injective-trading-account/SKILL.md
Analyze any Injective wallet address. Query bank balances across all token types (INJ, USDT, IBC assets, Peggy ERC-20s), inspect trading subaccount balances, and view open perpetual positions with unrealized P&L. Useful for portfolio monitoring, position management, and pre-trade checks. Requires the Injective MCP server to be connected.
npx skillsauth add injectivelabs/agent-skills injective-trading-accountInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query balances and open positions for any Injective account. No transactions/ signatures required. All reads are public.
The following tools in the Injective MCP Server are used by this skill.
Use the injective-mcp-servers skill for instructions on set up and usage.
The "activities" section describes the when and how to make these tool calls.
Returns bank + subaccount balances for an address.
account_balances
address: inj1...
denom: usdt ← optional: filter to one token
Returns:
bankBalances[] - wallet-level balances (all denoms or filtered)subaccountBalances[] - per-subaccount trading balances
subaccountId - 0x... hex IDdenom - token denomdeposit.totalBalance - total (available + in orders)deposit.availableBalance - free to tradeReturns open perpetual positions with P&L.
account_positions
address: inj1...
market: BTC ← optional: filter by symbol
Returns per position:
market - symbol (BTC, ETH, etc.)direction - long | shortquantity - contracts heldentryPrice - average entry in USDTmarkPrice - current oracle priceunrealizedPnl - USDT P&L at mark pricemargin - posted marginleverage - effective leverageResolve any denom to human-readable metadata.
token_metadata
denom: peggy0xdac17f958d2ee523a2206206994597c13d831ec7
Returns: { symbol, name, decimals, type, peggyDenom }
When the user's request contains the following questions, map them to the MCP tool calls indicated.
account_balances(address: inj1...)
→ show bankBalances + subaccountBalances summary
account_balances(address: inj1..., denom: usdt)
→ check subaccountBalances[0].deposit.availableBalance
If bank balance has USDT but subaccount doesn't:
Use subaccount_deposit to move funds in.
Note that this is not a read/ query, and will involve a transaction.
Important: Bank balance (wallet) ≠ exchange subaccount balance. Funds must be deposited to the exchange subaccount via MsgDeposit before placing derivative orders. Always check subaccount balance and auto-deposit if needed before trading.
account_positions(address: inj1...)
→ display each position with entry vs mark price and unrealizedPnl
account_balances → sum all balances in USD equivalent
account_positions → add unrealized P&L
Denoms are analogous to cryptocurrencies and fungible tokens. Injective, being a MultiVM blockchain, supports multiple categories of denoms.
Denoms of different categories have different formats. See: ./references/denom-formats.md
Use token_metadata to resolve any denom to a human-readable symbol.
When estimating required margin for a position:
price × qty × initialMarginRatio). The chain may reject orders at the exact minimum due to rounding.max(oraclePrice, markPrice) for margin validation. The chain validates against the higher of the two. Margin calculated from oracle price alone may be insufficient if mark price is higher.stakeUsdt is margin, not notional. The user's stake is their margin (collateral). qty = stake × leverage / price.Injective uses subaccounts for isolated margin.
The default subaccount index is 0:
subaccountId = address + "000000000000000000000000" + "0".padStart(24, "0") + "0000"
In practice, the MCP tools default to subaccount index 0 automatically.
Advanced users can specify subaccountId explicitly on trade tools.
This skill uses the following skills:
injective-mcp-serversIf these skills are not available, selectively run the following commands to install them:
npx skills add InjectiveLabs/agent-skills --skill injective-mcp-servers
development
Detect breaking changes in Injective core between two tagged releases. For use in developer documentation and release notes.
development
Integrate Injective RFQ taker flows into browser apps and operational quote monitors. Use this skill when building, reviewing, or debugging RFQ gateway autosign settlement, Web3Gateway AuthZ setup, manual TakerStream quote collection, RFQ open/close flows, conditional TP/SL intents, quote uptime probes, market-readiness checks, or mainnet RFQ frontend integrations. Covers mainnet parameters, canonical decimals, quote windows, signer slots, market discovery, quote-hit diagnostics, and production RFQ gotchas.
tools
Enables management of Linear issues, teams, projects, comments, or configuration via the `linear` CLI
tools
Mass create, derive, and manage Injective wallets. Generate wallets from mnemonics (BIP-44 HD derivation), create random wallets, convert between ETH/INJ addresses, and batch fund wallets with INJ or USDT. Supports bulk wallet generation and batch funding.