evgrmn / tmatic

Tmatic is a cryptocurrency platform designed for automated trading on the Bitmex, Bybit and Deribit crypto exchanges.
https://www.tmatic.org
GNU General Public License v3.0
25 stars 6 forks source link

530 error in Bitmex #325

Closed nikolayromenskiy closed 5 days ago

nikolayromenskiy commented 1 week ago

2024-09-11 09:58:53,865 - root - INFO -

hello

2024-09-11 09:58:54,426 - api.api - INFO - Bitmex - Requesting all active instruments. ___try_response 530 Server Error: for url: https://testnet.bitmex.com/api/v1/instrument/active

{'response': <Response [530]>, 'request': <PreparedRequest [GET]>}

<Response [530]>

{'_content': b'<!DOCTYPE html>\n\n\n\n \n\nOrigin DNS error | testnet.bitmex.com | Cloudflare\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n \n
\n
\n

\n Error\n 1016\n

\n Ray ID: 8c16cd4f1bf45432 •\n 2024-09-11 09:58:54 UTC\n

Origin DNS error

\n
\n\n
\n
\n

What happened?

\n

You\'ve requested a page on a website (testnet.bitmex.com) that is on the Cloudflare network. Cloudflare is currently unable to resolve your requested domain (testnet.bitmex.com).\n \n

\n\n \n
\n

What can I do?

\n

If you are a visitor of this website:
Please try again in a few minutes.

If you are the owner of this website:
Check your DNS settings. If you are using a CNAME origin record, make sure it is valid and resolvable. Additional troubleshooting information here.

\n
\n \n
\n\n \n\n\n \n\n\n
\n
\n\n \n\n\n\n', '_content_consumed': True, '_next': None, 'status_code': 530, 'headers': {'Date': 'Wed, 11 Sep 2024 09:58:54 GMT', 'Content-Type': 'text/html; charset=UTF-8', 'Content-Length': '6203', 'Connection': 'keep-alive', 'X-Frame-Options': 'SAMEORIGIN', 'Referrer-Policy': 'same-origin', 'Cache-Control': 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Expires': 'Thu, 01 Jan 1970 00:00:01 GMT', 'Server': 'cloudflare', 'CF-RAY': '8c16cd4f1bf45432-TLL', 'alt-svc': 'h3=":443"; ma=86400'}, 'raw': <urllib3.response.HTTPResponse object at 0x7a52dd35d840>, 'url': 'https://testnet.bitmex.com/api/v1/instrument/active', 'encoding': 'UTF-8', 'history': [], 'reason': '', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(microseconds=204502), 'request': <PreparedRequest [GET]>, 'connection': <requests.adapters.HTTPAdapter object at 0x7a52dd35c9a0>}

Traceback (most recent call last): File "/home/rmn/240910_2/api/http.py", line 90, in request response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 530 Server Error: for url: https://testnet.bitmex.com/api/v1/instrument/active

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/rmn/240910_2/api/errors.py", line 173, in try_response response["error"]["code"] TypeError: 'Response' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/rmn/240910_2/api/api.py", line 70, in start_ws if WS.get_active_instruments(self): File "/home/rmn/240910_2/api/api.py", line 140, in get_active_instruments return Agents[self.name].value.get_active_instruments(self) File "/home/rmn/240910_2/api/bitmex/agent.py", line 17, in get_active_instruments data = Send.request(self, path=Listing.GET_ACTIVE_INSTRUMENTS, verb="GET") File "/home/rmn/240910_2/api/http.py", line 94, in request status = Error.handler( File "/home/rmn/240910_2/api/errors.py", line 92, in handler response = try_response(response, exception) File "/home/rmn/240910_2/api/errors.py", line 204, in try_response print(response["error"]) TypeError: 'Response' object is not subscriptable

2024-09-11 09:58:54,638 - api.api - ERROR - Bitmex Instruments not loaded. Reboot. 2024-09-11 09:58:56,641 - connect - INFO -

2024-09-11 09:58:56,641 - connect - INFO - Something went wrong while loading Bitmex. Reboot.

evgrmn commented 5 days ago

This issue was resolved in one of the latest commits.