Bybit_AutoTrade: Instructions file for GitHub Copilot

.github/copilot-instructions.md

Bybit_AutoTrade copilot-instructions.md is an instructions file for GitHub Copilot from Vanszs/Bybit_AutoTrade. It costs 1,235 tokens per session, scanned A, original, MIT.

Project-specific instructions for a Bybit V5 trading bot with a Telegram interface, language-model integration, and an optional MCP server. Bybit is a cryptocurrency exchange, and the instructions describe its code structure and safety choices.

In plain words
What is it for?
Use them when changing, debugging, or extending this bot's Python code, exchange client, language-model routing, configuration, or MCP server.
Why use it?
They give an agent the project's architecture and rules, including the default restriction to public Bybit endpoints and the handling of private access.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is Vanszs/Bybit_AutoTrade's own configuration. It tells GitHub Copilot how to work on Bybit_AutoTrade itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Bybit_AutoTrade configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/debug_llm.py.

Reuse

Borrowing it

Nothing to install: this file belongs to Vanszs/Bybit_AutoTrade. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Vanszs/Bybit_AutoTrade/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/Vanszs/Bybit_AutoTrade

Made for: GitHub Copilot.

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 Bybit_AutoTrade copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vanszs/bybit_autotrade/copilot-instructions/github.svg)](https://agentmods.dev/instructions/vanszs/bybit_autotrade/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/vanszs/bybit_autotrade/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/vanszs/bybit_autotrade/copilot-instructions/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 Bybit_AutoTrade copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/vanszs/bybit_autotrade/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/vanszs/bybit_autotrade/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,235 This file is loaded in full into every session.
When invoked 1,235 The same file — it is already loaded in full.
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.01235 $0.01235
Opus 5.5 $0.00494 $0.00494
Sonnet 5.5 $0.00247 $0.00247
Haiku 4.5 $0.00123 $0.00123

Measured 2mo ago against content hash 77a607d63dc7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Bybit_AutoTrade copilot-instructions.md 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 2mo 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.

.github/copilot-instructions.md · 142 lines

How it starts

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

Bybit Trading Bot - AI Agent Instructions

Architecture Overview

This is a unified Bybit V5 trading bot with Telegram interface, LLM integration, and MCP server capabilities. The architecture follows a public-first design with clear private endpoint gating.

Core Components

  • src/main.py: Single unified entrypoint with EnhancedBybitBot class - handle Telegram commands and natural language queries
  • src/bybit_client.py: Bybit V5 REST client with authentication, simulation modes, and strict public/private endpoint separation
  • src/llm.py: OpenAI-compatible client (default: Novita GPT-OSS) with error handling for balance issues
  • src/config.py: Environment-based configuration with public_only mode toggle
  • tools/mcp_server.py: Optional MCP server for external AI tool integration

Key Architectural Decisions

Public-First Design: Bot defaults to BYBIT_PUBLIC_ONLY=true mode. Private endpoints require explicit configuration and show clear guidance when unavailable.

LLM Intent Analysis: Natural language queries go through analyze_user_intent() which uses comprehensive API documentation context to route to appropriate Bybit endpoints.

Dual Authentication Modes:

  • Public-only: Market data, server time, tickers (no API keys needed)
  • Full mode: Wallet balance, positions, trading (requires BYBIT_API_KEY/BYBIT_API_SECRET)

Essential Editing Patterns

When Editing Existing Files (DO NOT CREATE NEW FILES)

Main.py Pattern: Always edit src/main.py directly. DO NOT create enhanced_main.py, main_complete.py, or similar variants.

Single Source of Truth: Update existing files rather than creating duplicates. The codebase follows this principle strictly.

API Client Extension Pattern

# In bybit_client.py - Add new endpoints following this pattern:
async def new_endpoint(self, category: str, symbol: str) -> Dict[str, Any]:
    if self.simulation_mode:
        return self._simulate_endpoint_data(symbol)
    
    if self._client is None:
        return {"retCode": 10002, "retMsg": "Client not initialized", "result": {}}
    
    # Implementation with proper error handling

Read the full file on GitHub · 142 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. 2mo ago First seen · 142 lines · 1,235 tokens per session scan A 77a607d63dc7

Subscribe to this mod's changes

Bybit_AutoTrade copilot-instructions.md is an instructions file published in the GitHub repository Vanszs/Bybit_AutoTrade (0 stars, last pushed 1y ago), licensed MIT. It adds 1,235 tokens to every session, about $0.0049 per session on Opus 5.5. 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-31.

Related

Bybit_AutoTrade copilot-instructions.md compared with instructions from other repositories

Bybit_AutoTrade copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Bybit_AutoTrade copilot-instructions.mdVanszs/Bybit_AutoTradeInstructions file01y agoMITA1,235GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k3d agoMITA4,313Codex, OpenCode