binance-net

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

Project rules for using Binance.Net, a C#/.NET library for connecting to the Binance cryptocurrency exchange. They specify how to create clients, call exchange services, and handle returned results.

In plain words
What is it for?
Use them when generating or reviewing C#/.NET code for Binance market data, account access, trading, Spot, Futures, and related exchange APIs.
Why use it?
They keep Binance-related code consistent and reduce errors caused by using the wrong client pattern or reading failed API results as if they succeeded. They also prevent raw web requests where the project expects the library.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/jkorf/binance.net/binance-net
Clone the repo
git clone --depth 1 https://github.com/JKorf/Binance.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 binance-net

README.md
[![agentmods](https://agentmods.dev/badge/rules/jkorf/binance.net/binance-net.svg)](https://agentmods.dev/rules/jkorf/binance.net/binance-net)
Your own site
<a href="https://agentmods.dev/rules/jkorf/binance.net/binance-net"><img src="https://agentmods.dev/badge/rules/jkorf/binance.net/binance-net.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00927
Opus 5 $0.00000 $0.00464
Sonnet 5 $0.00000 $0.00185
Haiku 4.5 $0.00000 $0.00093

Measured 4d ago against content hash 6367175fc654, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

binance-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 4d 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/binance-net.mdc · 104 lines

How it starts

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

Binance.Net Conventions

This codebase uses Binance.Net for Binance cryptocurrency exchange access. Do not write raw HttpClient calls to Binance endpoints.

Client setup pattern

using Binance.Net.Clients;
using Binance.Net;
using Binance.Net.Objects;

var restClient = new BinanceRestClient(options =>
{
    options.ApiCredentials = new BinanceCredentials("API_KEY", "API_SECRET");
});

For public market data only, no credentials needed: new BinanceRestClient().

Result pattern

REST methods return HttpResult<T> / HttpResult; WebSocket subscriptions and socket API requests return WebSocketResult<T> / WebSocketResult. Always check .Success before reading .Data:

var ticker = await restClient.SpotApi.ExchangeData.GetTickerAsync("BTCUSDT");
if (!ticker.Success) { /* ticker.Error */ return; }
var price = ticker.Data.LastPrice;

API surface

  • restClient.SpotApi.{ExchangeData|Account|Trading}
  • restClient.UsdFuturesApi.{ExchangeData|Account|Trading}
  • restClient.CoinFuturesApi.{ExchangeData|Account|Trading}
  • restClient.GeneralApi.{Brokerage|Futures|CryptoLoans|AutoInvest|Mining|SubAccount|Staking|SimpleEarn|CopyTrading|GiftCard|Nft}
  • socketClient.SpotApi.{ExchangeData|Account|Trading} for WebSocket subscriptions and requests
  • socketClient.UsdFuturesApi.{ExchangeData|Account|Trading} for WebSocket subscriptions and requests
  • socketClient.CoinFuturesApi.{ExchangeData|Account|Trading} for WebSocket subscriptions

Order placement

Let the library auto-generate clientOrderId. Do not pass a custom one unless required for an existing operational flow:

var order = await restClient.SpotApi.Trading.PlaceOrderAsync(
    "BTCUSDT", OrderSide.Buy, SpotOrderType.Limit,
    quantity: 0.001m, price: 50000m, timeInForce: TimeInForce.GoodTillCanceled);

WebSocket pattern

var socketClient = new BinanceSocketClient();
var sub = await socketClient.SpotApi.ExchangeData.SubscribeToTickerUpdatesAsync(
    "BTCUSDT",
    update => { /* update.Data.LastPrice */ });
if (!sub.Success) { /* sub.Error */ return; }

// On shutdown:
await socketClient.UnsubscribeAsync(sub.Data);

Read the full file on GitHub · 104 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. 4d ago First seen · 104 lines · 0 tokens per session scan A 6367175fc654

Subscribe to this mod's changes

binance-net is a cursor rule published in the GitHub repository JKorf/Binance.Net (1,172 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 927 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.