Giter VIP home page Giter VIP logo

ftx-portfolio-monitoring's People

Contributors

pattomotto avatar

Stargazers

 avatar  avatar

Watchers

 avatar

ftx-portfolio-monitoring's Issues

Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'sheets.googleapis.com'

Traceback (most recent call last):
File "/home/vensilver/ftxp/pmPortfolioMonitoringBot.py", line 57, in loop
self.writeRecord(subaccount, dataframe)
File "/home/vensilver/ftxp/pmPortfolioMonitoringBot.py", line 108, in writeRecord
gsheet.clearWorksheet(fileName=self.gSheetName, worksheetName=worksheetName, range='A:F')
File "/home/vensilver/ftxp/gsheetHelper.py", line 39, in clearWorksheet
for worksheet in spreadsheet.worksheets():
File "/home/vensilver/.local/lib/python3.8/site-packages/gspread/spreadsheet.py", line 301, in worksheets
sheet_data = self.fetch_sheet_metadata()
File "/home/vensilver/.local/lib/python3.8/site-packages/gspread/spreadsheet.py", line 243, in fetch_sheet_metadata
r = self.client.request("get", url, params=params)
File "/home/vensilver/.local/lib/python3.8/site-packages/gspread/client.py", line 71, in request
raise APIError(response)
gspread.exceptions.APIError: {'code': 429, 'message': "Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'sheets.googleapis.com' for consumer 'project_number:504486318658'.", 'status': 'RESOURCE_EXHAUSTED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'RATE_LIMIT_EXCEEDED', 'domain': 'googleapis.com', 'metadata': {'consumer': 'projects/504486318658', 'quota_metric': 'sheets.googleapis.com/read_requests', 'quota_limit': 'ReadRequestsPerMinutePerUser', 'service': 'sheets.googleapis.com'}}]}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "start_bot.py", line 18, in
monitoringBot.loop()
File "/home/vensilver/ftxp/pmPortfolioMonitoringBot.py", line 73, in loop
exc_type, exc_tb = sys.exc_info()
ValueError: too many values to unpack (expected 2)

FutureWarning:

new warning

FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
dataframe = dataframe.append(history, ignore_index=True)
/home/vensilver/.local/lib/python3.8/site-packages/apscheduler/util.py:95: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
if obj.zone == 'local':
/home/vensilver/.local/lib/python3.8/site-packages/apscheduler/triggers/interval.py:66: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.normalize(next_fire_time)

api ccxt read time out error

the code stops running after some time some exception I think so


 resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 423, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 330, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='ftx.com', port=443): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vensilver/.local/lib/python3.8/site-packages/ccxt/base/exchange.py", line 587, in fetch
    response = self.session.request(
  File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='ftx.com', port=443): Read timed out. (read timeout=10)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/vensilver/ftxp/pmPortfolioMonitoringBot.py", line 34, in loop
    wallets = {'main': self.getWalletData(self.mainExchangeClient)}
  File "/home/vensilver/ftxp/pmPortfolioMonitoringBot.py", line 73, in getWalletData
    data = exchangeClient.getWalletBalance()
  File "/home/vensilver/ftxp/exchangeClient.py", line 13, in getWalletBalance
    return self.exchange.fetch_balance()
  File "/home/vensilver/.local/lib/python3.8/site-packages/ccxt/ftx.py", line 960, in fetch_balance
    response = self.privateGetWalletBalances(params)
  File "/home/vensilver/.local/lib/python3.8/site-packages/ccxt/base/exchange.py", line 457, in inner
    return entry(_self, **inner_kwargs)
  File "/home/vensilver/.local/lib/python3.8/site-packages/ccxt/base/exchange.py", line 506, in request
    return self.fetch2(path, api, method, params, headers, body, config, context)
  File "/home/vensilver/.local/lib/python3.8/site-packages/ccxt/base/exchange.py", line 502, in fetch2
    return self.fetch(request['url'], request['method'], request['headers'], request['body'])
  File "/home/vensilver/.local/lib/python3.8/site-packages/ccxt/base/exchange.py", line 617, in fetch
    raise RequestTimeout(details) from e
ccxt.base.errors.RequestTimeout: ftx GET https://ftx.com/api/wallet/balances

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vensilver/.local/lib/python3.8/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/vensilver/ftxp/pmPortfolioMonitoringBot.py", line 68, in loop
    exc_type, exc_tb = sys.exc_info()
ValueError: too many values to unpack (expected 2)

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.