Skip to content

Commit 1fa252c

Browse files
userFRMclaude
andauthored
fix(mcp): add all missing fields to quote, trade-quote, and Greeks serializers (#229)
QuoteTick: add bid_condition, ask_condition, midpoint (#213) TradeQuoteTick: add quote_ms_of_day, bid_exchange, ask_exchange, bid_condition, ask_condition, ext_condition1-4, condition_flags, price_flags, volume_type, records_back (#214) GreeksTick: add all 15 second-order Greeks (vanna, charm, vomma, veta, speed, zomma, color, ultima, d1, d2, dual_delta, dual_gamma, epsilon, lambda, vera) (#215) MCP serializers now emit the same field set as the REST server. Fixes #213, fixes #214, fixes #215 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 441ce3a commit 1fa252c

1 file changed

Lines changed: 25 additions & 3 deletions

File tree

tools/mcp/src/main.rs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,12 @@ fn serialize_quote_ticks(ticks: &[tdbe::types::tick::QuoteTick]) -> Value {
553553
"bid": t.bid,
554554
"bid_size": t.bid_size,
555555
"bid_exchange": t.bid_exchange,
556+
"bid_condition": t.bid_condition,
556557
"ask": t.ask,
557558
"ask_size": t.ask_size,
558559
"ask_exchange": t.ask_exchange,
560+
"ask_condition": t.ask_condition,
561+
"midpoint": t.midpoint,
559562
});
560563
insert_contract_id_fields(&mut row, t.expiration, t.strike, t.right);
561564
row
@@ -576,10 +579,23 @@ fn serialize_trade_quote_ticks(ticks: &[tdbe::types::tick::TradeQuoteTick]) -> V
576579
"exchange": t.exchange,
577580
"condition": t.condition,
578581
"sequence": t.sequence,
582+
"ext_condition1": t.ext_condition1,
583+
"ext_condition2": t.ext_condition2,
584+
"ext_condition3": t.ext_condition3,
585+
"ext_condition4": t.ext_condition4,
586+
"condition_flags": t.condition_flags,
587+
"price_flags": t.price_flags,
588+
"volume_type": t.volume_type,
589+
"records_back": t.records_back,
590+
"quote_ms_of_day": t.quote_ms_of_day,
579591
"bid": t.bid,
580592
"bid_size": t.bid_size,
593+
"bid_exchange": t.bid_exchange,
594+
"bid_condition": t.bid_condition,
581595
"ask": t.ask,
582596
"ask_size": t.ask_size,
597+
"ask_exchange": t.ask_exchange,
598+
"ask_condition": t.ask_condition,
583599
});
584600
insert_contract_id_fields(&mut row, t.expiration, t.strike, t.right);
585601
row
@@ -624,9 +640,15 @@ fn serialize_greeks_ticks(ticks: &[tdbe::types::tick::GreeksTick]) -> Value {
624640
.map(|t| {
625641
let mut row = json!({
626642
"date": t.date, "ms_of_day": t.ms_of_day,
627-
"implied_volatility": t.implied_volatility, "delta": t.delta,
628-
"gamma": t.gamma, "theta": t.theta, "vega": t.vega, "rho": t.rho,
629-
"iv_error": t.iv_error,
643+
"implied_volatility": t.implied_volatility,
644+
"delta": t.delta, "gamma": t.gamma, "theta": t.theta,
645+
"vega": t.vega, "rho": t.rho, "iv_error": t.iv_error,
646+
"vanna": t.vanna, "charm": t.charm, "vomma": t.vomma,
647+
"veta": t.veta, "speed": t.speed, "zomma": t.zomma,
648+
"color": t.color, "ultima": t.ultima,
649+
"d1": t.d1, "d2": t.d2,
650+
"dual_delta": t.dual_delta, "dual_gamma": t.dual_gamma,
651+
"epsilon": t.epsilon, "lambda": t.lambda, "vera": t.vera,
630652
});
631653
insert_contract_id_fields(&mut row, t.expiration, t.strike, t.right);
632654
row

0 commit comments

Comments
 (0)