Skip to content

Commit 1f7b455

Browse files
userFRMclaude
andcommitted
fix: restore Greeks function signatures in Python SDK
all_greeks() and implied_volatility() take (strike: f64, is_call: bool) not (&str, &str). The earlier sed that changed subscription methods accidentally clobbered these too. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b37f346 commit 1f7b455

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sdks/python/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,12 @@ fn option_contract_to_dict(py: Python<'_>, c: &tick::OptionContract) -> Py<PyAny
411411
fn all_greeks(
412412
py: Python<'_>,
413413
spot: f64,
414-
strike: &str,
414+
strike: f64,
415415
rate: f64,
416416
div_yield: f64,
417417
tte: f64,
418418
option_price: f64,
419-
right: &str,
419+
is_call: bool,
420420
) -> Py<PyAny> {
421421
let g = tdbe::greeks::all_greeks(spot, strike, rate, div_yield, tte, option_price, is_call);
422422
let dict = PyDict::new(py);
@@ -453,12 +453,12 @@ fn all_greeks(
453453
#[allow(clippy::too_many_arguments)] // Reason: mirrors Black-Scholes parameter set expected by Python callers
454454
fn implied_volatility(
455455
spot: f64,
456-
strike: &str,
456+
strike: f64,
457457
rate: f64,
458458
div_yield: f64,
459459
tte: f64,
460460
option_price: f64,
461-
right: &str,
461+
is_call: bool,
462462
) -> (f64, f64) {
463463
tdbe::greeks::implied_volatility(spot, strike, rate, div_yield, tte, option_price, is_call)
464464
}

0 commit comments

Comments
 (0)