Logo van Borsa Istanbul Api Integration

Borsa Istanbul Api Integration

Community
HimanshuJ16
borsa-istanbul-api-integration

Use when routing orders to Borsa Istanbul BISTECH over FIX 5.0 SP2 and the order lifecycle must be modelled correctly: NewOrderSingle, the two possible answers to a cancel request, and execution reports applied idempotently across resends.

Overzicht

UitgeverHimanshuJ16
RepositoryAlgo-Trading-Skills
Skillnaamborsa-istanbul-api-integration
Sterren
50
Forks
7
Meegeleverde bestanden
5
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 5

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door HimanshuJ16 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Borsa Istanbul Api Integration in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/borsa-istanbul-api-integration
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/borsa-istanbul-api-integration .claude/skills/borsa-istanbul-api-integration
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Borsa Istanbul Api Integration in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Borsa Istanbul Api Integration automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Borsa Istanbul Api Integration niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

When to Use

Use this skill when building order routing to Borsa Istanbul's BISTECH platform and you need the order lifecycle modelled correctly: NewOrderSingle (MsgType=D), Order Cancel Request (MsgType=F) and its two possible answers, and ExecutionReport (MsgType=8) application that survives resends.

BISTECH runs on Nasdaq's Genium INET technology. BIST offers FIX and OUCH for order entry and ITCH and TIP for market data; Borsa İstanbul states it supports FIX 5.0 SP2, and members must certify their software (or use a certified application) before production access.

When NOT to Use

  • As a FIX gateway. scripts/borsa_istanbul_api_integration.py is an in-memory order state machine with a simulated session layer. It opens no sockets, encodes and decodes no FIX messages, assigns no FIX sequence numbers, and persists nothing across restarts. connect() sets a flag. Use a real engine (QuickFIX or a BIST-certified application) for transport, and use this module to model the lifecycle and drive state from the reports that engine decodes.
  • For latency-sensitive order entry. BIST's low-level binary OUCH protocol exists for that; FIX is the broader-access, higher-overhead option. Do not benchmark a latency-critical path against a FIX design.
  • For market data. Order entry only. ITCH/TIP are separate protocols with separate certification.
  • As a substitute for certification. Passing these unit tests is not BISTECH certification and grants no production access.

Prerequisites

  • Python 3.10+.
  • A real FIX engine for transport, and network connectivity to BIST's FIX gateways or the BISTECH simulator environment.
  • Approved SenderCompID and TargetCompID issued by Borsa Istanbul.
  • BISTECH FIX certification for the market you are trading (required for production).
  • The BISTECH specification documents for your market. Message-level details, accepted TimeInForce values, required party/account tags and session phases are venue- and market-specific; this skill deliberately does not hard-code them.

Workflow

  1. Configure and establish the session. BISTConfig carries CompIDs, host, port and heartbeat interval. connect() validates them — an out-of-range port or an empty CompID is rejected before anything is attempted, because a FIX message without both CompIDs cannot log on.
  2. Build and submit the order. submit_order() refuses anything the venue or the protocol would reject: non-finite or non-positive quantity, a limit order without a positive price, a market order that carries a price (FIX forbids Price on OrdType=Market), an empty symbol, and — critically — a duplicate ClOrdID. Reusing a ClOrdID would overwrite a live order's record and discard its accumulated fills, so it raises rather than replacing.
  3. Apply fills as they arrive. simulate_execution_report(client_order_id, filled_qty, exec_price, exec_id=...) takes filled_qty as LastQty (this fill), not cumulative. Always pass exec_id. After a sequence gap the counterparty resends messages, and ExecID is the only thing distinguishing a resent report from a new one; without it a resend double-counts the fill and corrupts the average price.
  4. To cancel, send the request — then wait. cancel_order() sends an Order Cancel Request and moves the order to PENDING_CANCEL. The order is still live at the venue at this point and can still fill. Do not treat PENDING_CANCEL as cancelled, do not release its risk budget, and do not reuse its ClOrdID.
  5. Resolve the cancel on the venue's answer, not your own. An ExecutionReport with ExecType=Canceled → confirm_cancel(). An Order Cancel Reject (MsgType=9) → reject_cancel(), which returns the order to PARTIALLY_FILLED or NEW according to its fill state, because a rejected cancel means the order was never cancelled. The most common reason for a reject is that the order completed or was already inactive before the request landed.
  6. Treat a refused overfill as an incident, not a warning. If a report would push cumulative quantity past the order quantity, it is rejected and logged at ERROR. That means a duplicate escaped deduplication or the venue sent something impossible — reconcile against the venue before trading on the position.

