mexc-net

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

Coding rules for using the Mexc.Net C#/.NET library to access the MEXC cryptocurrency exchange. MEXC is a crypto trading platform, and C#/.NET is Microsoft’s programming ecosystem.

In plain words
What is it for?
It guides code for MEXC market data, account actions, trading, futures, and WebSocket data, including checking results and using the correct spot or futures symbol format.
Why use it?
It prevents raw HTTP calls from bypassing the library’s standard client, credentials, symbol formats, and success checks.

Cursor rule for Cursor

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

Good fit It guides code for MEXC market data, account actions, trading, futures, and…

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/jkorf/mexc.net/mexc-net.svg)](https://agentmods.dev/rules/jkorf/mexc.net/mexc-net)
Your own site
<a href="https://agentmods.dev/rules/jkorf/mexc.net/mexc-net"><img src="https://agentmods.dev/badge/rules/jkorf/mexc.net/mexc-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 917 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.00917
Opus 5 $0.00000 $0.00458
Sonnet 5 $0.00000 $0.00183
Haiku 4.5 $0.00000 $0.00092

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

Security

Grade A, and why

mexc-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 6d 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/mexc-net.mdc · 118 lines

How it starts

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

Mexc.Net Conventions

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

Client Setup Pattern

using Mexc.Net;
using Mexc.Net.Clients;

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

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

Result Pattern

All methods return WebCallResult<T> or WebCallResult for REST, and CallResult<T> for WebSocket subscriptions. 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|SubAccount}
  • restClient.FuturesApi.{ExchangeData|Account|Trading}
  • socketClient.SpotApi for spot WebSocket streams
  • socketClient.FuturesApi for futures WebSocket streams
  • SpotApi.SharedClient and FuturesApi.SharedClient for CryptoExchange.Net.SharedApis

Symbol Formats

  • Spot: BTCUSDT
  • Futures: BTC_USDT

Order Placement

Let the library omit/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,
    OrderType.Limit,
    quantity: 0.001m,
    price: 50000m);

WebSocket Pattern

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

await socketClient.UnsubscribeAsync(sub.Data);

Spot private streams require a listen key:

var listenKey = await restClient.SpotApi.Account.StartUserStreamAsync();
if (!listenKey.Success) return;

var orderSub = await socketClient.SpotApi.SubscribeToOrderUpdatesAsync(
    listenKey.Data,
    update => { /* update.Data.Status */ });

Read the full file on GitHub · 118 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. 6d ago First seen · 118 lines · 0 tokens per session scan A ba903a724e10

Subscribe to this mod's changes

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