tradeparadex / code-samples

Collection of Paradex code samples and snippets
6 stars 7 forks source link

[ts] Fix order signature for market orders #58

Closed luccamordente closed 4 months ago

luccamordente commented 4 months ago

Market orders do not take a price, but the order signature requires it for all types of orders. In case of market orders, the price must be set to 0.

This change updates the order signing function to set the price to sign to 0 when it's not set.