Receber por email
← Voltar para o catálogo

ib-portfolio

Get portfolio positions from Interactive Brokers. Use when user asks about their portfolio, positions, holdings, or what stocks they own. Requires TWS or IB Gateway running locally.

262estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add staskh/trading_skills

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/ib-portfolio/svg)](https://www.skillteca.com.br/skills/ib-portfolio)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

IB Portfolio

Fetch current portfolio positions from Interactive Brokers.

Prerequisites

User must have TWS or IB Gateway running locally with API enabled:

  • Paper trading: port 7497
  • Live trading: port 7496

Instructions

Note: If uv is not installed or pyproject.toml is not found, replace uv run python with python in all commands below.
uv run python scripts/portfolio.py [--port PORT]

Arguments

  • --port - IB port (default: 7496 for live trading)
  • --account - Specific IB account ID (optional, defaults to first account)

Output

Returns JSON with:

  • connected - Whether connection succeeded
  • positions - Array of positions with symbol, quantity, avg_cost, market_value, unrealized_pnl

If not connected, explain that TWS/Gateway needs to be running.

Dependencies

  • ib-async

Timezone

All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.

Compartilhar X LinkedIn