cryptoexchange-net

cryptoexchange-net is a cursor rule for Cursor from JKorf/CryptoExchange.Net. It costs 0 tokens per session (916 once invoked), scanned A, original, MIT.

A set of C# coding conventions for using one shared interface to work with several cryptocurrency exchanges, such as Binance, Bybit, and OKX.

In plain words
What is it for?
Use it when building C# applications that read market data across multiple exchanges, especially when the same code should handle each exchange.
Why use it?
It avoids writing exchange-specific code for common tasks and prevents symbol formats from differing between exchanges.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions AGENTS.md.

Good fit Use it when building C# applications that read market data across multiple exchanges, especially when the same code should handle each exchange.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/jkorf/cryptoexchange.net/cryptoexchange-net
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/JKorf/CryptoExchange.Net

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 cryptoexchange-net

README.md
[![agentmods](https://agentmods.dev/badge/rules/jkorf/cryptoexchange.net/cryptoexchange-net/github.svg)](https://agentmods.dev/rules/jkorf/cryptoexchange.net/cryptoexchange-net)
Your own site
<a href="https://agentmods.dev/rules/jkorf/cryptoexchange.net/cryptoexchange-net"><img src="https://agentmods.dev/badge/rules/jkorf/cryptoexchange.net/cryptoexchange-net/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 cryptoexchange-net

Your own site · 80×15
<a href="https://agentmods.dev/rules/jkorf/cryptoexchange.net/cryptoexchange-net"><img src="https://agentmods.dev/badge/rules/jkorf/cryptoexchange.net/cryptoexchange-net.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 916 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.00916
Opus 5.5 $0.00000 $0.00366
Sonnet 5.5 $0.00000 $0.00183
Haiku 4.5 $0.00000 $0.00092

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

Security

Grade A, and why

cryptoexchange-net 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 1mo 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/cryptoexchange-net.mdc · 93 lines

How it starts

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

CryptoExchange.Net conventions

CryptoExchange.Net is the base dependency for exchange-specific libraries. Install Binance.Net, Bybit.Net, JK.OKX.Net, or another exchange library; use CryptoClients.Net when the application needs the bundle.

Use Shared API V2

For new cross-exchange code, use the fine-grained interfaces in CryptoExchange.Net.SharedApis and each API surface's .SharedApi property:

using CryptoExchange.Net.SharedApis;

IGetTickerRest binance = new BinanceRestClient().SpotApi.SharedApi;
IGetTickerRest okx = new OKXRestClient().UnifiedApi.SharedApi;

var symbol = new SharedSymbol(TradingMode.Spot, "BTC", "USDT");
var result = await binance.GetTickerAsync(new GetTickerRequest(symbol));

Use one capability per operation, such as IGetTickerRest, IGetOrderBookRest, IPlaceSpotOrderRest, or ISubscribeTradesSocket. Do not use a broad V1 interface for new code. .SharedClient remains only for incremental V1 migration.

Capability discovery

When the exchange and API surface are known, assign the typed .SharedApi to the required capability. When selection is dynamic, use an exchange-wide I[Exchange]SharedApiClient and a strongly typed reference:

var match = sharedClient.GetCapability(
    SharedCapabilities.Orders.Futures.PlaceOrder.Rest,
    TradingMode.PerpetualLinear);

if (match is not null)
    await match.Capability.PlaceFuturesOrderAsync(request);

GetCapability returns one preferred match or null; GetCapabilities returns all matches. Specify TradingMode when multiple API surfaces may implement the same capability. A SharedCapabilities reference is a lookup key, not proof of exchange support.

Symbols and parameters

Use SharedSymbol instead of native strings such as BTCUSDT. The exchange library performs formatting.

Capability presence does not imply support for every request property. For dynamic code, inspect match.Options.RequestParameterRules, ExchangeParameterRules, and SupportedTradingModes. Supply exchange-specific values through the request's ExchangeParameters.

Read the full file on GitHub · 93 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. 1mo ago Changed · +5 lines 02a6120240fb
  2. 1mo ago First seen · 88 lines · 0 tokens per session scan A 92109a661ff2

Subscribe to this mod's changes

cryptoexchange-net is a cursor rule published in the GitHub repository JKorf/CryptoExchange.Net (570 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 916 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.