API and MCP
Check stock, order, fetch goods and open tickets from code or an AI assistant.
Send your key with every request:
Authorization: Bearer ok589_...
Orders need request_id (UUID) and max_total_usdt. Retrying with the same request_id never charges twice.
REST API
| GET | /api/v1/products?category=&search=&in_stock=true | Products, prices, stock |
| GET | /api/v1/balance | Balance in USDT |
| POST | /api/v1/orders | Place an order, paid from balance |
| GET | /api/v1/orders?limit=20 | Latest orders |
| GET | /api/v1/orders/{order_no} | Status and delivered lines |
| POST | /api/v1/tickets | Open a support ticket |
curl -X POST https://ok589.com/api/v1/orders \
-H "Authorization: Bearer $OK589_KEY" -H "Content-Type: application/json" \
-d '{"sku":"SKU","qty":1,"max_total_usdt":"2.50","request_id":"'$(uuidgen)'"}'MCP
claude mcp add --transport http ok589 https://ok589.com/api/mcp --header "Authorization: Bearer $OK589_KEY"
{
"mcpServers": {
"ok589": {
"type": "http",
"url": "https://ok589.com/api/mcp",
"headers": {
"Authorization": "Bearer ok589_..."
}
}
}
}Tools
- list_products
- get_balance
- create_order
- list_orders
- get_order
- create_ticket
Error codes
- 401 unauthorized
- Bad or revoked key
- 403 key_read_only
- Read-only key cannot order
- 402 insufficient_balance
- Not enough balance
- 409 out_of_stock
- Not enough stock
- 409 price_above_max
- Total is above max_total_usdt
- 409 request_id_conflict
- request_id was used for a different order
- 429 rate_limited
- Max 60 calls per minute