2021/01 76

[#3] 업비트 시세 종목 조회 , 마켓 코드 조회하기(requests,beautifulSoup, http응답메소드 etc)

docs.upbit.com/reference#open-api-%ED%82%A4-%EB%A6%AC%EC%8A%A4%ED%8A%B8-%EC%A1%B0%ED%9A%8C 업비트 개발자 센터 업비트 Open API 사용을 위한 개발 문서를 제공 합니다.업비트 Open API 사용하여 다양한 앱과 프로그램을 제작해보세요. docs.upbit.com requests 모듈 >> HTTP 요청을 보내는 모듈이다. pypi.org/project/requests/ requests Python HTTP for Humans. pypi.org import requests response=requests.get('url입력') response.status_code response.text 주소를 GET 요청(Request)를 통해..

[#2] 웹소켓 , 비동기에 대한 기초 지식 쌓기 & upbit websocket api

websockets.readthedocs.io/en/stable/intro.html Getting started — websockets 8.1 documentation You will usually want to process several messages during the lifetime of a connection. Therefore you must write a loop. Here are the basic patterns for building a WebSocket server. Registration As shown in the synchronization example above, if you need to websockets.readthedocs.io docs.upbit.com/docs/up..

[2021.01.08] 코드업 문제 풀기 (코딩테스트)

1282 : 제곱수 만들기 https://codeup.kr/problem.php?id=1282 import math def function(num): k=0 for i in range(1,num): if math.sqrt(num-i)%1==0: k=i num=int(math.sqrt(num-1)) break print(k,num) #math.sqrt() : 제곱근 #math.pow() : 제곱 num=int(input("")) function(num) 2623 : 최대공약수 구하기 https://codeup.kr/problem.php?id=2623 def function(a,b): suma=1 if a>b: for i in range(b,1,-1): if a%i==0 and b%i==0: a=a//i b..

[파이썬 15장] 프로세스와 동시성, 비동기

참고 문헌 >> 처음 시작하는 파이썬 15장 포인트 : 한 컴퓨터에서 순차 및 동시 접근 ## 프로그램과 프로세스 하나의 프로그램을 실행할 때 운영체제는 하나의 프로세스를 생성하는 데, 한 프로세스는 다른 프로세스로부터 독립된 존재다. os >> 모듈에서 시스템 정보를 접근하는 몇 가지 함수를 제공한다. 더보기 os.getuid() >> 사용자 id os.getgid() >> 그룹id (프로세스 id) os.getcwd() >> 현재 작업 디렉터리 비동기 프로그래밍은 대기 시간을 낭비하지 않고 그 시간에 CPU가 다른 처리를 할 수 있도록 하는데 이를 흔히 non-blocking하다고 한다. ## 프로세스 생성하기 (1) : subprocess >> subprocess 모듈로 존재하는 다른 프로그램을 시..

[#1] 가상화폐 프로그램 만들기 (ccxt 다운로드 , 가상 환경 설정)

API를 사용해서 가상화폐 현재 시세와 매수 매도 주문까지 하려했으나, 데이터를 불러오는 속도가 현저하게 낮아서 ccxt 라이브러리를 사용해보고자 한다. (CryptoCurrency eXchange Trading Library) github.com/ccxt/ccxt/ ccxt/ccxt A JavaScript / Python / PHP cryptocurrency trading API with support for more than 120 bitcoin/altcoin exchanges - ccxt/ccxt github.com 사용방법도 readme에 자세히 나와있다. * 사용법 * 1. 설치를 먼저 해야 하는데, git clone으로 ccxt 레파지토리를 클론해준다. (현재 폴더에) git clone htt..