Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

Reconcile a Bybit Options Settlement Against the Exchange

Prove or disprove that every stored settlement figure (premium, fees, hedge fills, PnL) equals what Bybit reports, using independent oracles including the transaction-log cashBalance chain. Includes a snapshot fetcher and a chain checker.

$6.00

What you get: 1 file · 9.88 KB · ZIP

See purchase options

Product description

After an options delivery, the bot's own drift detector often says everything matches, and that proves little: it may never run for a healthy delivery, or it compares figures fetched by the same helper that wrote them. This skill reconciles a completed settlement against independent exchange data and produces a per-figure verdict table.

What is inside: - SKILL.md - why the obvious shortcut fails; the independent oracles (the transaction log is the strongest); a non-circular premium identity; the procedure from finding what actually settled, taking one raw read-only snapshot and never calling the exchange again, recomputing every stored figure, resolving what the hedge orders did, running the engine's own detector without writing to production, checking the UI layer, and handling multi-leg sessions that share a hedge; notes on operating on the production box; and the reporting format (ours / exchange / delta / oracle). - scripts/pull_exchange_state.py - standard-library, GET-only snapshot of one Bybit V5 settlement window into a single JSON file: executions, order history, closed PnL, positions, delivery records and the paged transaction log. - scripts/check_cashbalance_chain.py - proves a transaction-log window is complete: every row must satisfy cashBalance minus change equals the previous cashBalance. Exits 1 on a break.

Who it is for: people running a Bybit V5 options bot who need to trust their P&L figures. The scripts place and cancel nothing. It is also part of the Production Ops: DB, Scrapers, Trading Bot pack at a lower per-skill price.

Example request

Last Friday's ETH call delivery shows +41 USDT in the bot UI. Check it against Bybit and tell me if every figure is right.

Example result

Example on a fictional setup (window 2025-01-10, ETH option, one hedge leg).

  1. Snapshot: pull_exchange_state.py with a read-only key, GET only, one JSON file. No further exchange calls after this; everything below is recomputed offline from it.
  2. Completeness: check_cashbalance_chain.py snapshot.json reports 37 rows, 0 breaks, so no cash event in the window was missed.
  3. Per-figure verdict table (ours / exchange / delta / oracle): | figure | ours | exchange | delta | oracle | | premium | 12.40 | 12.40 | 0.00 | execution row plus tx-log cash flow identity | | option fees | 0.062 | 0.062 | 0.000 | execution list | | settlement fee | 0.31 | 0.31 | 0.00 | delivery record | | hedge fills qty | 0.50 | 0.50 | 0.00 | order history | | final PnL | 41.05 | 40.66 | +0.39 | closed PnL + delivery PnL |
  4. The +0.39 delta traces to the settlement fee counted on the UI row twice; the stored columns are right and the page decomposition is wrong.
  5. The stored cash-settlement figure was not used as evidence because it is derived as a residual, which would cancel any error.

Verdict: DB correct; one display defect. Detector note: it only runs from the deferred reconcile loop, so it never examined this healthy delivery.

Requirements

  • Claude Code or a compatible agent runtime
  • Python 3 (standard library only)
  • A read-only Bybit V5 API key (READONLY_API_KEY and READONLY_API_SECRET)
  • Read access to the bot's stored settlement figures

How to install

Unzip into your Claude Code skills folder (~/.claude/skills/ or .claude/skills/ in a project) and start a new session; the skill loads by its description.

What you get

1 file · 9.88 KB

  • exchange-delivery-reconciliation.zipZIP · 9.88 KB
LicenseCommercial use allowed
PublishedDec 3, 2026
File size9.88 KB
File formatZIP
Versionv1.0

Tags

claude codeclaude skillai agentcrypto exchange
C
Claude Workflow Lab

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 9.88 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$6.00