Overview
It is a client-side package of Jirnal's trading system as a Binance REST Api-based SDK midleware. Valid Binance account and Jirnal account are required to work with this package.
Requirements
This package only supports the latest patch release of Python.
Dependencies
Installation
pip install binancetrader
Example
Let's take a look at a quick example of using binancetrader package to send some simple orders over Jirnal system.
from binancetrader import BinanceTrader as bint
client = bint(
strat = "gamma",
address = "You're given ip address",
port = 8000,
api_key = "You're given api tocken"
)
client.marketOrder("BTCUSDT","BUY","0.001")
client.limitOrder("BTCUSDT","BUY","0.001","50000")
client.stopOrder("BTCUSDT","sell","0.001","40000")
client.takeProfitOrder("BTCUSDT","sell","0.001","60000")
client.trailStopOrder("BTCUSDT","sell","0.001","55000","0.1")
client.currentPositions("BTCUSDT")
client.closeCurrentPositions("BTCUSDT")
client.currentOrders("BTCUSDT")
client.cancelOrder("BTCUSDT","19225478")
client.cancelAllOpenOrder("BTCUSDT")
client.lastTrades("BTCUSDT","1640475569000","1640512577000","10")
client.futuresBalance("USDT")