question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[10 mBTC Bounty] General metadata improvements

See original GitHub issue

I’ve just tried executing a trade on the BTC/LTC market on hitbtc which failed with the message ‘Rounding necessary’. Now it seems that LTC and BTC are represented on the 8 exchange with 8 decimal places, as is the price on the BTC/LTC exchange. However, the quantity that is tradable on that market is rounded to just 1 decimal place. Is there a common place in this API (like the .json metadata files) to specify that value?

I was thinking something like:

{
  "currency_pairs": {
    "LTC/BTC": {
      "price_scale": 8,
      "quantity_scale": 2
    }
  }

  ...

  "BTC": {
    "scale": 8
  },
  "LTC": {
    "scale": 8
  },

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
npomfretcommented, Jun 28, 2017

WRT the fees modelling…

I agree that funding (deposit and withdrawal fees) are probably best ignored by this project, at least for now.

And I think to model the fees better then separating taker from maker would be a good step forward. In addition I think we need per currency-pair fees as some exchanges have different fees in different markets.

And… the fees are sometimes issued in the base currency, and sometimes the counter currency. Sometimes the user can choose which (and it’s a port of your account settings).

@molexx the ‘scaling’ parameters are really important. If you don’t scale your values properly the exchanges will reject your api calls. The error messages will say something like “needs rounding” or “price too accurate”. Basically if you send a value at the wrong precision the exchange will either round it or reject it - I think its common practice to reject it.

So we have

  • currency-scale - for use when depositing and withdrawing currency. Possibly you’d also need use this to calculate your fees accurately
  • price-scale - for use when trading
  • amount-scale - doesn’t exist in this project yet. Also for use when trading to set the quantity on your order. Maybe tick-size would be a better name. In some markets the trade size / quantity needs to be divisible by 100 or even 1000.
1reaction
molexxcommented, Jun 24, 2017

I’d be interested to know any progress/thoughts on this, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is mStable BTC (MBTC) | What is MBTC token - Morioh
mStable's new mAsset, mBTC, unites various Bitcoin-pegged ERC20 tokens. The mBTC token can be minted with wBTC, renBTC and sBTC, and users can...
Read more >
Latest WINNER news, trends, updates and reports - COIN360
Get the latest Bitcoin news and updates from top crypto media publications aggregated in our news section.
Read more >
CALIFORNIA COASTAL COMMISSION LCP-6-SAN-21-0046 ...
General Membership of the Mission Beach Town Council on 6/12/2019. ... 5, 10 (“We are also working to comply with the Coastal.
Read more >
mask hydro llc: Topics by Science.gov
EL10 -53-000] FPL Energy Maine Hydro LLC, Complainant v. Great Lakes Hydro America LLC Rumford Falls Hydro LLC, Respondents; Notice of Complaint March...
Read more >
Sources - Proof of Payment
Most have a general concept of this stuff, and that is usually fine for ... to another unit so that, for example, it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found