I’m having problems with the dust api.
POST: api.binance.com/sapi/v1/asset/dust?asset=ATOM×tamp=1643661140303&signature=XYZ
POST: api.binance.com/sapi/v1/asset/dust?asset=ATOM&asset=ZIL×tamp=1643661156303&signature=XYZ
No matter what I do get the error: {“code”:-1102,“msg”:“illegal parameter”}. I was told to post here by Jeremy / theL4 on your Telegram chat.
It might be possible that “illegal parameter” is wrongly returned for when the assets are with balance 0. Is this your case?
psycato
February 3, 2022, 10:00pm
3
No. I’ve only tried dust’ing assets that I actually have a balance on… (ranging from 1 to 15 usdt equivalent)
aisling
February 4, 2022, 11:49am
4
I can’t reproduce the error message, unless it’s tested with a 0 balance asset.
Can you try to :
1 - Use https://github.com/binance/binance-signature-examples/blob/master/python/spot/spot.py
2- Comment everything below "" ====== end of functions ====== ""
3- Add code in the end of the file:
# Dust Transfer (USER_DATA)
params = {
"asset": ["ATOM"]
}
response = send_signed_request("POST", "/sapi/v1/asset/dust", params)
print(response)
4 - run the spot.py file
And see what’s the outcome? It gives me “illegal parameter", but it’s because I don’t have ATOM.
“balance”:168.1,“available”:168.1 for ZIL.
10,08 usdt equivalent and 0,00024176 BTC equivalent
@psycato Ok, will pass the feedback internally. Thanks for sharing.
Btw, this is on a sub account. I have not tested the same API for the main account.
aisling
February 8, 2022, 10:54am
9
@psycato Upon feedback, this error message can also be thrown when it’s an asset that’s not available to be converted to BNB. the team will work on improving the error message in the future to avoid confusion.
psycato
February 9, 2022, 5:20am
10
I see. Thank for your clearing that up then…
aisling
February 9, 2022, 5:12pm
11
@psycato We’ve added a new endpoint Binance API Documentation for users to consult which of their assets can be converted to BNB.
psycato
February 10, 2022, 8:55pm
12
That’ll come in handy Thanks.