묻고 답해요
160만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결비트코인 선물거래 자동매매 시스템(저자직강)
BinanceApiException: ('ExecuteError', "[Executing] -4061: Order's position side does not match user's setting.")
#### 주문: LONG 지정가매수BinanceApiException: ('ExecuteError', "[Executing] -4061: Order's position side does not match user's setting.")아래를 실행하면 위와 같은 에러가 발생합니다. App에서는 hedge mode가 아니라 one way로 세팅되었구요. API 에서 hedge mode, one way mode를 어떻게 변경하나요?result = request_client.post_order(symbol=coin_name,side=OrderSide.BUY,ordertype=OrderType.LIMIT,quantity = '20',price = '0.4002',timeInForce = "GTC",positionSide="LONG")print(">>orderId:{}".format(result.orderId))
-
미해결비트코인 선물거래 자동매매 시스템(저자직강)
python version
안녕하세요. Python 3.7.7을 설치하도록 되어있는데 3.7.16 version설치할 경우 문제가 있을까요?
-
미해결비트코인 선물거래 자동매매 시스템(저자직강)
read_json()관련 질문
웹크롤러 제작 관련 중 오류가 계속해서 나와서 질문하는 바입니다. 샘플코드를 실행해도 다음과 같은 오류가 나서 질문드리는 바입니다. 웹크롤러 120일 전체 데이터를 받아오는 코드에 대해 질문드리는 바입니다. df_candle_temp = pd.read_json(webpage.content) 에 대해 계속해서 오류가 나오는데, TypeError: Expected file path name or file-like object, got <class 'bytes'> type 라는 말이 나오는데, 이 에러의 표면적인 뜻(?)는 알겠으나, 진짜로 왜 이 에러가 뜨는지, 그리고 어떻게 해결해야 하는지를 잘 모르겠어서 이렇게 질문드리는 바입니다.아래는 에러 메시지입니다.--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[14], line 22 19 webpage = requests.get(url) 21 #(3)JSON 형식 데이터 읽어서 임시 데이터프레임에 저장 ---> 22 df_candle_temp = pd.read_json(webpage.content) 24 #(4) 새로받은 데이터를 기존 데이터프레임과 병합 25 df_candle = pd.concat([df_candle,df_candle_temp],axis=0) File C:\python3111\Lib\site-packages\pandas\util\_decorators.py:211, in deprecate_kwarg.<locals>._deprecate_kwarg.<locals>.wrapper(*args, **kwargs) 209 else: 210 kwargs[new_arg_name] = new_arg_value --> 211 return func(*args, **kwargs) File C:\python3111\Lib\site-packages\pandas\util\_decorators.py:331, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*args, **kwargs) 325 if len(args) > num_allow_args: 326 warnings.warn( 327 msg.format(arguments=_format_argument_list(allow_args)), 328 FutureWarning, 329 stacklevel=find_stack_level(), 330 ) --> 331 return func(*args, **kwargs) File C:\python3111\Lib\site-packages\pandas\io\json\_json.py:733, in read_json(path_or_buf, orient, typ, dtype, convert_axes, convert_dates, keep_default_dates, numpy, precise_float, date_unit, encoding, encoding_errors, lines, chunksize, compression, nrows, storage_options) 730 if convert_axes is None and orient != "table": 731 convert_axes = True --> 733 json_reader = JsonReader( 734 path_or_buf, 735 orient=orient, 736 typ=typ, 737 dtype=dtype, 738 convert_axes=convert_axes, 739 convert_dates=convert_dates, 740 keep_default_dates=keep_default_dates, 741 numpy=numpy, 742 precise_float=precise_float, 743 date_unit=date_unit, 744 encoding=encoding, 745 lines=lines, 746 chunksize=chunksize, 747 compression=compression, 748 nrows=nrows, 749 storage_options=storage_options, 750 encoding_errors=encoding_errors, 751 ) 753 if chunksize: 754 return json_reader File C:\python3111\Lib\site-packages\pandas\io\json\_json.py:818, in JsonReader.__init__(self, filepath_or_buffer, orient, typ, dtype, convert_axes, convert_dates, keep_default_dates, numpy, precise_float, date_unit, encoding, lines, chunksize, compression, nrows, storage_options, encoding_errors) 815 if not self.lines: 816 raise ValueError("nrows can only be passed if lines=True") --> 818 data = self._get_data_from_filepath(filepath_or_buffer) 819 self.data = self._preprocess_data(data) File C:\python3111\Lib\site-packages\pandas\io\json\_json.py:858, in JsonReader._get_data_from_filepath(self, filepath_or_buffer) 851 filepath_or_buffer = stringify_path(filepath_or_buffer) 852 if ( 853 not isinstance(filepath_or_buffer, str) 854 or is_url(filepath_or_buffer) 855 or is_fsspec_url(filepath_or_buffer) 856 or file_exists(filepath_or_buffer) 857 ): --> 858 self.handles = get_handle( 859 filepath_or_buffer, 860 "r", 861 encoding=self.encoding, 862 compression=self.compression, 863 storage_options=self.storage_options, 864 errors=self.encoding_errors, 865 ) 866 filepath_or_buffer = self.handles.handle 867 elif ( 868 isinstance(filepath_or_buffer, str) 869 and filepath_or_buffer.lower().endswith( (...) 872 and not file_exists(filepath_or_buffer) 873 ): File C:\python3111\Lib\site-packages\pandas\io\common.py:900, in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options) 895 is_wrapped = not ( 896 isinstance(ioargs.filepath_or_buffer, str) or ioargs.should_close 897 ) 899 if "r" in ioargs.mode and not hasattr(handle, "read"): --> 900 raise TypeError( 901 "Expected file path name or file-like object, " 902 f"got {type(ioargs.filepath_or_buffer)} type" 903 ) 905 handles.reverse() # close the most recently added buffer first 906 if ioargs.should_close: TypeError: Expected file path name or file-like object, got <class 'bytes'> type
-
미해결금융데이터 분석을 위한 판다스 활용법
append
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.안녕하세요, 시리즈 추가하는 append에서 이러한 오류가 뜹니다. FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. concat 으로 바꿔서 하니,'DataFrame' object has no attribute 'concat'이런 오류가 뜨구요. squeeze가 돌아가지않아 빼고해서 dataframe 상태입니다.
-
미해결금융데이터 분석을 위한 판다스 활용법
squeeze 오류
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. series 불러올때 squeeze 입력하면 오류떠요.The squeeze argument has been deprecated and will be removed in a future version. Append .squeeze("columns") to the call to squeeze.
-
해결됨2023년 가상자산 시장전망
바이낸스 코인들
바이낸스 계열 코인들은 이미 메인넷을 했는데 이더리움이랑 묶는 이유는 뭔가요?
-
해결됨파이썬(Python)으로 데이터 기반 주식 퀀트 투자하기 Part1
pivot() 하니 row의 수가 줄어들었는데 이유가 무엇인지요?
2006년부터 2017년까지 12년의 ROA 탑10을 추리니 120개가 나왔습니다.그리고 컬럼과 인덱스를 설정해서 pivot을 했는데요컬럼의 숫자는 원본 데이터의 종목명인 Name인데 컬럼이 120개가 아니라 109가 되었습니다.pivot()하면 숫자가 줄어드는 이유가 무엇인지요?
-
해결됨파이썬(Python)으로 데이터 기반 주식 퀀트 투자하기 Part1
가상환경에서 FinanceDataReader import
오류패키지목록, 3.6파이썬 환경에서 FinanceDataReader import하는데 오류가 나네요jupyter-lab으로 실행 시 오류없이 진행가능하나 vscode로 진행해보고 싶어서 혹시 답변 가능할까요구글링 열심히 했는데 잘 모르겠네요
-
해결됨비트코인 암호화폐 자동매매 코인봇 만들기 Part 1 - 무위험 전략 학습하기
에러가 있어서 문의 드립니다..
위 사진처럼 처음에는 매도가 잘되었는데 2번째부터 uuid를 찾을수 없다는 에러가 발생합니다.. 알려주시면 감사하겠습니다.
-
미해결파이썬(Python)으로 데이터 기반 주식 퀀트 투자하기 Part2
Vectorizing / Event-based Backtesting
안녕하세요. 수강생입니다. 강의 정말 감사합니다~ 한가지 질문이 있습니다. 제목과 같이 Vectorizing bt, Event-based bt의 차이가 잘 이해가 되지 않습니다. 제가 하고 있는 (초급) backtesting은 아마도(?) Vectorizing bt인 것 같습니다. ohlcv 가격 데이터로 VAA, DAA, 변동성 돌파 등을 공부해보았습니다. 제가 여쭤보는 내용이 명확성이 떨어지는 것 같아 조금 답답한 맘도 있네요. 질문이 너무 포괄적일 수도 있는데요. Vectorizing bt와 Event-bbased bt 차이에 대해서 간략히(?) 설명해주실 수 있으실까요? ... 디핑님~
-
해결됨파이썬(Python)으로 데이터 기반 주식 퀀트 투자하기 Part1
선생님 질문이 있습니다!
해당 행렬에서 영업이익률을 net income으로 바꿀 수는 없을까요. 즉 .rename같은 로직을 어떻게 사용할 수 있을까요. 먼저 원데이터셋에서 처리를 해야할까요 이상태에서 바꿀 수 있는 기능은 없을까요.
-
미해결파이썬(Python)으로 데이터 기반 주식 퀀트 투자하기 Part1
!pip install -r requirements.txt 시 error
강의 결제하고 첫 강부터 난관에 부딪혓네요 ㅠ jupyter lab에서 !pip install -r requirements.txt 입력시 하기와 같이 error 메세지가 뜹니다. 혹시하는 마음으로 기존에 깔았던 python 3.9버젼을 지워보기도 하고 anaconda prompt에서도 동일한 명령문을 실행해보앗지만 error가 발생하여 해결방법 문의드립니다. 태어나서 이렇게 긴 error는 처음입니다. 감사합니다. ----- 내용 길어서 생략함------