Norynta public docs
Norynta Trading Integration Workflow
Step-by-step trading integration workflow for orderbook reads, signed orders, reconciliation, and production safety gates.
Trading Integration Workflow
Purpose
This document explains how to build a safe, production-grade Norynta trading integration.
Audience
- professional trading systems
- active trading bots
- AI agents that submit signed writes
Core idea
Strong trading integrations do not jump straight from market data to order placement. The safe pattern is:
- discover
- snapshot
- check
- write
- reconcile
- cancel or replace intentionally
First-order prerequisites
Before building a write request, make each dependency explicit:
- an active developer API key with order-write access
- the correct base URL, Solana cluster, and deployed Norynta program ID
- a dedicated wallet signer kept outside browser and model-generated code
- credited USDC collateral and enough SOL for network fees
- an open event public key, outcome index, and inspected orderbook
- a deterministic client order ID for submission and reconciliation
The /developers?tab=launch console turns these prerequisites into a copyable
first-bet checklist. Use devnet for the first complete loop.
Step 1. Discover runtime behavior
Before enabling writes, read:
GET /.well-known/agent.jsonGET /api/agent/cardGET /api/agent/access
Focus especially on /api/agent/access execution metadata:
execution.idempotencyexecution.retryPolicyexecution.safety
Also read:
GET /api/bot/configGET /api/clob/v2/configGET /api/rate-limits
These expose fee policy, RFQ network status, exposure-group support, and public rate budgets.
Step 2. Build pre-trade market state
Typical inputs:
GET /api/events/:slug/snapshotPOST /api/events/snapshotsGET /api/events/:slug/streamGET /api/events/:slug/orderbook/stream
Your strategy should know at least:
- best bid/ask or current depth
- recent trade activity
- whether the market meets your liquidity threshold
Step 3. Simulate before writing
Use:
GET /api/clob/v2/orderbook
First-trade check should be the default path for:
- large orders
- taker-like flow
- slippage-sensitive strategies
- automated systems with tight loss tolerances
The goal is to understand:
- expected fills
- fees
- guardrails
- likely execution quality
Step 4. Submit signed writes safely
Primary endpoints:
POST /api/clob/v2/ordersPOST /api/clob/v2/orders/batchPOST /api/clob/v2/rfq/quotePOST /api/clob/v2/rfq/accept
Safety guidance:
- use deterministic
clientOrderIdvalues when supported - use
exposureGroupfor maker bots that need an open-share or rolling filled-share cap across related orders - preserve request identity across retries
- do not treat transport uncertainty as permission to emit a new logical order
- log request identity for replay diagnostics
Example exposure group:
{
"clientOrderId": "maker-cpi-001",
"exposureGroup": {
"id": "maker:macro:cpi",
"maxOpenShares": 250,
"maxFilledShares": 100,
"windowSeconds": 86400
}
}
Step 5. Reconcile open intent and fills
Use a mix of:
POST /api/clob/v2/my-orders- live stream updates
- periodic snapshot refresh
This protects your system from:
- stale local books
- unknown-write outcomes after network failure
- duplicate intent after retry storms
Step 6. Cancel or invalidate intentionally
Use the narrowest cancel primitive that matches your need:
POST /api/clob/v2/cancelDELETE /api/clob/v2/ordersDELETE /api/clob/v2/cancel-market-ordersDELETE /api/clob/v2/cancel-allPOST /api/clob/v2/cancel-allfor nonce-based invalidation patterns
For single-order cancellation, treat canceled: true as the state-changing
result. If the order already filled or closed, the response can be successful
with canceled: false; reconcile before replacing.
Failure-handling model
401 Unauthorized
- do not retry unchanged
- correct credentials or auth headers first
429 Too Many Requests
- use backoff + jitter
- reduce polling pressure
- prefer snapshot + stream over repeated small reads
5xx
- retry carefully with capped exponential backoff
- preserve logical request identity
Validation or signature failures
- treat as non-retryable until fixed
Professional execution loop
Recommended loop:
- discover capabilities
- rank and snapshot markets
- check order readiness
- place with deterministic identity
- reconcile with streams and my-orders
- cancel or replace intentionally
Pre-production checklist
- write retries are idempotent
- orderbook readiness is part of the default flow
- stream disconnect recovery is implemented
- request logging includes stable IDs
- auth failures are visible and actionable
- rate-limit handling is tested
Related docs
docs/DEVELOPERS.mddocs/public/AUTH_AND_RATE_LIMITS.mddocs/public/STREAMING_AND_RECONCILIATION.mddocs/AGENT_INTEGRATION.md