Binance™ is a Shanghai founded digital currency exchange that supports about 200 crypto
currencies and partially free API access. With Zorro
S, the Binance API plugin can be used with or without a Binance account; in the latter case only price data and history is available.
For opening a Binance account, visit
https://binance.com/ and apply. Demo accounts are not available - you must
really deposit some bitcoin or dollar amount. You can set up the bitcoin symbol and the
number of decimals to display in prices in the account
list. For acessing your
account via API, you must have 2-factor authentication enabled, and need a public and a private key since all API
commands must be hash signed. The steps:
- Register on Binance, open an account, and log in.
- On your account page, select API Setting, then
Create New Key to create your
You're now all set to trade with the Binance plugin. The plugin uses API
version v1 for trading, and v3 for history.
|| Binance API key, or empty for accessing live prices only
|| Binance Secret, or empty for accessing live prices only
Binance asset symbols
The Binance plugin requires symbols in the usual forms XXX/BTC or XXXBTC, where BTC is the
currency and XXX the currency to trade. An asset list AssetsBinance.csv
with the main cryto currencies is included.
Supported broker commands
The Binance plugin supports the brokerCommand function with the following commands:
FOK and GTC orders are supported.
More commands can be implemented on user request.
Known Binance API issues
- Price history. Only 500 minutes are available, so for
long lookback periods the price history must be downloaded from a different
- Asset parameters. All data besides spread and price must
be manually entered in the asset list. The PIP size and LotAmount can
be set arbitrarily, since Binance has no minimum lot size, but a minimum trade
volume; on error messages like DUST TRADE DISALLOWED MIN VALUE 50K
increase the trade volume or the LotAmount in the asset list.
Make sure that PIPCost is adapted to LotAmount.
Example asset list entry:
ETH/BTC,0.01,0.0001,0,0, 0.000001,0.000001, 0,1,1,0,ETHBTC
- Order filling. The API supports market
orders and limit orders. If
a FOK order is not immediately filled, it is cancelled and the limit can
be adapted for the next try. GTC orders stay pending until they are either completely
filled, or cancelled with the DO_CANCEL command. If an order is partially filled, the
TradeLots and TradeUnits
values of the open trade are accordingly adapted. Positions can be read with
the GET_POSITION command.
- Compliance. Binance requires the NFA
flag. Only long positions are supported; for short trades the account must
already contain a sufficient position of the asset. Otherwise an error message like
INSUFFICIENT FUNDS is issued.
- Trading hours. Binance trades 24/7.
- Trade and account parameters. Trade profit is not
available via API and estimated by Zorro from the trading costs entered in the
asset list. Account requests return the BTC balance by default (the account
currency can be set up in the Account column of the account list). The balance is
reduced by opening a long position, and increased by closing the position.
account list entry:
Links, order, brokers, broker plugin,
MTR4 bridge, IB bridge, FXCM plugin
► latest version online