Full session and order-routing sequence: see references/workflows.md. Protocol and symbology conventions: see references/standards.md. Pre-production readiness checklist: see assets/checklist.md.

Common Pitfalls

  • Treating an Order Cancel Request as a cancellation. MsgType=F requests cancellation of the remaining quantity. Until the venue answers with ExecType=Canceled or an Order Cancel Reject, the order is working and can fill. Marking it cancelled locally and then discarding subsequent execution reports as "terminal" silently loses real fills and leaves your position short of the venue's.
  • Applying execution reports without ExecID deduplication. Resend Request (MsgType=2) recovery is a normal part of FIX session management, and it replays application messages. A handler with no ExecID memory double-counts every replayed fill.
  • Accepting cumulative quantity beyond the order quantity. An overfill is never legitimate; absorbing it silently converts a message-handling bug into a phantom position and a wrong average price.
  • Reusing a ClOrdID. BIST requires it to be unique. Reuse makes the venue's reports ambiguous and, locally, overwrites the fill state of the order still working under that ID.
  • Validating quantity with qty <= 0 alone. NaN fails every comparison, so a NaN quantity passes that check and gets routed.
  • Sending Price on a market order. FIX forbids Price on OrdType=Market. Some gateways reject it, others silently ignore it and fill you at a price you did not intend.
  • Naive UTC timestamps. BIST operates on Europe/Istanbul time. Timestamps that carry no timezone silently misalign against venue timestamps in reconciliation and forensics.
  • Assuming this module manages FIX sequence numbers. It does not. Sequence assignment, gap fill, Resend Request handling and persistence across restarts belong to your FIX engine, and getting them wrong is its own failure mode.
  • Connecting to the wrong environment. Simulator and production differ in CompIDs, endpoints and TLS/VPN configuration; a config mix-up sends live orders from a test run.

Verification

  • Run the unit suite and confirm every test passes: python -m unittest discover -s skills/borsa-istanbul-api-integration/scripts
  • Assert the cancel-race invariant explicitly in your own integration: send a cancel request, deliver a fill before any venue answer, and confirm the fill is applied and the order remains PENDING_CANCEL. This is the defect that costs money; test it directly.
  • Replay a captured ExecutionReport twice with the same ExecID and confirm cumulative quantity and average price are unchanged.
  • Reconcile cumulative filled quantity and average price against the venue's own end-of-day trade file — the local state machine is only as good as the reports fed to it.
  • Run BIST's FIX certification scenarios against the BISTECH simulator before production. Unit tests do not substitute for certification.

Related Skills

  • fix-protocol-session-management-across-venues
  • broker-api-idempotent-cancel-requests
  • order-placement-idempotency
  • nasdaq-totalview-itch-feed-parsing
  • cme-stp-fix-and-ilink2-tag-value-encoding

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Borsa Istanbul Api Integration?

Use when routing orders to Borsa Istanbul BISTECH over FIX 5.0 SP2 and the order lifecycle must be modelled correctly: NewOrderSingle, the two possible answers to a cancel request, and execution reports applied idempotently across resends.

Waarom Borsa Istanbul Api Integration gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Borsa Istanbul Api Integration bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Borsa Istanbul Api Integration in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/borsa-istanbul-api-integration. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Borsa Istanbul Api Integration gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Borsa Istanbul Api Integration gebruiken?

Zoveel als je wilt. Je kunt Borsa Istanbul Api Integration gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Borsa Istanbul Api Integration gratis?

Ja. Deze skill is door HimanshuJ16 op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