NexarMarkets Guide
Everything you need to know about trading, the orderbook, and building automated strategies with the API.
Introduction
NexarMarkets is a prediction market platform where you trade on the outcomes of real-world events — sports, crypto, politics, and more. Instead of gambling against a house, you trade contracts with other users. Prices move based on collective opinion, making markets a powerful tool for forecasting what will happen.
Trade Outcomes
Buy YES or NO contracts on any event. Price reflects the crowd's probability estimate.
$1 Per Contract
Every winning contract pays out exactly $1.00. Simple, predictable payouts.
Developer API
Automate trading strategies, provide liquidity, and manage orders programmatically with the REST API.
How It Works
Prediction markets work like a stock exchange for real-world events. Each market has a question with a defined resolution date. You buy contracts representing your belief in what will happen. When the event resolves, winning contracts pay $1 and losing contracts pay $0.
Browse markets
Explore open markets across crypto, sports, politics, and more. Each market shows the current probability implied by the crowd — a price of 65¢ means the market thinks there's a 65% chance of YES.
Buy contracts
Choose YES or NO and enter how much you want to spend. Your order matches with other traders on the orderbook. You receive shares at the agreed price.
Watch the market move
As news breaks and opinions shift, prices change. You can sell your position at any time before resolution to lock in profit or cut losses.
Resolution
After the event concludes, our team reviews the outcome using AI-assisted verification and settles the market. Winners receive $1 per share. Losers receive $0.
Binary Markets
A binary market has exactly two outcomes: YES or NO. This is the most common type on NexarMarkets. The contract price directly represents the market's implied probability of the event happening.
Will Bitcoin exceed $100,000 by end of 2025?
YES
72¢
implied 72% chance
NO
28¢
implied 28% chance
Reading a binary market
YES price = 72¢ — The market believes there's a 72% chance Bitcoin hits $100K
NO price = 28¢ — Buying NO means you think it won't happen — paying 28¢ to win $1
YES + NO ≈ 100¢ — Prices always roughly sum to $1 (minus the bid-ask spread)
Custom side labels
Binary markets don't always say YES / NO. When a market has a natural two-sided answer — like a head-to-head matchup — the sides are relabelled to match the real-world context. The mechanics are identical: one side pays $1, the other pays $0.
Will the Lakers beat the Thunder?
Buying Lakers = buying YES on a Lakers win
2024 US Presidential Election
Each candidate is a tradeable side
When placing orders via the API, pass the label exactly as shown on the market as sideLabel — e.g. "Lakers" or "Thunder".
Multi-Outcome Markets
Multi-outcome markets have more than two possible results, each as its own tradeable contract. Common examples: "Which team wins the championship?" or "Which coin performs best this month?" Each outcome is independently priced and tradeable.
Example: NBA Finals Winner
Each outcome is its own binary contract — you can buy or sell any of them independently.
Buying & Selling
NexarMarkets uses a live orderbook where buy and sell orders from all traders are matched in real-time. You can trade at any time while a market is open.
Buying
- •Choose YES or NO on any market
- •Enter a dollar amount or number of shares
- •Your order matches with the best available ask price
- •Shares are added to your portfolio instantly
Selling
- •Go to your Portfolio to see open positions
- •Click Sell on any position you hold
- •You receive the current market bid price
- •Balance is credited immediately after the fill
Understanding the orderbook
Best ask = 65¢ (cheapest YES available). Best bid = 63¢ (highest buyer offer). The 2¢ gap is the spread.
Resolution
All markets are resolved automatically using the public data sources listed in each market's resolution criteria. Our system checks the latest available data from those sources and settles the outcome accordingly. Every result is verified before it is applied — no market resolves until the outcome is confirmed.
Market closes
Trading halts when the event's end date is reached. No new orders can be placed. Open orders that haven't been filled are cancelled and funds returned.
Automated data check
Our system fetches the latest data from the public sources specified in the market's resolution criteria — official results pages, on-chain data, sports APIs, and more.
Verification
The resolved outcome is verified against the criteria before being applied. No market settles until the result is confirmed as accurate.
Settlement
The market is resolved on-platform. Winning shares are credited $1.00 each. Losing shares expire at $0. Balances update immediately.
Resolution timeline
Typically within 1 hour of close
Most markets resolve as soon as the outcome is publicly available after the event ends
Up to 24 hours in some cases
If the public data source hasn't updated yet, or the outcome requires additional verification, resolution may take longer
Payouts
Every winning contract pays exactly $1.00. Your profit depends on what you paid for the contract. Losing contracts pay $0.
Winning Example
Losing Example
Selling before resolution
You don't have to hold to resolution. If you bought YES at 40¢ and the price rises to 75¢, you can sell for a 35¢ profit per share without waiting for the outcome. This is how most experienced traders manage risk and lock in gains.
Fees & Pricing
NexarMarkets charges a small trading fee on each transaction. The fee scales with the uncertainty of the market — it is highest near 50¢ (most uncertain) and approaches zero near 0¢ or 100¢ (near-certain outcomes).
Fee structure
Formula: fee = total × p × (1 − p) × 0.048 where p is the contract price (0–1)
Maximum fee: 1.2% of trade value at 50¢ (most uncertain market)
Near certainty: Fee approaches 0% as price approaches 0¢ or 100¢
Fee table at $100 trade — every 5¢ step
fee = $100 × p × (1 − p) × 0.048
| Price | Fee ($) | Fee (%) |
|---|---|---|
| 1¢ | $0.0475 | 0.0475% |
| 5¢ | $0.2280 | 0.2280% |
| 10¢ | $0.4320 | 0.4320% |
| 15¢ | $0.6120 | 0.6120% |
| 20¢ | $0.7680 | 0.7680% |
| 25¢ | $0.9000 | 0.9000% |
| 30¢ | $1.0080 | 1.0080% |
| 35¢ | $1.0920 | 1.0920% |
| 40¢ | $1.1520 | 1.1520% |
| 45¢ | $1.1880 | 1.1880% |
| 50¢ ★ | $1.2000 | 1.2000% |
| 55¢ | $1.1880 | 1.1880% |
| 60¢ | $1.1520 | 1.1520% |
| 65¢ | $1.0920 | 1.0920% |
| 70¢ | $1.0080 | 1.0080% |
| 75¢ | $0.9000 | 0.9000% |
| 80¢ | $0.7680 | 0.7680% |
| 85¢ | $0.6120 | 0.6120% |
| 90¢ | $0.4320 | 0.4320% |
| 95¢ | $0.2280 | 0.2280% |
| 99¢ | $0.0475 | 0.0475% |
★ Maximum fee — 50¢ is the most uncertain price point
Developer API
The NexarMarkets REST API lets you trade autonomously — build bots, run algorithmic strategies, or provide liquidity programmatically. All order operations are available via simple HTTP requests authenticated with your personal API key.
Getting your API key
Open your profile
Click your avatar in the top-right corner to open the Profile modal.
Navigate to API Keys
Scroll down inside the modal to the API Keys section. You will see a list of any existing keys and a form to create a new one.
Create a key
Enter a name for your key (e.g. "trading bot") and click Create API Key. The full key is shown only once — copy it immediately and store it securely.
Use the key in requests
Include the key in every API request as the X-Api-Key header. No other authentication is needed for programmatic access.
Base URL & authentication
# All requests go to
https://api.nexarmarkets.com/api
# Required header on every request
X-Api-Key: <your-api-key>
Step 1 — Get your user ID
Several endpoints (orders, positions) require your userId. Call GET /api/users/me with your API key to retrieve it along with your balance and stats. Do this once and store the id field for subsequent requests.
GET /api/users/me
// Headers
X-Api-Key: <your-api-key>
// 200 OK — response
{
"id": "usr_abc123", // ← use this as :userId
"username": "your_username",
"balance": 1000.00,
"totalPnl": 250.50,
"tradesCount": 42
}
id from this response — you'll need it to fetch your orders via GET /api/orders/user/:userId and your positions via GET /api/positions/:userId.Step 2 — Create an order
Place a limit buy or sell order on any open market. The order is matched against the live orderbook immediately; any unfilled remainder rests as a pending order.
POST /api/orders
// Request body (JSON)
{
"marketId": "mkt_abc123",
"type": "buy", // "buy" | "sell"
"sideLabel": "Yes", // outcome label shown on the market (e.g. "Yes", "Trump", "Celtics")
"shares": 100, // number of contracts
"price": 65 // limit price in cents (0.1 – 99.99)
}
// 201 Created → returns the full order object
marketIdThe market's unique ID (visible in the URL of any market page)type"buy" to open a position, "sell" to close / go shortsideLabelThe outcome label exactly as shown on the market — "Yes" / "No" for binary markets, or the named outcome (e.g. "Trump", "Celtics") for multi-outcome marketssharesHow many $1 contracts you want (must be positive)priceYour limit price in cents — the order won't fill above (buy) or below (sell) thisStep 3 — Update an order
Amend the price or quantity of any pending or partially-filled order you own. The order is re-entered into the matching engine at the new price.
PATCH /api/orders/:id
// Request body — include only what you want to change
{
"price": 70, // new limit price in cents (optional)
"shares": 50 // new quantity (optional)
}
// 200 OK → returns the updated order object
Step 4 — Cancel an order
Cancel any pending or partially-filled order. Locked funds (for buys) or locked shares (for sells) are returned to your balance immediately.
DELETE /api/orders/:id
// No request body needed
// 200 OK → { "cancelled": true }
Full example — JavaScript fetch
const API = "https://api.nexarmarkets.com/api";
const KEY = "apk_your_api_key_here";
const headers = { "X-Api-Key": KEY, "Content-Type": "application/json" };
// 1. Get your user ID (do this once and store it)
const me = await fetch(`${API}/users/me`, { headers }).then(r => r.json());
const userId = me.id; // e.g. "usr_abc123"
// 2. Place a buy order
const res = await fetch(`${API}/orders`, {
method: "POST", headers,
body: JSON.stringify({
marketId: "mkt_abc123",
type: "buy",
sideLabel: "Yes",
shares: 100,
price: 65
}),
});
const order = await res.json();
// 3. Fetch your open orders using your userId
const orders = await fetch(`${API}/orders/user/${userId}`, { headers }).then(r => r.json());
// 4. Update the order price
await fetch(`${API}/orders/${order.id}`, {
method: "PATCH", headers,
body: JSON.stringify({ price: 70 }),"
});
// 5. Cancel the order
await fetch(`${API}/orders/${order.id}`, {
method: "DELETE", headers
});
Read endpoints
These endpoints are useful for building bots and UIs. Events and markets are public (no key needed). Positions and orders require your X-Api-Key.
Account (requires X-Api-Key)
Events (markets)
Orders (requires X-Api-Key)
Positions (requires X-Api-Key)
wss://ws.nexarmarkets.com to stream live orderbook updates and trade events so your bot can react to price changes in real time without polling.Safety & Rules
NexarMarkets is designed to be fair for all participants. These rules ensure the integrity of the platform.
No inside trading
Creating markets or trading on events where you have privileged non-public information is prohibited and may result in account suspension.
Market manipulation
Attempting to artificially move prices through coordinated trading, wash trading, or other manipulation tactics is strictly banned.
One account per person
Operating multiple accounts to gain unfair advantages, bypass limits, or manipulate leaderboard rankings is not allowed.
Responsible trading
Only trade what you can afford to lose. Prediction markets involve real financial risk. Set limits for yourself and trade responsibly.
Frequently Asked Questions
Ready to start trading?
Create an account, deposit funds, and make your first prediction. Or grab an API key and let your strategy run on autopilot.