binance-us / binance-us-api-docs

Official Documentation for the Binance US APIs and Streams
411 stars 168 forks source link

Error code -1100 for asset dust conversions #12

Open jsonmaur opened 3 years ago

jsonmaur commented 3 years ago

Dust conversions are not supported in the dashboard, but I was hoping they would be supported in the API. Following the documentation for the regular Binance API, I found the endpoint /sapi/v1/asset/dust. Which responds on the BinanceUS API, but seems to be really inconsistent. It doesn't actually convert the dust and returns random errors without changing how it's being called. Currently getting the error "Illegal characters found in a parameter" with code -1100.

Here is how I'm calling the endpoint from a shell script:

API_KEY="..."
API_SECRET="..."
ASSET="ETH"

TS="$(date +%s)000"
SIG=$(echo -n "asset=$ASSET&timestamp=$TS" | openssl dgst -sha256 -hmac "$API_SECRET")

curl https://api.binance.us/sapi/v1/asset/dust -H "x-mbx-apikey: $API_KEY" -d "asset=$ASSET&timestamp=$TS&signature=$SIG"