EdgeX Control API
Base path: /api. Auth: HTTP Basic (same as console login).
REST Endpoints
GET /health,GET /accountGET /orders,POST /orders,DELETE /orders/{order_id}GET /snapshot,GET /relative-valueGET /ui/state,POST /ui/patch,GET|POST /ui/bindingsPOST /ingest/quote,POST /ingest/signalPOST /control/risk,GET|POST /control/optimizerGET /scripts,GET /scripts/{id},POST /scripts/save,POST /scripts/{id}/wasm/build,POST /scripts/{id}/wasm/run,POST /scripts/{id}/wasm/test,POST /scripts/{id}/run,POST /scripts/{id}/stop
Websocket Stream
GET /stream?auth=Basic...
Client Commands
{"op":"set_subscriptions","kinds":["quote","order"],"quote_symbols":["AAPL","MSFT"]}
{"op":"subscribe","quote_symbols":["IBM"]}
{"op":"unsubscribe","kinds":["heartbeat"]}
{"op":"reset_subscriptions"}
Server Stream Events
snapshot, quote, signal, order, risk_control, optimizer_control, ui_patch, ui_bindings, script_saved, script_runtime, heartbeat, stream_control, stream_error.
Script Callback Skeletons
Python:
def on_event(event, ctx):
return None
Rust:
pub fn on_event(event: &str) -> Option {
None
}
WASM Script Endpoints
Rust scripts only. Build creates artifacts under the backend WASM root, run/test execute via configured WASM runtime.
POST /scripts/{id}/wasm/build
{}
POST /scripts/{id}/wasm/run
{"input":"{\"kind\":\"quote\",\"symbol\":\"AAPL\"}"}
POST /scripts/{id}/wasm/test
{"input":"{\"kind\":\"test\"}","expected_output":"{\"ok\":true}"}
Message Dictionary Samples
Quote event:
{"kind":"quote","data":{"symbol":"AAPL","bid_px":100.0,"ask_px":100.1}}
Order command:
{"cmd":"submit_order","data":{"symbol":"AAPL","side":"buy","order_type":"limit","qty":10,"limit_price":100.0,"time_in_force":"day"}}
UI patch command:
{"cmd":"ui_patch","data":{"source":"script","updates":[{"path":"table.pnl.total_return","value":0.0123}]}}