100-exchange-integration

100-exchange-integration is a cursor rule for Cursor from juandoroteoflesiauni-lang/Market-options-stocks-Scanner. It costs 0 tokens per session (2,374 once invoked), scanned A, original, Apache-2.0.

Rules for connecting the trading terminal to exchanges such as Binance and MetaTrader 5. An adapter is a separate connector that gives each exchange the same interface to the rest of the application.

In plain words
What is it for?
Use it when implementing exchange connections, orders, tickers, balances and other exchange-specific integrations.
Why use it?
It prevents the application from depending on one exchange’s API and makes changing or adding exchanges less disruptive.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when implementing exchange connections, orders, tickers, balances and other exchange-specific integrations.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/juandoroteoflesiauni-lang/Market-options-stocks-Scanner

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 100-exchange-integration

README.md
[![agentmods](https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration/github.svg)](https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration)
Your own site
<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 100-exchange-integration

Your own site · 80×15
<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/100-exchange-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,374 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02374
Opus 5 $0.00000 $0.01187
Sonnet 5 $0.00000 $0.00475
Haiku 4.5 $0.00000 $0.00237

Measured 12d ago against content hash df45ea78a45b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

100-exchange-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/100-exchange-integration.mdc · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🔗 INTEGRACIÓN CON EXCHANGES — TRADING TERMINAL

PRINCIPIO: ADAPTADOR UNIVERSAL

El sistema NUNCA debe depender directamente de la API de un exchange específico. Todos los exchanges se acceden a través de un adaptador que implementa la misma interfaz. Esto permite cambiar de Binance a MT5 sin tocar el resto del código.


🏗️ INTERFAZ BASE DEL EXCHANGE

# adapters/base_exchange.py

from abc import ABC, abstractmethod
from decimal import Decimal
from typing import AsyncIterator
from dataclasses import dataclass
from datetime import datetime

@dataclass
class OrderResult:
    order_id: str
    symbol: str
    side: str
    order_type: str
    quantity: Decimal
    fill_price: Decimal
    status: str
    timestamp: datetime
    exchange: str

@dataclass
class Ticker:
    symbol: str
    price: Decimal
    bid: Decimal
    ask: Decimal
    volume_24h: Decimal
    change_24h_pct: Decimal
    timestamp: datetime

@dataclass
class Balance:
    asset: str
    free: Decimal
    locked: Decimal

    @property
    def total(self) -> Decimal:
        return self.free + self.locked

class BaseExchangeAdapter(ABC):
    """
    Interfaz que TODOS los exchanges deben implementar.

    Si agregas un exchange nuevo, implementa esta clase.
    No modifiques el código que llama a esta interfaz.
    """

    @abstractmethod
    async def get_ticker(self, symbol: str) -> Ticker:
        """Obtener precio actual y datos de mercado."""
        ...

    @abstractmethod
    async def get_balances(self) -> list[Balance]:
        """Obtener todos los balances de la cuenta."""
        ...

    @abstractmethod
    async def place_order(
        self,
        symbol: str,
        side: str,          # "BUY" o "SELL"
        order_type: str,    # "MARKET" o "LIMIT"
        quantity: Decimal,
        price: Decimal | None = None
    ) -> OrderResult:
        """Enviar orden al exchange."""
        ...

    @abstractmethod
    async def cancel_order(self, symbol: str, order_id: str) -> bool:
        """Cancelar orden pendiente."""
        ...

    @abstractmethod
    async def get_order_status(self, symbol: str, order_id: str) -> OrderResult:
        """Consultar estado de una orden."""
        ...

    @abstractmethod
    async def stream_prices(self, symbol: str) -> AsyncIterator[Ticker]:
        """Stream de precios en tiempo real."""
        ...

Read the full file on GitHub · 333 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 333 lines · 0 tokens per session scan A df45ea78a45b

Subscribe to this mod's changes

100-exchange-integration is a cursor rule published in the GitHub repository juandoroteoflesiauni-lang/Market-options-stocks-Scanner (11 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,374 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.