Skill 詳細

injective-trading-account

Monitors trading balances, positions, and P&L.

一致度直接一致トレーディング 向けにレビュー済み
出典injectivelabs/agent-skills外部ソース
報告インストール数28人気度の参考値

使用前に確認

自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。

保存された出典プレビュー

SKILL.md

これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。

---
name: injective-trading-account
description: 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.
uses: ["injective-mcp-servers"]
license: MIT
metadata:
  author: ckhbtc
  version: "0.0.0"
---

# Injective Trading Account, Skill Guide

Query balances and open positions for any Injective account.
No transactions/ signatures required.
All reads are public.

## When to apply

- When you are trading on Injective, and need information about your account
- When you are performing queries but not intending to perform transactions

## MCP Tools

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.

### account_balances

Returns bank + subaccount balances for an address.

```text
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 ID
  - `denom` - token denom
  - `deposit.totalBalance` - total (available + in orders)
  - `deposit.availableBalance` - free to trade

### account_positions

Returns open perpetual positions with P&L.

```text
account_positions
  address: inj1...
  market: BTC         ← optional: filter by symbol
```

Returns per position:
- `market` - symbol (BTC, ETH, etc.)
- `direction` - long | short
- `quantity` - contracts held
- `entryPrice` - average entry in USDT
- `markPrice` - current oracle price
- `unrealizedPnl` - USDT P&L at mark price
- `margin` - posted margin
- `leverage` - effective leverage

### token_metadata

Resolve any denom to human-readable metadata.

```text
token_metadata
  denom: peggy0xdac17f958d2ee523a2206206994597c13d831ec7
```

Returns: `{ symbol, name, decimals, type, peggyDenom }`

## Activities

When the user's request contains the following questions, map them to the MCP tool calls indicated.

### "What's my balance?"

```text
account_balances(address: inj1...)
→ show bankBalances + subaccountBalances summary
```

### "Do I have enough USDT to trade?"

```text
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.

### "Show my positions and P&L"

```text
account_positions(address: inj1...)
→ display each position with entry vs mark price and unrealizedPnl
```

### "What's my total portfolio value?"

```
account_balances    → sum all balances in USD equivalent
account_positions   → add unrealized P&L
```

## Denoms

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.

## Margin Calculation

When estimating required margin for a position:

- **Add 1–2% buffer** above the exact minimum (`price × qty × initialMarginRatio`). The chain may reject orders at the exact minimum due to rounding.
- **Use `max(oraclePrice, markPrice)`** for margin validation. The chain validates against the higher of the two. Margin calculated from oracl
GitHub で全文を読む (外部ページ)
関連情報

関連する仕事