How should the maximum sales amount be calculated?

For example, I had 0.87 Orca in my wallet. When selling, I could sell a maximum of 0.86. How is this calculated? For example, if I give a 0.87 sell order using the API, will I get an error?