Open Mas313 opened 1 year ago
Hello there
In order to consume all USDT you have, You can use Funds. It it pointing to your USDT amount that you have. First check amount of USDT you have and then specify the portion of it that you want to use as USDT, in Funds parameter:
Param | type | Description |
---|---|---|
size | String | [Optional] Desired amount in base currency |
funds | String | [Optional] The desired amount of quote currency to use |
But please note that Funds is useable for Market type only (As in your above example code)
Thanks for the reply, for the buy order its working fine as I put funds='20' and coins of 20 USDT worth are bought ( 27.11 ADA) . For the sale order, I need to sell all coins I got for 20 USDT. I retrieved the coin balance through API which was correct. however, when putting size="27.11" I get exception related to coin increment value
For selling, it is better to go ahead with size (as you said above).
But you need to calculate size correctly (and also consider the fee). I guess the issue is in calculation of Size.
I am using the example given here to place a market order. I need to know what parameter ( 'fund' )value I need to put to buy with all available USDT in my account and then sell all purchased tokens when required. I am unable to find any specific value in API for the 'funds' parameter in documentation to fulfill my requirement. I have tried this before