hitbtc-com / hitbtc-api

HitBTC API
GNU Lesser General Public License v3.0
322 stars 152 forks source link

Fee calculation #223

Open davidjirovec opened 5 years ago

davidjirovec commented 5 years ago

In my wallet I have 15.4127656 USD. I send an order

{
  "method": "newOrder",
  "params": {
    "clientOrderId": "f8d-412b-beb9-771abd4f9036",
    "symbol": "STRATUSD",
    "side": "buy",
    "price": 0.58,
    "quantity": 26.547,
    "timeInForce": "IOC",
    "strictValidate": true
  }
}

I get response

{
  "jsonrpc": "2.0",
  "error": {
    "code": 20001,
    "message": "Insufficient funds",
    "description": "Check that the funds are sufficient, given commissions"
  },
  "id": null
}

Why? 0.58 26.547 1.001 = 15,41265726 and 15,41265726 < 15.4127656 so my funds should be enough.