Coder Social home page Coder Social logo

Comments (5)

glitch100 avatar glitch100 commented on September 1, 2024

I wonder if it's down to the quantity field and whether it is the correct type. Can you retrieve your balance and see what it says?

from binancedotnet.

tevert avatar tevert commented on September 1, 2024

My Tether balance was at ~55k, ETH was near 0 (and BNB was 35). My napkin math says it should've used nearly all the tether to buy the specified quantity of ETH, plus extra to cover the fee.

I tried again but multiplied the fee deduction by 10 and it went through. So the other elements of my buy order must be correct, but for some reason it thinks it needs somewhat more fee allowance than it actually uses (or I'm totally misunderstanding the fee structure).

Just to clarify, my understanding is that Binance will deduct a 0.1% fee from what currency you're paying, right? And I'm assuming it does a quantity check on your order for fee funds before it sees you intend to pay fees with BNB (which is kinda dumb, but whatever)?

from binancedotnet.

immayankmodi avatar immayankmodi commented on September 1, 2024

@tevert , Can you please provide some information how you calculate amount/quantity etc filters based on the binance api rules https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#symbol-filters here?

from binancedotnet.

tevert avatar tevert commented on September 1, 2024

Sure, code is here: https://github.com/tevert/Trader/blob/master/Trader/Exchange/Binance.cs#L117

  1. Divide the quantity (in USDT) by the price
  2. Subtract the fee (assumed to be 0.1%)
  3. Subtract the modulus of the LOT_SIZE (that was giving me a filter error before I had that)
  4. Lastly do a Math.Round to forcibly reduce the number of decimal places; that was also confusing the API.

Because I'm doing a market buy, I'm pretty sure the filters other than LOT_SIZE don't apply here.

For the purposes of making it work, my local working copy of the code also subtracts a "fudge factor" of 1.5% on top of the fee. A fudge factor of 0.05% wasn't enough though, and I don't think I should need a fudge factor at all, obviously.

from binancedotnet.

immayankmodi avatar immayankmodi commented on September 1, 2024

Thanks but I'm having issue with min trading limit. Opened help/issue #70 here.

from binancedotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.