Pharma bad boy Martin Shkreli has used his E-Trade brokerage account — which contained a cool $45 million as of Wednesday — to secure the $5 million bond that has kept him out of jail since mid-December, when he was indicted on federal securities fraud charges.

Here's one guy who REALLY doesn't want the stock market to tank any further — or he might get locked up.

A magistrate judge in Brooklyn, New York, agreed to accept Shkreli's account as collateral for the bond, but placed a number of tight restrictions on the deal. Shrekli had until Friday to determine what assets he wanted to use to secure his release.

The judge, Kiyo Matsumoto, barred Shkreli, any of his relatives, employees or other associates from selling off or transferring any of the holdings in the E-Trade account, or using the account to secure any other debt. Matsumoto also ordered E-Trade to let federal prosecutors in Brooklyn know if the assets in the account are valued at less than $5 million.

Shkreli, 32, was arrested last month on charges related to his actions at the hedge fund he previously ran, and the pharmaceuticals firm, Retrophin, that he founded and ran until his ouster by the company's board of directors in 2014. Shkreli is accused of looting Retrophin to pay off investors whom he was suspected of defrauding at the hedge fund, and also is accused of misrepresenting the amount of assets his fund had under management.