OBEX API
REST & Paper Trading API
Public market data plus authenticated paper-account automation using the exact v0.59.0 backend contract.
API v1
BASE URL https://exchange.obidoge.xyz/api/v1
Copy
Public data No authentication
Private auth Authorization: Bearer
API key obdx_… secret shown once
Trading scope Paper trading only
API key safety
An exchange API key is an automation secret, not a blockchain wallet private key. Create it from Account → API management . The secret is shown once.
read_only keys can read private paper data and preview orders. paper_trade keys can also create and cancel paper orders. API keys cannot access /api/v1/live/*.
AUTHENTICATION
Use the generated key Exact header expected by the backend.
PRIVATE Authorization: Bearer YOUR_API_KEY
Generated secrets begin with obdx_. This example is intentionally invalid:
obdx_EXAMPLE_ONLY_NOT_A_REAL_KEY_REPLACE_WITH_YOURS
cURL
read -rsp "API key: " OBDX_API_KEY; echo
curl -sS \
-H "Authorization: Bearer $OBDX_API_KEY" \
https://exchange.obidoge.xyz/api/v1/paper/balances
Copy
Python
import os, requests
headers = {
"Authorization": f"Bearer {os.environ['OBDX_API_KEY']}"
}
r = requests.get(
"https://exchange.obidoge.xyz/api/v1/paper/balances",
headers=headers,
timeout=10,
)
r.raise_for_status()
print(r.json())
Copy
PUBLIC DATA
Markets, ticker, book and trades No API key required.
GET /api/v1/assetsPUBLIC
curl -sS https://exchange.obidoge.xyz/api/v1/assetsLoad live
Select “Load live”.
GET /api/v1/marketsPUBLIC
curl -sS https://exchange.obidoge.xyz/api/v1/marketsLoad live
Select “Load live”.
GET /api/v1/tickers/{symbol}PUBLIC
Market Load ticker
Select “Load ticker”.
GET /api/v1/orderbooks/{symbol}?depth=20PUBLIC
depth defaults to 20 and accepts 1 through 100.
curl -sS "https://exchange.obidoge.xyz/api/v1/orderbooks/OBD-USDT?depth=20"Load live book
Select “Load live book”.
GET /api/v1/trades/{symbol}PUBLIC
curl -sS "https://exchange.obidoge.xyz/api/v1/trades/OBD-USDT?limit=20"Load live trades
Select “Load live trades”.
ORDER BOOK
How to read bids and asks Each level is [price, remaining base amount].
Bids = buyers Bids are highest-to-lowest. bids[0] is the best bid.
Asks = sellers Asks are lowest-to-highest. asks[0] is the best ask.
Illustrative OBD-USDT book
{
"symbol":"OBD-USDT",
"bids":[["0.00002000","5000"],["0.00001950","8000"]],
"asks":[["0.00002100","3500"],["0.00002200","9000"]],
"time":"..."
}
The best bid is 0.00002000 and the best ask is 0.00002100. A buy crossing to 0.00002100 can take the ask. A sell crossing to 0.00002000 can hit the bid.
PRIVATE PAPER DATA
Balances, orders and fills read_only or paper_trade key.
GET /api/v1/auth/sessionIdentity tied to the API key.
GET /api/v1/paper/balancesAvailable and locked paper balances.
GET /api/v1/paper/orders?status=open&market=OBD-USDT&limit=100Orders; status = all/open/completed.
GET /api/v1/paper/fills?market=OBD-USDT&limit=100Executed fills and fees.
ORDER JSON
Exact request fields Unknown JSON fields are rejected.
{
"market_symbol":"OBD-USDT",
"side":"buy",
"order_type":"limit",
"price":"0.00002100",
"amount":"1000",
"time_in_force":"GTC",
"post_only":false,
"client_order_id":"my-bot-000001"
}
side: buy or sell
order_type: limit or market
time_in_force: GTC, IOC or FOK
Limit defaults to GTC. Market defaults to IOC.
post_only:true requires GTC and is rejected if it would immediately match.
Market orders require IOC/FOK and cannot be post-only.
client_order_id is optional; maximum 128 characters.
PREVIEW
Preview before placing Allowed for read_only and paper_trade keys.
POST /api/v1/paper/orders/previewPRIVATE
curl -sS -X POST \
-H "Authorization: Bearer $OBDX_API_KEY" \
-H "Content-Type: application/json" \
https://exchange.obidoge.xyz/api/v1/paper/orders/preview \
-d '{
"market_symbol":"OBD-USDT",
"side":"buy",
"order_type":"limit",
"price":"0.00002100",
"amount":"1000",
"time_in_force":"IOC",
"post_only":false,
"client_order_id":"preview-buy-000001"
}'
Copy
BUY
Buy from the order book Placing orders requires paper_trade.
Maker buy — rest on bid
curl -sS -X POST \
-H "Authorization: Bearer $OBDX_API_KEY" \
-H "Content-Type: application/json" \
https://exchange.obidoge.xyz/api/v1/paper/orders \
-d '{
"market_symbol":"OBD-USDT",
"side":"buy",
"order_type":"limit",
"price":"0.00002000",
"amount":"1000",
"time_in_force":"GTC",
"post_only":true,
"client_order_id":"maker-buy-000001"
}'
Copy
Immediate buy — take ask
curl -sS -X POST \
-H "Authorization: Bearer $OBDX_API_KEY" \
-H "Content-Type: application/json" \
https://exchange.obidoge.xyz/api/v1/paper/orders \
-d '{
"market_symbol":"OBD-USDT",
"side":"buy",
"order_type":"limit",
"price":"0.00002100",
"amount":"1000",
"time_in_force":"IOC",
"post_only":false,
"client_order_id":"taker-buy-000001"
}'
Copy
SELL
Sell into the order book Same endpoint; side = sell.
Maker sell — rest on ask
curl -sS -X POST \
-H "Authorization: Bearer $OBDX_API_KEY" \
-H "Content-Type: application/json" \
https://exchange.obidoge.xyz/api/v1/paper/orders \
-d '{
"market_symbol":"OBD-USDT",
"side":"sell",
"order_type":"limit",
"price":"0.00002100",
"amount":"1000",
"time_in_force":"GTC",
"post_only":true,
"client_order_id":"maker-sell-000001"
}'
Copy
Immediate sell — hit bid
curl -sS -X POST \
-H "Authorization: Bearer $OBDX_API_KEY" \
-H "Content-Type: application/json" \
https://exchange.obidoge.xyz/api/v1/paper/orders \
-d '{
"market_symbol":"OBD-USDT",
"side":"sell",
"order_type":"limit",
"price":"0.00002000",
"amount":"1000",
"time_in_force":"IOC",
"post_only":false,
"client_order_id":"taker-sell-000001"
}'
Copy
MARKET ORDER
Protected market order The backend still requires price.
For a market buy, price is the maximum acceptable match price. For a market sell, it is the minimum acceptable match price. Market orders use IOC or FOK and do not rest on the book.
curl -sS -X POST \
-H "Authorization: Bearer $OBDX_API_KEY" \
-H "Content-Type: application/json" \
https://exchange.obidoge.xyz/api/v1/paper/orders \
-d '{
"market_symbol":"OBD-USDT",
"side":"buy",
"order_type":"market",
"price":"0.00002200",
"amount":"1000",
"time_in_force":"IOC",
"post_only":false,
"client_order_id":"protected-market-buy-000001"
}'
Copy
CANCEL
Cancel paper orders paper_trade key required.
Cancel one
curl -sS -X DELETE \
-H "Authorization: Bearer $OBDX_API_KEY" \
https://exchange.obidoge.xyz/api/v1/paper/orders/42
Copy
Cancel all open OBD-USDT orders
curl -sS -X DELETE \
-H "Authorization: Bearer $OBDX_API_KEY" \
"https://exchange.obidoge.xyz/api/v1/paper/orders?market=OBD-USDT"
Copy
DELETE /api/v1/paper/orders with no market query cancels every open paper order for the authenticated user.
CLIENT NOTES
Responses, rate limits and errors Use API response fields as source of truth.
Order responses contain order plus any immediate fills.
Order/fill prices and amounts are strings so decimal precision is preserved.
General key requests expose X-RateLimit-* headers.
Paper order mutations also expose X-Order-RateLimit-*.
HTTP 429 includes Retry-After.
Self-trading, duplicate client order IDs, post-only crossing and unfillable FOK orders are rejected.