Skip to main content

REST API Reference

The ZenOTC REST API allows you to programmatically access trading, portfolio, and market data functionality. This reference documents all available endpoints for direct API integration without using the SDK.

Base URL

EnvironmentBase URL
Productionhttps://api.zenotc.com
Staginghttps://api-staging.zenotc.com
Staging Environment

Use the staging environment for development and testing. It provides the same functionality with test data.

API Resources

ResourceDescription
OrdersCreate, manage, and cancel trading orders
QuotesSubmit and manage two-sided quotes (market making)
Market DataGet prices, order books, and trading pairs
PortfolioView balances, positions, and trade history
RiskCheck risk limits and run pre-trade validations

Authentication

All API requests require authentication using API key headers. See Authentication for details.

curl https://api.zenotc.com/api/sdk/portfolio/balances \
-H "X-API-Key: your_api_key" \
-H "X-API-Timestamp: 1705312200000" \
-H "X-API-Signature: your_signature"

Request Format

  • All request bodies must be JSON with Content-Type: application/json
  • Query parameters should be URL-encoded
  • Timestamps are in ISO 8601 format or Unix milliseconds

Response Format

All responses are JSON with the following structure:

{
"data": { ... },
"timestamp": "2024-01-15T10:30:00.000Z"
}

Error responses:

{
"statusCode": 400,
"message": "Invalid order parameters",
"error": "Bad Request",
"details": { ... }
}

Rate Limits

Endpoint CategoryRate Limit
Market Data30 requests/second
All Other Endpoints10 requests/second

Rate limit headers are included in all responses:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when window resets

When rate limited, you'll receive a 429 Too Many Requests response.

API Key Scopes

API keys are created with specific scopes that control access:

ScopeDescription
READRead-only access to all data
TRADECreate, amend, and cancel orders
MARKET_MAKINGSubmit and manage quotes
WITHDRAWInitiate withdrawals

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing authentication
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Pagination

List endpoints support pagination:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger50Items per page (max 100)

Response includes pagination metadata:

{
"data": [...],
"pagination": {
"page": 1,
"limit": 50,
"total": 150,
"totalPages": 3
}
}