API Reference
Trading
All trading endpoints require authentication via JWT or API key.
Place a Trade
POST /v1/markets/{id}/trade
sidestringrequiredyes or no
usdc_amountstringrequiredUSDC amount to spend (e.g. "10.00")
curl -X POST https://api.settled.pro/v1/markets/8166597e-.../trade \
-H "X-API-Key: stld_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"side": "yes", "usdc_amount": "10.00"}'
const res = await fetch(`${API}/v1/markets/${id}/trade`, {
method: 'POST',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify({ side: 'yes', usdc_amount: '10.00' })
})
const { data } = await res.json()
res = requests.post(
f'{API}/v1/markets/{market_id}/trade',
headers={'X-API-Key': api_key},
json={'side': 'yes', 'usdc_amount': '10.00'}
)
trade = res.json()['data']
Response:
{
"data": {
"trade_id": "a1b2c3d4-...",
"side": "yes",
"shares": "13.698630",
"price_per_share": "0.730000",
"cost_usdc": "10.000000",
"fee_usdc": "0.100000",
"new_yes_price": "0.742000",
"new_no_price": "0.258000"
}
}
How LMSR pricing works
There is no orderbook. You trade directly against the Logarithmic Market Scoring Rule (LMSR) automated market maker.
Every trade shifts the price. Buying 100 YES shares when YES is at 73 cents moves the price to approximately 76 cents. The more shares on one side, the more expensive that side becomes.
The new_yes_price and new_no_price fields in the response show the updated market price after your trade. Check these before placing large orders to understand slippage.
Trading fee
1% of usdc_amount is charged as a fee on every trade. The fee is deducted from your balance separately and shown in fee_usdc.
Errors
| Code | When |
|---|---|
MARKET_CLOSED | Market is not open |
INSUFFICIENT_BALANCE | Not enough USDC |
INVALID_INPUT | Bad side or amount |