How Trading Works

A high-level guide to how USDT ↔ Bitcoin conversions are priced, executed, and settled within Bitnob’s infrastructure.

What Bitnob Trading Does

Bitnob gives you programmatic access to convert stablecoins and Bitcoin using a simple, reliable API. Behind the scenes, it handles:

Price discovery using a routing engine

Quote generation with optional locking

Liquidity sourcing from multiple exchanges and OTC desks

Atomic execution with no partial fills or slippage drift

Wallet settlement with clear status and traceability

As a developer, you only need to make two calls: one to get a quote, one to execute a trade. Everything else including pricing, routing, timing, confirmation, and settlement — is abstracted away.


The Trade Lifecycle

Trade Lifecycle

Execution Components

layer
what it does
Quote Engine
Fetches pricing from internal liquidity pools or external sources
Routing Logic
Chooses best fill path based on asset, direction, and amount
Execution Engine
Broadcasts and confirms the trade, ensuring it's atomic and final
Wallet System
Updates internal balances and credits the user’s destination wallet instantly

Trade Scenarios

scenario
flow
User wants to buy BTC with USDT
Quote from USDT → BTC → Execute → BTC is credited to their wallet
User wants to sell BTC for USDT
Quote from BTC → USDT → Execute → USDT is credited to their wallet
Platform wants to auto-convert
Skip UI, use real-time quote + execute in backend
Merchant wants to lock price
Fetch quote, hold for 30 seconds, show user fixed rate

Key Properties

Atomicity: Trades either succeed fully or not at all. You won’t see partial fills.

Quote Expiry: Quotes are typically valid for 30 seconds. If expired, you’ll receive a quote_expired error.

Real-Time Settlement: Once the trade is successful, the resulting asset is immediately available in the destination wallet.

No Slippage Guessing: Using quoteId ensures your user receives exactly the output amount shown.


Developer Responsibilities

Store and pass quoteId if you want locked pricing

Always provide a unique reference for traceability

Never rely solely on synchronous responses — use trade.completed webhook for final confirmation

Display rates and expirations clearly in your product interface if exposing trades to users



Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?