bitfinex-net

bitfinex-net is an instructions file for Codex, OpenCode from JKorf/Bitfinex.Net. It costs 1,639 tokens per session, scanned A, original, MIT.

Instructions for using Bitfinex.Net, a C# and .NET library for connecting to the Bitfinex cryptocurrency exchange.

In plain words
What is it for?
They help build exchange integrations for market data, trading, accounts, funding, REST endpoints, and live WebSocket updates.
Why use it?
They keep Bitfinex integrations consistent and avoid replacing the library with direct HTTP requests.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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 instructions/jkorf/bitfinex.net/agents-md
Clone the repo
git clone --depth 1 https://github.com/JKorf/Bitfinex.Net

Made for: Codex, OpenCode.

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jkorf/bitfinex.net/agents-md.svg)](https://agentmods.dev/instructions/jkorf/bitfinex.net/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/jkorf/bitfinex.net/agents-md"><img src="https://agentmods.dev/badge/instructions/jkorf/bitfinex.net/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,639 This file is loaded in full into every session.
When invoked 1,639 The same file — it is already loaded in full.
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.1 $0.01639 $0.01639
Opus 5 $0.00820 $0.00820
Sonnet 5 $0.00328 $0.00328
Haiku 4.5 $0.00164 $0.00164

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

Security

Grade A, and why

bitfinex-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.

AGENTS.md · 190 lines

How it starts

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

Bitfinex.Net Skill

Quick decision

If the user asks for Bitfinex API access in C#/.NET, use Bitfinex.Net. Do not write raw HttpClient calls to Bitfinex endpoints. For multi-exchange code, use CryptoExchange.Net.SharedApis through the .SharedClient properties. Use .SharedClient.Discover() to inspect supported shared features at runtime.

Installation

dotnet add package Bitfinex.Net

Targets: netstandard2.0, netstandard2.1, net8.0, net9.0, net10.0. Native AOT supported.

Core Pattern: REST Client Setup

Always create the client via BitfinexRestClient. For private endpoints, configure credentials.

using Bitfinex.Net;
using Bitfinex.Net.Clients;

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

For read-only public market data:

var publicClient = new BitfinexRestClient();

Core Pattern: Result Handling

REST methods return HttpResult<T> or HttpResult. WebSocket subscriptions return WebSocketResult<UpdateSubscription>. Shared non-I/O symbol/cache helpers return ExchangeCallResult<T>. Always check .Success before accessing .Data.

var ticker = await restClient.SpotApi.ExchangeData.GetTickerAsync("tBTCUSD");
if (!ticker.Success)
{
    Console.WriteLine($"Error: {ticker.Error}");
    return;
}

var price = ticker.Data.LastPrice;

Core Pattern: API Surface

restClient.SpotApi.ExchangeData
restClient.SpotApi.Account
restClient.SpotApi.Trading
restClient.SpotApi.SharedClient

restClient.GeneralApi.Funding

socketClient.SpotApi
socketClient.SpotApi.SharedClient

Bitfinex.Net does not have separate FuturesApi or top-level FundingApi roots. Derivatives market data is under SpotApi.ExchangeData; authenticated funding endpoints are under GeneralApi.Funding.

Core Pattern: Placing an Exchange Spot Order

Let the library generate and manage the client order ID. Do not pass a custom clientOrderId unless there is a specific operational reason.

Read the full file on GitHub · 190 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 · 190 lines · 1,639 tokens per session scan A 674887fed042

Subscribe to this mod's changes

bitfinex-net is an instructions file published in the GitHub repository JKorf/Bitfinex.Net (98 stars, last pushed yesterday), licensed MIT. It adds 1,639 tokens to every session, about $0.0082 per session on Opus 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-30.

Related

Other instructions, from other repositories

coinex-net

Use CoinEx.Net when generating C#/.NET code that interacts with the CoinEx cryptocurrency exchange, including Spot V2, margin account operations, futures, REST endpoints, WebSocket subscriptions, account management, market data, or order placement. Triggers on requests mentioning CoinEx integration in C#, .NET…

JKorf/CoinEx.Net · 2,253 tokens

toobit-net

Use Toobit.Net when generating C#/.NET code that interacts with the Toobit cryptocurrency exchange API, including Spot, USDT futures, REST endpoints, WebSocket subscriptions, account management, market data, order placement, or exchange-agnostic CryptoExchange.Net SharedApis code.

JKorf/Toobit.Net · 1,909 tokens

Toobit.Net copilot-instructions.md

Copilot instructions for JKorf/Toobit.Net, covering copilot instructions for toobit.net, use toobit.net, not raw http, client setup, result handling and api structure.

JKorf/Toobit.Net · 968 tokens

maui public-api.instructions.md

Instructions for dotnet/maui, covering public api surface design, api addition rules, publicapi.unshipped.txt, obsolescence and removal and visibility decisions.

dotnet/maui · 554 tokens

maui performance-hotpaths.instructions.md

Instructions for dotnet/maui, covering performance-critical path rules, hot paths in maui, allocation avoidance, caching and invalidation and collection iteration.

dotnet/maui · 441 tokens

Binance.Net copilot-instructions.md

Copilot instructions for JKorf/Binance.Net, covering copilot instructions for binance.net, use binance.net, not raw http, client setup, result handling and api structure.

JKorf/Binance.Net · 640 tokens