“advNo”: “XXXX”, # SELL ad ID
“price”: price_buy,
“initAmount”: 155,
“advStatus”: 1, # Assuming 1 means active
“tradeType”: “SELL”, # Trade type as SELL
but when I try to execute it, I get an error in initAmount
I need to insert the total amount of USDT in my ad, in this case 155, but I get an error
IF I REMOVE THE LINE EVERYTHING WORKS NORMAL
Failed to update SELL ad: 400 - {“code”:83996,“msg”:“Please check the input info”}
Failed to update SELL ad: 400 - {“code”:83996,“msg”:“Please check the input info”} indicates that there is a problem with the information provided in the request. This could mean that one or more fields are not adhering to the API’s expected format, values, or data types.
Can you please check on the below:
Make sure that:
initAmount is an integer or a float as expected by the API (not a string).
The value of initAmount meets any specified constraints (like minimum or maximum values, increments, etc.).
If you can use the below validation function…
Example of a simple validation function
def validate_params(params):
errors =
if not isinstance(params[‘initAmount’], (int, float)):
errors.append(‘initAmount must be a number’)
# Add other validations as per the API documentation
return errors
params = {
“advNo”: “XXXX”, # SELL ad ID
“price”: price_buy,
“initAmount”: 155,
“advStatus”: 1, # Assuming 1 means active
“tradeType”: “SELL” # Trade type as SELL
}
Please note that there are two fields that handle amounts in ads: initAmount and surPlusAmount. In initAmount all the refills you make to an ad are accumulated and surPlusAmount is what you have left available after all the orders you received and completed that ad. For example, suppose you load the ad with 1000 and you sell 400, when you check the status of the ad it will say initAmount 1000 surPlusAmount 600, if you want to refill the ad to 1000, then you have to send a post request to the update Ad endpoint with parameter initAmount: 1400. And so on every time you want to refill it.
hey asheesh kumar could u help me with my java code, i am trying countlessly to place orders using websocket api and FIX api but i just dont know how so could u help me out? thx
Hey @Billower,
Have you checked the Java connector WebSocket API implementation? Here are some examples on how to call the different WebSocket API endpoints with the connector.
For the FIX API, I suggest you take a look at the documentation.
i still really feel stuck trying to make it work with the java connector and FIX api and i still dont understand any of it, im using ED25519 or something signature and some other REST api methods for available balance and lotsize step and i seriously need ur help. could u just like correct it and give it back to me or something through email or instagram whatever just pls i’m seriously fed up with my code not working but i need it to work so pls just help me. i dont want to bother u at all but i really want this to happen. Thank you