Skip to content

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()
StatusDescription
OkNormal operations
PostOnlyOnly maker orders allowed
CancelOnlyOnly cancellations allowed
MaintenanceSystem offline for maintenance

API Sections

Rate Limits

OperationUnregisteredRegisteredVerified
Trading10/min100/min1000/min
Balance Operations5/min30/min100/min
Account Creation1/min5/min10/min
Expensive Operations2/min10/min50/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

  1. Check system status before placing orders
  2. Use appropriate time-in-force (GTC for long-term, IOC for immediate)
  3. Set slippage tolerance to protect against adverse price movements
  4. Handle partial fills by checking filled_quantity and remaining_quantity

Market Data

  1. Use query methods for read-only data (no gas costs)
  2. Cache ticker data with appropriate TTL (1-5 seconds)
  3. Use depth() for simple orderbook, get_order_book() for full data
  4. Paginate large result sets using limit/offset

Wallet Operations

  1. Verify deposit address before sending funds
  2. Check minimum deposit/withdrawal amounts per token
  3. Monitor withdrawal status via get_withdrawal()
  4. Allow time for balance sync after deposits