Proof: node --test test/operator-dashboard-app-static.test.mjs verifies dashboard controls forward nullable request limit fields. Assumptions: operator-approved DB config updates may clear request_max_notional and request_max_slippage_bps by sending null through the dashboard control API. Still fake: request settlement truth still depends on inventory-delta attribution instead of venue-native terminal fill events.
This commit is contained in:
parent
b45d12d37c
commit
3cfd48e016
1 changed files with 12 additions and 0 deletions
|
|
@ -627,6 +627,9 @@ async function invokeControl(control, body) {
|
||||||
pairId: body.pair_id || body.pair,
|
pairId: body.pair_id || body.pair,
|
||||||
edgeBps: Number(body.edge_bps),
|
edgeBps: Number(body.edge_bps),
|
||||||
maxNotional: body.max_notional,
|
maxNotional: body.max_notional,
|
||||||
|
requestDefaultNotional: bodyField(body, 'request_default_notional', 'requestDefaultNotional'),
|
||||||
|
requestMaxNotional: bodyField(body, 'request_max_notional', 'requestMaxNotional'),
|
||||||
|
requestMaxSlippageBps: bodyField(body, 'request_max_slippage_bps', 'requestMaxSlippageBps'),
|
||||||
changedBy: body.changed_by || 'operator',
|
changedBy: body.changed_by || 'operator',
|
||||||
reason: body.reason || 'dashboard pair strategy config update',
|
reason: body.reason || 'dashboard pair strategy config update',
|
||||||
});
|
});
|
||||||
|
|
@ -653,6 +656,9 @@ async function invokeControl(control, body) {
|
||||||
mode: body.mode,
|
mode: body.mode,
|
||||||
edgeBps: body.edge_bps,
|
edgeBps: body.edge_bps,
|
||||||
maxNotional: body.max_notional,
|
maxNotional: body.max_notional,
|
||||||
|
requestDefaultNotional: bodyField(body, 'request_default_notional', 'requestDefaultNotional'),
|
||||||
|
requestMaxNotional: bodyField(body, 'request_max_notional', 'requestMaxNotional'),
|
||||||
|
requestMaxSlippageBps: bodyField(body, 'request_max_slippage_bps', 'requestMaxSlippageBps'),
|
||||||
changedBy: body.changed_by || 'operator',
|
changedBy: body.changed_by || 'operator',
|
||||||
reason: body.reason || 'dashboard pair mode update',
|
reason: body.reason || 'dashboard pair mode update',
|
||||||
});
|
});
|
||||||
|
|
@ -693,6 +699,12 @@ function lookupServiceBaseUrl(serviceName) {
|
||||||
return service.base_url;
|
return service.base_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bodyField(body, snakeKey, camelKey) {
|
||||||
|
if (Object.hasOwn(body || {}, snakeKey)) return body[snakeKey];
|
||||||
|
if (Object.hasOwn(body || {}, camelKey)) return body[camelKey];
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
function buildRuntimeConfig(tradingConfig) {
|
function buildRuntimeConfig(tradingConfig) {
|
||||||
return {
|
return {
|
||||||
...config,
|
...config,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue