Decentralised News · 2027 planning edition · Evidence reviewed 23 November 2026
What Matters
An exchange may expect quantity and price as exact decimal text and return an order ID as an opaque string. If a bot converts them to JavaScript Number, it can lose significant digits or corrupt the identifier used to join fills. Economic unit normalization and exact serialization are different requirements; both must pass.
The Signal
Bybit’s V5 Place Order schema declares quantity, price and returned order IDs as strings. Its execution-history and instrument-metadata endpoints preserve quantities and price increments as string fields, making this a real software contract rather than a theoretical concern.
DN Alpha Thesis
Store exact submitted decimal strings and order IDs end-to-end, use decimal or scaled-integer arithmetic for eligibility checks, and preserve original wire bytes alongside rounded display numbers. Do not generalize a single venue’s accepted wire format across all exchanges.
DN Decimal and Order-ID Round-Trip Checker
Test plain-decimal quantity and step strings with BigInt, and compare a long order ID with a JavaScript Number conversion.
This is a local, synthetic educational tool; no exchange API, wallet, order or real-time market feed is accessed.
A correct trading decision can become a wrong order in transit
An agent intends to submit 0.123456789012345678 BTC and calculates the right theoretical exposure. The application passes that quantity through an ordinary binary floating-point Number, serializes the result and then tries to place a limit order. Significant digits can be lost even though every developer on the team believed the “same number” was transmitted. The discrepancy appears before the exchange matching engine ever sees the instruction.
This is distinct from DN’s futures-contract unit article. There the question is what 100 contracts means; here the question is whether the number entered survives an API client, database and message queue without changing. Both errors can create real financial consequences if an automated agent issues a malformed or oversized request.
Actual Bybit order fields are textual
Bybit’s V5 Create Order declares order qty and price as strings, and returns order IDs as strings. Its trade-history API likewise returns execution amounts and identifiers as textual fields. That is a documented interface, not an endorsement of sending numeric strings to every other service without checking.
The same Bybit order API also distinguishes spot quote-currency market order sizing from base-coin quantity sizing. Precise text alone cannot rescue a wrong unit. First choose the correct instrument and order unit; then validate the decimal step and serialize exactly as the endpoint expects.
The 2^53 integer boundary for IDs
JavaScript Number cannot represent every integer above its maximum safe integer of 9,007,199,254,740,991 exactly. An apparent order ID such as 9007199254740993 may become 9007199254740992 when coerced to a Number. That is a different identity, even though a visually similar numeric string may pass superficial review.
An order ID is not an amount to be added or multiplied. Treat it as an opaque identifier, preserve it as text, and compare exactly when joining orders to executions. A database field, CSV parser or spreadsheet may silently convert long digit strings into approximations. An incorrect join can lead to duplicate order retries or erroneous balance reconciliation.
Why ordinary decimal floating point is insufficient
Many finite decimal fractions are repeating values in binary representation. Standard JavaScript Number arithmetic famously gives 0.30000000000000004 for 0.1 plus 0.2. That is not an exchange pricing event, but the same representation can affect price and quantity validation if an API integration tests an exact mathematical step with a floating-point remainder.
For critical trade quantities, use a decimal arithmetic library or fixed-scale integer representation. The DN checker uses BigInt scaled-decimal logic locally to determine whether a user-entered quantity is a true integer multiple of the declared step. It does not fetch the step from any venue.
Step and price tick must be checked separately
Bybit’s instrument metadata API distinguishes minimum order quantities, quantity increments and price ticks. A quantity may be a valid multiple of 0.000001 yet fail minimum notional. A price may be a valid decimal string yet fail its tick-size rule. Passing the DN step-multiple worksheet therefore does not mean a real order would be accepted.
A separate risk check must validate margin, product eligibility, position limits and open-order caps. An API bot should not use a failed decimal step test as permission to round an order up silently. Rounding up increases risk; rounding down may violate the user’s required exposure or a venue’s minimum.
Display precision is not wire precision
A dashboard might show 0.123457 BTC for readability while the underlying transaction contains additional meaningful decimals. The rounded label is not an authorized replacement for the exact stored value. Maintain source text, precision/scale, currency, quote unit and round-to-display choices as separate fields so the program can reconstruct the real request.
For a financial audit, save the original submitted body, the response’s exact order ID and the per-fill execution values. A screenshot showing six decimals may be good for a human summary but insufficient for a ledger dispute or matching-engine replay.
Scientific notation and endpoint-specific validity
Ordinary serializers may represent very small values with exponential notation. Some APIs accept that form; others do not. Do not infer universal acceptance from one implementation. A field declared as “string” may still require a particular fixed decimal format and character range. Bybit’s order schema is an example of a documented format; a separate venue may use JSON numbers or an entirely different protocol.
Only transport exact source string values after checking the actual venue specification. If a library update changes the serialized representation, its regression tests should catch that before trading is resumed.
Two failure modes, one local test fixture
The worksheet accepts a quantity, a permitted quantity step and a long integer-like identifier as text. It computes an exact step-divisibility result with BigInt and independently shows what JavaScript Number would serialize. A change in text can sometimes be merely formatting, such as 1.2300 compared with 1.23; a long ID changing digits is not harmless. The output treats those outcomes separately.
No network calls or exchange account data are involved. The example long ID exceeds the ordinary Number safe-integer boundary on purpose. It is a test vector, not a real user order or proof of a problem at the exchange.
A reproducible automation gate
- Preserve raw order ID and execution ID bytes as strings.
- Verify the exact instrument’s allowed size unit, quantity step and price tick.
- Use decimal or BigInt representations for precision-sensitive math.
- Confirm the intended value survives JSON encoding and decoding.
- Test both large numeric identifiers and very small decimal sizes.
- Compare actual submitted and executed quantities without converting keys to floats.
- Log any quantization decision rather than changing an order quantity invisibly.
The intended result is a verifiable equality between user intent, submitted text and observed execution, rather than confidence based on how the number looks in the interface.
Where to check the actual service
Consult the exact Bybit V5 endpoint or the target venue’s published schema. This is software-integrity research, not a venue recommendation.
Affiliate disclosure: DN may receive commissions from qualifying partner links. Rates and results are not adjusted for compensation. Leveraged trading can cause losses or liquidation; this is research, not a trade recommendation.
Methodology, limitations and corrections
Official V5 API field types and ECMAScript numeric limits were checked on 23 November 2026. The synthetic checker uses BigInt for exact plain-decimal step arithmetic; it is not a general venue schema validator. All numerical scenarios are original hypothetical examples; the 2027 edition is not proof of future platform terms. The tool does not calculate live margin, user eligibility, trading costs unless explicitly entered, or execution success. To correct this record send official evidence with an effective date to press@decentralised.news.
Frequently asked questions
Can I store a numeric order ID as a JavaScript Number?
Not safely if it can exceed Number’s exact integer range. Store opaque IDs as strings.
Does Bybit require textual order quantity?
Its documented V5 order interface declares qty and price as strings.
Will a BigInt step check guarantee order acceptance?
No. Minimum order, risk, margin and other venue rules still apply.
Does decimal scientific notation work everywhere?
No. Follow the exact venue and endpoint formatting specification.
Does this tool trade or query an API?
No. It parses local text inputs and reports mathematical and serialization hazards.




