Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A library providing a clients for interacting with various APIs of cryptocurrency exchanges for trading and accessing market data
[!CAUTION] This project is currently in alpha version and may have critical changes
A Python library providing a clients for interacting with various APIs of cryptocurrency exchanges for trading and accessing market data.
pip install -U pycryptoex
Choose and install one or more supported crypto exchanges:
pycryptoex [names ...]
For example:
pycryptoex bybit kucoin
pip install -U git+https://github.com/ren3104/pycryptoex@main
pycryptoex [names ...] --update --version main
import asyncio
from pycryptoex import KuCoin, Bybit
async def handler(json_data):
print(json_data)
async def main():
# Request to public endpoints
kucoin = KuCoin()
async with kucoin:
await kucoin.request(...)
# Request to private endpoints
bybit = Bybit(
api_key="YOUR_API_KEY",
secret="YOUR_API_SECRET"
)
async with bybit:
await bybit.request(..., signed=True)
# Start the public websocket
kucoin_public_ws = await kucoin.create_websocket_stream()
await kucoin_public_ws.start()
# Subscribe handler to a public channel
topic = "/market/candles:BTC-USDT_1min"
await kucoin_public_ws.subscribe_callback(topic, handler)
# Unsubscribe handler from a public channel
await kucoin_public_ws.unsubscribe_callback(topic, handler)
# Unsubscribe all handlers from a public channel
await kucoin_public_ws.unsubscribe(topic)
# Stop the public websocket
await kucoin_public_ws.close()
# Start the private websocket
kucoin_private_ws = await kucoin.create_websocket_stream(private=True)
await kucoin_private_ws.start()
# Subscribe to private channels
await kucoin_private_ws.subscribe_callback("/account/balance", handler)
# Block until websockets close
while not kucoin_public_ws.closed or not kucoin_private_ws.closed:
await asyncio.sleep(0.1)
Exchange | Api Client | Websocket Stream Manager |
---|---|---|
Bybit | + | - |
KuCoin | + | + |
FAQs
A library providing a clients for interacting with various APIs of cryptocurrency exchanges for trading and accessing market data
We found that pycryptoex demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.