API Reference
Complete reference for the Vortum trading platform API.
Overview
Authentication
All API calls require authentication via Internet Identity or other ICP-compatible identity providers. The caller's principal is automatically verified by the canister.
System Status
Before placing orders, check the system status:
typescript
const status = await backend.status()| Status | Description |
|---|---|
Ok | Normal operations |
PostOnly | Only maker orders allowed |
CancelOnly | Only cancellations allowed |
Maintenance | System offline for maintenance |
API Sections
- Trading API - Order placement and management
- Market Data API - Order book, tickers, K-lines
- Settlement API - Transaction history
- Wallet API - Balances and withdrawals
- Account API - User management
- Error Handling - Error codes and handling
Rate Limits
| Operation | Unregistered | Registered | Verified |
|---|---|---|---|
| Trading | 10/min | 100/min | 1000/min |
| Balance Operations | 5/min | 30/min | 100/min |
| Account Creation | 1/min | 5/min | 10/min |
| Expensive Operations | 2/min | 10/min | 50/min |
Query endpoints (marked query) have no rate limits.
ICRC Standards
The canister implements:
- ICRC-10: Supported standards discovery (
icrc10_supported_standards) - ICRC-28: Trusted origins for cross-origin calls (
icrc28_trusted_origins)
Best Practices
Order Placement
- Check system status before placing orders
- Use appropriate time-in-force (GTC for long-term, IOC for immediate)
- Set slippage tolerance to protect against adverse price movements
- Handle partial fills by checking
filled_quantityandremaining_quantity
Market Data
- Use query methods for read-only data (no gas costs)
- Cache ticker data with appropriate TTL (1-5 seconds)
- Use
depth()for simple orderbook,get_order_book()for full data - Paginate large result sets using limit/offset
Wallet Operations
- Verify deposit address before sending funds
- Check minimum deposit/withdrawal amounts per token
- Monitor withdrawal status via
get_withdrawal() - Allow time for balance sync after deposits