Skip to main content

Trades API

API endpoints for LMA trade execution, settlement, and trade management. Base Path: /api (trade endpoints in main routes)
Code Reference: app/api/routes.py (trade endpoints)

Trade Execution

Execute Trade

Execute a trade with policy evaluation and CDM event generation. Request Body:
Response: Trade execution result with CDM events and policy evaluation Code Reference: app/api/routes.py (execute_trade endpoint)

Trade Settlement

Settle Trade

Settle a trade with optional x402 payment. Request Body (Optional):
Response: Settlement confirmation or 402 Payment Required Code Reference: app/api/routes.py (settle_trade endpoint)

CDM Events

Get Trade CDM Events

Get CDM events for a specific trade. Response: List of CDM events related to the trade Code Reference: app/api/routes.py (get_cdm_events endpoint)

Additional Resources


Last Updated: 2026-01-14
Code Reference: app/api/routes.py