How to sell all of product_id in a single trade "base_size":?

what can i put for base_size here to sell all of the ETH for USDT? I’ve tried, max, all, -1, got nothing. anyone know?

payload = json.dumps({
“side”: “SELL”,
“client_order_id”: client_order_id,
“product_id”: “ETH-USDT”,
“order_configuration”: {
“market_market_ioc”: {
“base_size”: “???”

Create a request to get your total amount of ETH and use that value. Either that or track all your orders and add them up.

To answer your question a bit more specifically, I don’t think there is an sell all value that you can pass to the create order endpoint. If there was I think it would say here. So you have to list accounts to get your total amount and use that.

I might be wrong about this. If there is a sell all parameter please tell me because that would be useful.

1 Like

Hi @CypherX ! Thank you for using Coinbase APIs. To sell all of product_id in a single trade, you can use the “base_size” parameter. This parameter allows you to specify the size of the order you want to place. You can also use the “min_market_funds” parameter to specify the minimum size of the order. Price Protection Points can be used to protect against slippage for large-sized orders. Hope this answers your question. Do let us know in case you have any more questions or concerns.