Giter Club home page Giter Club logo

Comments (21)

ka1myk avatar ka1myk commented on August 15, 2024

I cloned the repository, created binance api keys, added them to config, and when accessing the ip address of the link, I get an error. Please tell me what the reason may be. PS: I created new keys twice.

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Looks like the balance in your account is 0 which is causing this error. I could add a check in for this but do wonder what's to gain from a dashboard that has nothing to show...? Unless perhaps it's just for data in the past.

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

I have 8 active trading pairs:
BUSD to ADA, DOGE, BTC, ETH, FTT, XRP, BNB, SOL.
Will make 1 buy and sell USDT to ETH and return with result.

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

The error may be caused by an unplanned reboot of the server during order reading. Tell me, please, is there a method for cleaning the database?

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

You can simply delete the database and it will be repopulated by the next scraping routine. It's found in the config folder usually named futures.db

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024
  • rm -rf /usr/local/lib/python3.8/dist-packages/futuresboard
  • rm -rf /root/futuresboard
  • git clone && python3 -m pip install .
    still have
188.255.34.222 - - [29/Mar/2022 06:51:58] "GET / HTTP/1.1" 500 -
188.255.34.222 - - [29/Mar/2022 06:51:58] "GET /favicon.ico HTTP/1.1" 404 -
[2022-03-29 06:52:01,645] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/lib/python3.8/dist-packages/futuresboard/blueprint.py", line 340, in index_page
    coin_list=get_coins(),
  File "/usr/local/lib/python3.8/dist-packages/futuresboard/blueprint.py", line 103, in get_coins
    pbr = round(calc_pbr(position[3], position[1], position[2], float(balance[0])), 2)
  File "/usr/local/lib/python3.8/dist-packages/futuresboard/blueprint.py", line 69, in calc_pbr
    return abs(volume * price) / balance
ZeroDivisionError: float division by zero
188.255.34.222 - - [29/Mar/2022 06:52:01] "GET / HTTP/1.1" 500 -

2022-03-29T06:58:09 INFO balance: 101.172 equity: 100.874 - from passivbot log.

Any ideas how to fix?

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Hmm that is strange indeed, this is for Binance or Bybit? It's not a subaccount?

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

Binance, no subaccount. All restrictions are enable like on pic.

изображение

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

Have new test: on vps with my futuresboard (working api keys) delete and insert keys of my friend (broken api keys). Futuresboard shows 500 error. Insert my keys and working again.

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

The dashboard definitely should not have all those permissions 🤣

It's strange because those permissions will allow totalWalletBalance to be pulled and saved.

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Have new test: on vps with my futuresboard (working api keys) delete and insert keys of my friend (broken api keys). Futuresboard shows 500 error. Insert my keys and working again.

oh, so the API keys needed refreshing? 😵‍💫

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

Ok, will create new api keys with only read permissions and send to you. Maybe it will be useful

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

api
OxhjDngPVdgGla4Lefi25FV0QgUNQy1mQZ1QFfpMsUhNtNJGJVW9dkBXWJ6FmvjZ
secret
IeTfz6nrETnzhkOGCNIIrAcGca8hVEQoh4jliSy6XYO1t2RkvP8nJR77kSu4ku1U

only for reading, please, try it

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Aha! Looks like you're using BUSD? (multi-asset mode). The values I am pulling from binance explain it only returns USDT:
"totalMaintMargin": "0.00000000", // total maintenance margin required, only for USDT asset.

I think it should be ok for me to loop through the assets and have them replace the values if they're greater than 0 - just need to see what the effects of this would be.

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

You're right! So the solution is already prepared? Can I update the version?

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Not yet, once I get back to work I'll get a fix in for it~

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

Finally found a solution. For the dashboard to work correctly, client.futureschange_multi_assets_mode(multiAssetsMargin="True") must be executed

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

multiAssetsMargin

Is that code from this library? This dashboard makes API calls directly without using any libraries (for better or worse). I'm currently working on a another implementation of the dashboard though and will factor this in.

from futuresboard.

ka1myk avatar ka1myk commented on August 15, 2024

https://binance-docs.github.io/apidocs/futures/en/#change-multi-assets-mode-trade
Can be called via POST /fapi/v1/multiAssetsMargin

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Perfect! I'll look into this

from futuresboard.

ecoppen avatar ecoppen commented on August 15, 2024

Didn't get to implementing this in V1 and while the PR #71 did address some of this, I broke it and now will look to have this sorted for V2.

from futuresboard.

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.