Skip to main content
Bravado encodes all numeric fields, including prices, balances, PnL, volume, and share counts, as JSON strings rather than native JSON numbers. This is intentional: JavaScript’s Number type (IEEE 754 double-precision float) loses precision on integers larger than 2⁵³ and on decimal values that cannot be represented exactly in binary floating point. By using strings, Bravado lets your application choose the right numeric type for its environment.

Why strings?

Financial applications require exact arithmetic. A balance of "1234567.890123" USDC must round-trip without loss. Native JSON number parsing in JavaScript would silently corrupt values like this:
Always parse numeric string fields with a Decimal / BigDecimal type before performing any arithmetic.

Request field units

The table below covers every numeric field you send in request bodies or query parameters. The “Common Mistake” column highlights the most frequent source of integration bugs.
Sending price: 62 instead of price: "0.62" is the single most common integration error. Prices are decimal probabilities in the range 0–1, not cents.

Price in depth

All market prices on Polymarket are expressed as decimal probabilities between 0 and 1. A YES share trading at 62 cents has a price of 0.62. The API enforces the range 0.0010.999; values outside this range return a 400 with the message:
If you see this error, check whether your price source is returning cents (0–100) and divide by 100 before sending.

Response field units

Response fields follow a consistent naming convention that signals their unit.

Micro-USDC (uusdc)

Some Data API and PMWAS fields express values in micro-USDC, integers where 1 USDC = 1,000,000 units. These fields always end in _uusdc or _ushare.
To convert to display USDC, divide by 1,000,000:
Standard PnL and balance fields on the trading endpoints (/v2/trade/...) are already in USDC with 6 decimal places, no conversion needed. Only fields explicitly suffixed _uusdc or _ushare require the ÷ 1,000,000 step.

Timestamps

Bravado uses different timestamp formats depending on the field’s purpose. You can identify the format from the field name: Converting a Unix-seconds timestamp in Python:
Converting a Unix-seconds timestamp in JavaScript:
Combo quote expires_at values are ISO-8601 instants with millisecond precision. Parse them with a full datetime parser, not a simple integer comparison.

Parsing recommendations

Follow these language-specific patterns to safely handle all numeric fields returned by the Bravado API. Python
JavaScript / TypeScript
Never parse Bravado numeric strings with parseFloat(), float(), or native JSON number parsing. These types cannot represent 6-decimal USDC values exactly and will silently introduce rounding errors in balance and PnL calculations.