HyperLiquid.Net copilot-instructions.md

Coding instructions for HyperLiquid.Net, a C#/.NET library for connecting to the Hyperliquid cryptocurrency exchange through REST and WebSocket APIs.

In plain words
What is it for?
Writing code that reads market data, submits or manages exchange actions, listens for updates, and handles results through HyperLiquid.Net clients.
Why use it?
They help an agent use the library's built-in handling for authentication, rate limits, data conversion, errors, and live connections instead of assembling exchange requests by hand.

Instructions file for GitHub Copilot

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/hyperliquid.net/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/JKorf/HyperLiquid.Net

Made for: GitHub Copilot.

Per session 817 This file is loaded in full into every session.
When invoked 817 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 $0.00817 $0.00817
Opus 5 $0.00409 $0.00409
Sonnet 5 $0.00163 $0.00163
Haiku 4.5 $0.00082 $0.00082

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

Security

Grade A, and why

HyperLiquid.Net 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 3d 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 · 76 lines

How it starts

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

Copilot Instructions for HyperLiquid.Net

This repository is HyperLiquid.Net, a strongly typed C#/.NET client library for the HyperLiquid DEX REST and WebSocket APIs. It is part of the CryptoExchange.Net ecosystem.

When generating code that consumes HyperLiquid.Net, follow these conventions:

Use HyperLiquid.Net, not raw HTTP

Never generate raw HttpClient calls to HyperLiquid /info, /exchange, or /ws. Use HyperLiquidRestClient and HyperLiquidSocketClient so signing, rate limiting, serialization, result handling, and WebSocket subscription management stay correct.

Client setup

using HyperLiquid.Net;
using HyperLiquid.Net.Clients;

var restClient = new HyperLiquidRestClient(options =>
{
    options.ApiCredentials = new HyperLiquidCredentials("PUBLIC_ADDRESS", "PRIVATE_KEY");
});

Public market data can use new HyperLiquidRestClient() without credentials.

Result handling

Methods return WebCallResult<T> for REST or CallResult<T> for WebSocket. Always check .Success before reading .Data; errors are on .Error.

API structure

  • restClient.SpotApi.ExchangeData - spot metadata, prices, order books, klines, HIP-4 outcomes
  • restClient.SpotApi.Account - balances, portfolio history, subaccounts, transfers, staking, ledger, fee info
  • restClient.SpotApi.Trading - spot order and trade endpoints
  • restClient.FuturesApi.ExchangeData - perp metadata, annotations/categories, prices, funding, DEX info
  • restClient.FuturesApi.Account - futures account, positions, funding history
  • restClient.FuturesApi.Trading - futures order, leverage, margin endpoints
  • socketClient.SpotApi.{Account|ExchangeData|Trading} - spot WebSocket requests and subscriptions
  • socketClient.FuturesApi.{Account|ExchangeData|Trading} - futures WebSocket requests and subscriptions

Use SpotApi.ExchangeData.GetQuestionsAndOutcomesInfoAsync(), GetSettledOutcomeAsync(outcomeId), HyperLiquidUtils.GetOutcomeInfoAsync(client, outcomeId), and socketClient.SpotApi.ExchangeData.SubscribeToOutcomeInfoUpdatesAsync(...) for HIP-4 outcome workflows.

Read the full file on GitHub · 76 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. 3d ago First seen · 76 lines · 817 tokens per session scan A b3304f1a1784

Subscribe to this mod's changes

HyperLiquid.Net copilot-instructions.md is an instructions file published in the GitHub repository JKorf/HyperLiquid.Net (21 stars, last pushed 8d ago), licensed MIT. It adds 817 tokens to every session, about $0.0041 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

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

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

xt-net

Use XT.Net when generating C#/.NET code that interacts with the XT cryptocurrency exchange API, including Spot, USDT-M Futures, Coin-M Futures, REST endpoints, WebSocket subscriptions, account balances, market data, and order placement. Triggers on XT integration requests in C#, .NET, dotnet, F#, or VB.NET context.…

JKorf/XT.Net · 3,674 tokens

WhiteBit.Net copilot-instructions.md

Instructions for JKorf/WhiteBit.Net, covering copilot instructions for whitebit.net, use whitebit.net, not raw http, client setup, result handling and api structure.

JKorf/WhiteBit.Net · 812 tokens

XT.Net copilot-instructions.md

Instructions for JKorf/XT.Net, covering copilot instructions for xt.net, use xt.net, not raw http, client setup, result handling and api structure.

JKorf/XT.Net · 806 tokens

kraken-net

Use Kraken.Net when generating C#/.NET code that interacts with the Kraken cryptocurrency exchange, including Spot REST, Spot WebSocket v2, Futures REST, Futures WebSocket, account data, market data, order placement, Kraken Earn, local order books, dependency injection, or CryptoExchange.Net SharedApis. Triggers on…

JKorf/Kraken.Net · 1,872 tokens