inasie / upbitpy Goto Github PK
View Code? Open in Web Editor NEWUpbit API for Python3
License: MIT License
Upbit API for Python3
License: MIT License
Thanks
안녕하세요. 우선 제공해주신 소스에 대해 감사드립니다.
간단한 툴을 만들고 있었는데, 아래와 같이 호출했을때 정상적으로 진행되지 않습니다.
어떤 문제가 있을까요..?
from upbitpy import Upbitpy
orderBook_result = Upbitpy().get_orderbook('KRW-LTC')
print(orderBook_result)
ERROR:root:invalid parameter: markets should be list
Traceback (most recent call last):
File "C:/Python/Source/Coin/Test/Test1.py", line 3, in
orderBook_result = Upbitpy().get_orderbook('KRW-LTC')
File "C:\Python\Source\Coin\Test\upbitpy.py", line 445, in get_orderbook
raise Exception('invalid parameter: markets should be list')
Exception: invalid parameter: markets should be list
주문할때 올바른 호가인지 검사하게 되어있는데 USDT/BTC마켓 호가가 소수점 단위여서 적용하면 안될것 같습니다.
m1 맥에서 아래와 같은 코드 실행 시 오류가 납니다.
import upbitpy
upbit = upbitpy.Upbitpy()
print(upbit.get_minutes_candles(15,'KRW-BTC'))
에러는 다음과 같습니다.
ERROR:root:Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
Traceback (most recent call last):
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/upbitpy/upbitpy.py", line 529, in _load_markets
market_all = self.get_market_all()
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/upbitpy/upbitpy.py", line 295, in get_market_all
return self._get(URL)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/upbitpy/upbitpy.py", line 494, in _get
resp = requests.get(url, headers=headers, data=data, params=params)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/urllib3/connectionpool.py", line 597, in urlopen
httplib_response = self._make_request(conn, method, url,
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
conn.connect()
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/urllib3/connection.py", line 330, in connect
self.ssl_context = create_urllib3_context(
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 281, in create_urllib3_context
context.verify_mode = cert_reqs
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/urllib3/contrib/pyopenssl.py", line 413, in verify_mode
self._ctx.set_verify(
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/OpenSSL/SSL.py", line 1028, in set_verify
self._verify_helper = _VerifyHelper(callback)
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/OpenSSL/SSL.py", line 331, in __init__
self.callback = _ffi.callback(
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/hyngsk/PycharmProjects/deepredicML/test.py", line 4, in <module>
upbit = upbitpy.Upbitpy()
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/upbitpy/upbitpy.py", line 27, in __init__
self.markets = self._load_markets()
File "/Users/hyngsk/miniforge3/envs/tf/lib/python3.9/site-packages/upbitpy/upbitpy.py", line 538, in _load_markets
raise Exception(e)
Exception: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
Process finished with exit code 1
i fixed the problem like #11
바인딩 해주신 api는 편하게 이용을 잘하고있습니다 감사합니다.
제가 출금 api 인 withdraws_coin을 사용했는데, 정상적으로 출금신청이 됐음에도 에러가 raise고 있더라구요.
코드를 확인해보니, withdraws_coin api 호출 시 status result code가 201로 나오고 있어, Exception이 raise 되는것같습니다!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.