EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to the incorporation by reference in the Registration Statement on Form S-3 (No. 333-49285) and the Registration Statements on Forms S-8 (No. 333-60805, No. 333-04839 and No. 333-34681) pertaining to the 1996 Employee Stock Purchase Plan, the 1996 Non-Employee Directors' Stock Option Plan and the 1996 Equity Incentive Plan of Onyx Pharmaceuticals, Inc. of our report dated February 19, 1999, with respect to the financial statements of Onyx Pharmaceuticals, Inc. included in this Annual Report (Form 10-K) for the year ended December 31, 1998. Palo Alto, California March 29, 1999