Every amount in the Partner API is sent as an integer string in base units, rather than as a number or a decimal value.
Units
Fee Minimums
Every write endpoint takes both fee fields, and this applies to trades and governance operations alike.
A value below either minimum causes the request to fail with 400 invalid_input.
Slippage Bounds
The minTokensOut field on a buy and minSolOut on a sell provide slippage protection when you set the bound yourself, and both are expressed in the same base units as the rest of the request. Sending slippageBps instead leaves them out entirely, since Trench then derives the bound from a quote.
Setting either field to "0" disables slippage protection entirely, which means the trade will fill at whatever price the venue offers when it executes. Sending slippageBps instead has Trench derive the bound from a quote taken at execution, which avoids the problem altogether.
Working With Base Units
We recommend using integers or bigints throughout, since floating-point arithmetic on lamports loses precision at balances users realistically hold.
Amounts are returned as strings as well, so parse them into bigints rather than floats before doing any arithmetic on the response.