Skip to main content

Patch Market

Description

Update trading parameters (fees, tick size, lot size, minimum notional) for an existing spot market. Omitted fields are left unchanged — only the fields present in the body are updated.

Admin only. Requires the ADMIN_API_KEY environment variable to be set on the server and passed as X-API-Key in the request header.

Note on resting orders: Existing resting orders are NOT re-validated against the new tick_size or lot_size after this call. They remain on the book until filled or canceled. New orders placed after the update must satisfy the new parameters.

HTTP Request

PATCH /admin/spot/markets/:id (X-API-Key: ADMIN_API_KEY)

:id is the market identifier (e.g. DFUSDT). Case-sensitive.

Weight

0 — admin endpoints have no weight limit. Each market mutation pings the engine with a ReloadMarket command so the in-memory MarketCache picks up the change without restart.

Request Parameters

NameTypeRequiredDescription
tick_sizeDECIMALNONew minimum price increment as a string (e.g. "0.0001"). Omit to leave unchanged.
lot_sizeDECIMALNONew minimum quantity increment as a string (e.g. "0.01"). Omit to leave unchanged.
min_notionalDECIMALNONew minimum notional value as a string (e.g. "1"). Omit to leave unchanged.
maker_fee_bpsNUMBERNONew maker fee in basis points (integer). Omit to leave unchanged.
taker_fee_bpsNUMBERNONew taker fee in basis points (integer). Omit to leave unchanged.

At least one field should be present; sending an empty body is a no-op (succeeds, no parameters change).

Response Example

200 OK

{
"ok": true,
"id": "DFUSDT"
}
FieldNotes
okAlways true on success.
idThe market id that was updated, echoed back.

Error Responses

HTTPerrorWhen
500DB_ERRORUnexpected Postgres error during the update. Investigate server logs.

Full list: Error Codes.

Code Examples

cURL

ADMIN_API_KEY="your_admin_api_key"
MARKET_ID="DFUSDT"

curl -s -X PATCH "https://api-sepolia.p99.world/api/v1/admin/spot/markets/${MARKET_ID}" \
-H "X-API-Key: ${ADMIN_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"tick_size": "0.0001",
"maker_fee_bps": 5,
"taker_fee_bps": 10
}'

Python

import requests

ADMIN_API_KEY = "your_admin_api_key"
BASE_URL = "https://api-sepolia.p99.world/api/v1"

def admin_patch(path: str, body: dict) -> dict:
r = requests.patch(
f"{BASE_URL}{path}",
json=body,
headers={"X-API-Key": ADMIN_API_KEY, "Content-Type": "application/json"},
timeout=5,
)
r.raise_for_status()
return r.json()

result = admin_patch("/admin/spot/markets/DFUSDT", {
"tick_size": "0.0001",
"maker_fee_bps": 5,
"taker_fee_bps": 10,
})
print(result["ok"], result["id"])