pyRofex-to-Excel - Real-time market data to Excel
Project description
pyRofex-to-Excel
Aplicación Python para obtener datos de mercado en tiempo real desde pyRofex y volcarlos a Excel.
🚀 Correr desde cero (paquete publicado en PyPI)
Si solo querés usar la app (sin clonar el repo), este es el camino más simple.
-
Requisitos mínimos
- Windows + Microsoft Excel instalado
- Python 3.9 o superior
- Acceso a Matriz (Primary API) provisto por tu Broker/ALyC
-
Instalar el paquete (rápido, sin
.venv)
python -m pip install --user pyrofex-to-excel
- Ejecutar la app
pyrofex-to-excel
Ver versión instalada:
pyrofex-to-excel --version
Alternativa equivalente:
python -m pyRofex_To_Excel
Opcional (recomendado si querés aislamiento de dependencias): usar .venv
mkdir pyrofex-app
cd pyrofex-app
python -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install pyrofex-to-excel
Qué pasa automáticamente en ese primer arranque:
- Si faltan credenciales, la app te las pide por consola y las guarda en
.env. - Si la autenticación/conexión a Matriz falla, la app corta la ejecución sin crear workbook ni sheets.
- Si la conexión a Matriz es exitosa y no existe workbook, crea uno nuevo (
.xlsx) en la ruta configurada. - Crea y prepara hojas base:
Tickers,MarketData,Trades,Formulas(solo después de validar conexión). - Intenta poblar
Tickerscon instrumentos desde caché local.
Si necesitás volver a ejecutar ese asistente (por ejemplo, usuario/clave incorrectos):
pyrofex-to-excel --reconfigure
- Verificar que está funcionando
- Abrí el workbook generado.
- Confirmá que existen las hojas
Tickers,MarketData,TradesyFormulas. - En
MarketDatadeberían empezar a actualizarse precios.
Para guía completa sin clonar (actualización/desinstalación), ver docs/INSTALACION_SIN_CLONAR.md.
🛠️ Correr con repositorio clonado (modo desarrollo)
Si vas a desarrollar en este proyecto:
git clone https://github.com/ChuchoCoder/pyRofex-to-Excel.git
cd pyRofex-to-Excel
python -m venv .venv
.venv\Scripts\activate
pip install -e . --force-reinstall
python -m pyRofex_To_Excel
📦 Nota para desarrolladores: TestPyPI
TestPyPI se usa solo para pruebas de CI/CD (por ejemplo, builds de PR) y no para usuarios finales.
Si necesitás instalar un build de testing:
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pyrofex-to-excel
🗂️ Detalle exacto de preguntas en primer inicio
Si faltan credenciales obligatorias (PYROFEX_USER, PYROFEX_PASSWORD, PYROFEX_ACCOUNT), el bootstrap interactivo solicita en este orden:
PYROFEX_USERPYROFEX_PASSWORD(input oculto)PYROFEX_ACCOUNTPYROFEX_ENVIRONMENT(default sugerido:LIVE)PYROFEX_API_URL(default sugerido:https://api.cocos.xoms.com.ar/)PYROFEX_WS_URL(default sugerido:wss://api.cocos.xoms.com.ar/)
Comportamiento importante:
- Si una variable ya tiene valor, aparece entre corchetes:
VARIABLE [valor_actual]: - Si presionás Enter y hay valor sugerido, se conserva.
- Si no hay valor sugerido en campos requeridos, vuelve a preguntar.
- Todo lo ingresado se persiste en
.envautomáticamente.
Nota sobre contraseña:
- En Windows, al escribir
PYROFEX_PASSWORDse muestra*por cada carácter. - En otros sistemas, puede mostrarse como input oculto según el terminal.
Ejemplo típico de consola:
PYROFEX_USER: mi_usuario
PYROFEX_PASSWORD: ********
PYROFEX_ACCOUNT: mi_cuenta
PYROFEX_ENVIRONMENT [LIVE]:
PYROFEX_API_URL [https://api.cocos.xoms.com.ar/]:
PYROFEX_WS_URL [wss://api.cocos.xoms.com.ar/]:
Notas de operación:
- Si ejecutás en entorno no interactivo (ej. CI) y faltan credenciales, la app falla rápido y te pide setearlas en
.env. - Si el workbook configurado no existe y termina en
.xlsb, el bootstrap lo normaliza a.xlsxpara poder crearlo automáticamente.
⚡ Atajos opcionales (desarrollo)
Si preferís usar script helper:
.\setup.ps1 install
.\setup.ps1 run
📌 Qué hace la app
- Suscribe instrumentos de
Tickerscontra pyRofex. - Actualiza cotizaciones en
MarketData(incluyendo cauciones). - Sincroniza operaciones en
Trades(modo periódico y opcional realtime). - Evita escrituras innecesarias a Excel cuando no hay cambios (mejor performance).
⚙️ Configuración principal (.env)
Variables más usadas:
EXCEL_FILE=pyRofex-Market-Data.xlsb
EXCEL_PATH=./
EXCEL_SHEET_PRICES=MarketData
EXCEL_SHEET_TICKERS=Tickers
EXCEL_SHEET_TRADES=Trades
EXCEL_UPDATE_INTERVAL=3.0
TRADES_SYNC_ENABLED=true
TRADES_REALTIME_ENABLED=false
TRADES_SYNC_INTERVAL_SECONDS=20
TRADES_BATCH_SIZE=500
PYROFEX_ENVIRONMENT=LIVE
PYROFEX_API_URL=https://api.cocos.xoms.com.ar/
PYROFEX_WS_URL=wss://api.cocos.xoms.com.ar/
PYROFEX_CONNECTION_TIMEOUT_SECONDS=20
PYROFEX_USER=REPLACE_WITH_YOUR_USERNAME
PYROFEX_PASSWORD=REPLACE_WITH_YOUR_PASSWORD
PYROFEX_ACCOUNT=REPLACE_WITH_YOUR_ACCOUNT
🧪 Validación rápida
python tools/validate_system.py
python tools/validate_quickstart.py
📚 Documentación nueva (español)
- Funcionalidades nuevas y cambios relevantes: docs/FUNCIONALIDADES_NUEVAS.md
- Publicación como paquete pip (PyPI/TestPyPI): docs/PUBLICACION_PYPI.md
- Instalación y uso sin clonar (paquete publicado): docs/INSTALACION_SIN_CLONAR.md
📦 ¿Se puede publicar como paquete pip?
Sí. El proyecto ya está prácticamente listo para publicarse porque:
- tiene
pyproject.toml - define metadata de proyecto
- expone entrypoint CLI (
pyrofex-to-excel)
Solo falta ejecutar el flujo de build + publicación (ver guía en docs/PUBLICACION_PYPI.md).
🔒 Seguridad
- Nunca subas
.envcon credenciales reales. - Rotá credenciales periódicamente.
- Revisá permisos de archivos sensibles en tu entorno local.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrofex_to_excel-1.1.6.tar.gz.
File metadata
- Download URL: pyrofex_to_excel-1.1.6.tar.gz
- Upload date:
- Size: 82.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e0056e207f8c5607aca492c3379265dd22c39d46a8381873640717f5da58b1f
|
|
| MD5 |
2c1380a39fc8f3569c5eb26f679fe0a4
|
|
| BLAKE2b-256 |
3937678807967e3570eb4d4cbc3c5d8f5fb1af295c22a7dafd26bc9da2ecd282
|
Provenance
The following attestation bundles were made for pyrofex_to_excel-1.1.6.tar.gz:
Publisher:
package-release.yml on ChuchoCoder/pyRofex-to-Excel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrofex_to_excel-1.1.6.tar.gz -
Subject digest:
7e0056e207f8c5607aca492c3379265dd22c39d46a8381873640717f5da58b1f - Sigstore transparency entry: 1006558103
- Sigstore integration time:
-
Permalink:
ChuchoCoder/pyRofex-to-Excel@7107f33368178679bee1685d6b34041c691ae061 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ChuchoCoder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package-release.yml@7107f33368178679bee1685d6b34041c691ae061 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pyrofex_to_excel-1.1.6-py3-none-any.whl.
File metadata
- Download URL: pyrofex_to_excel-1.1.6-py3-none-any.whl
- Upload date:
- Size: 86.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2020171b86b8902518a895bde95d785aa752fc44127f7346357927c6e8e670a2
|
|
| MD5 |
75fa75ecbd26c46660bec08cb9bbc0a7
|
|
| BLAKE2b-256 |
3cbb1ed2c7bf853b6bf0ffc142c5d5c56d54e72c39865d0dd8f3c9af52316866
|
Provenance
The following attestation bundles were made for pyrofex_to_excel-1.1.6-py3-none-any.whl:
Publisher:
package-release.yml on ChuchoCoder/pyRofex-to-Excel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrofex_to_excel-1.1.6-py3-none-any.whl -
Subject digest:
2020171b86b8902518a895bde95d785aa752fc44127f7346357927c6e8e670a2 - Sigstore transparency entry: 1006558107
- Sigstore integration time:
-
Permalink:
ChuchoCoder/pyRofex-to-Excel@7107f33368178679bee1685d6b34041c691ae061 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ChuchoCoder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package-release.yml@7107f33368178679bee1685d6b34041c691ae061 -
Trigger Event:
workflow_dispatch
-
Statement type: