NEW YORK — A hedge fund trader who blamed her boss for coercing her into insider trading during a 20-year affair was sentenced Wednesday to 30 months in prison, less than prosecutors had hoped for in a case they promoted as their biggest hedge-fund insider trading case ever.

Danielle Chiesi, 45, shook hands with smiling government attorneys and hugged family and friends after the sentence was announced by U.S. District Judge Richard Holwell.

Chiesi had once faced up to 155 years in prison for her role in an insider trading case that has resulted in more than two dozen convictions, including guilty pleas by executives of public companies and numerous hedge fund managers who were caught on wiretaps discussing illegal secrets.

Chiesi pleaded guilty in January to three charges of conspiracy to commit securities fraud, admitting that she fed insider information to Raj Rajaratnam, a one-time billionaire who founded the Galleon Group of hedge funds.