Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This library contains Cybotrade's core runtime, integrations with Exchanges API, historical and live market data collector and wrap them into a simple, easy-to-use Python SDK.
This is the Client SDK for building automated trading strategies on Cybotrade. This library provides the core runtime, integration with Exchanges API, historical and live market data collector and wrap them into a simple, easy-to-use and easy-to-learn Python SDK as a foundation users' strategies.
The documentation for the Cybotrade SDK can be found here.
pip install cybotrade
The following example shows how to create a simple strategy that buys 0.01 BTC when the price goes up and sells 0.01 BTC when the price goes down.
For a more advanced usage, please refer to the documentation.
from cybotrade.strategy import Strategy as BaseStrategy
from cybotrade.models import (
OrderParams,
OrderSide,
RuntimeMode,
RuntimeConfig,
Exchange,
)
from datetime import datetime, timedelta, timezone
import asyncio
class Strategy(BaseStrategy):
async def on_candle_closed(self, strategy, topic, symbol, data_map):
# Get the currently closed candles
candles = data_map[topic]
if candles[-1].close > candles[-2].close:
# Buy 0.01 BTC
await strategy.open(
side=OrderSide.Buy,
take_profit=None,
stop_loss=None,
quantity=0.01,
limit=None
)
else:
# Sell 0.01 BTC
await strategy.open(
side=OrderSide.Sell,
take_profit=None,
stop_loss=None,
quantity=0.01,
limit=None
)
async def main():
runtime = await Runtime.connect(
RuntimeConfig(
mode=RuntimeMode.Backtest,
exchange=Exchange.BybitLinear,
datasource_topics=[],
candle_topics=["candles-1h-BTC/USDT-bybit"],
start_time=datetime.now(timezone.utc) - timedelta(minutes=10000),
end_time=datetime.now(timezone.utc),
api_key="YOUR_CYBOTRADE_API_KEY",
api_secret="YOUR_CYBOTRAD_API_SECRET",
data_count=100
),
Strategy(),
)
await runtime.start()
asyncio.run(main())
FAQs
This library contains Cybotrade's core runtime, integrations with Exchanges API, historical and live market data collector and wrap them into a simple, easy-to-use Python SDK.
We found that cybotrade 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.