quan-digital / ftx

Library for connecting to the FTX API.
MIT License
164 stars 59 forks source link

missing ciso8601 in requirements.txt #3

Open cypg09 opened 3 years ago

cypg09 commented 3 years ago

All is in the title : please add ciso8601 in requirements.txt ! Thanks guys, awesome package.

mehmet-demir commented 3 years ago

I'm getting the "No module named 'ciso8601'" error. I tried to install ciso8601 with pip install ciso8601 but then I get some new errors like "Failed to build ciso8601".

cypg09 commented 3 years ago

Please give some more logs, else I won't be able to help you debugging this. Instead of using "pip3 install xxx" please use "python3 (or py if you're on windows) -m pip install xxx".

-------- Message d'origine -------- Le 26 janv. 2021 à 12:51, mehmet-demir a écrit :

I'm getting the "No module named 'ciso8601'" error. I tried to install ciso8601 with pip install ciso8601 but then I get some new errors like "Failed to build ciso8601".

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mehmet-demir commented 3 years ago

Thank you for the quick answer. Yes, I'm on Windows. (8.1) (+ Anaconda 3) I realized this error : "building 'ciso8601' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"

So now I'm installing Microsoft C++ Build Tools.

mehmet-demir commented 3 years ago

Problem solved. Thanks.

immartian commented 3 years ago

The same issue here (Python 3.8.10 on Ubuntu 20.04.2 LTS):

$ python3 -m pip install cis8601
ERROR: Could not find a version that satisfies the requirement cis8601 (from versions: none)
ERROR: No matching distribution found for cis8601
immartian commented 3 years ago

update: I've changed cis8601 to dateutil which can work like a charm.

TenmaChinen commented 2 years ago

As immartian said, you only need to change the api.py file like this :

import time
import urllib.parse
from typing import Optional, Dict, Any, List

from requests import Request, Session, Response
import hmac

# from ciso8601 import parse_datetime  # FROM THIS
from dateutil.parser import parse            # TO THIS

class FtxClient:

    def __init__(self, base_url=None, api_key=None, api_secret=None, subaccount_name=None) -> None:
        self._session = Session()
        self._base_url = 'https://ftx.com/api/'
        self._api_key = api_key
       ······