Help Center

Get answers to common questions and learn how to use margin like a pro!

Can’t find what you’re looking for?
Click the intercom button in the bottom right of the page.

Frequently asked questions

My account

Getting up and running is quick and easy and we are here to guide you through the process.

Of course, you need an account at one of the exchanges we support. Then you can simply choose a plan, create an API key pair on your exchange account and submit just half of one part of the pair to us (see "Getting Started" tutorial).

Once you have submitted your API key info, you need to download margin, choose the exchange you want to trade on and then input your full API key and secret to login.

Don’t worry, we connect directly to the exchange and the only communication with our web server is to make sure you are a paid up customer and to download the historical data.

The most likely reason for this is that you haven’t registered your half secret with us (see here: “How do I set up my API keys?”) or that you registered your key instead of your secret. You should also make sure that you submitted the first half of your secret and not some other part.

Please also check if you are entering the full API key and the full secret at the login window as this is needed to authenticate at the exchange.

If you continue to get a “key not registered” error message, please contact [email protected] or click the intercom chat bubble and ask for help!

It is important you setup a new API key/secret pair for leonArdo. On most exchanges you can do this by going to the settings/security sections of their websites. Then you need to create a new API key/secret pair.
Let’s take a look at an example on Bittrex. After clicking the ‘Add New Key’ button and entering my 2FA code a new key is generated.

You should immediately save your secret as on many exchanges it is only shown once. We only need at least the first half of your secret so in this example the following would be enough


This needs to be added to your margin account here: Manage exchanges
Note that all options, except for withdrawal rights, should be checked.

To login at the exchange later please save the full key and the full secret.

On each exchange the procedure is basically the same, but don’t hesitate to get in touch with us if you need any assistance!

No problem! Just log into your account and go to the Manage Exchanges section. There you can delete the current API half secret you have registered with us and add a new one. Note that only 1 API half secret per exchange is allowed unless you are a Professional customer, in which case you can add up to 3 APIs per exchange.

No! We don’t send orders through our servers; margin connects directly to your exchange account. That means we have no knowledge of your trading patterns.

There are only a few of instances when we need communication between your copy of margin and our servers.

  1. Checking if you are on the correct payment plan
  2. Retrieving history data which is not available from the exchanges
  3. Checking whether there is an updated version of margin available

You can upgrade your plan by logging into your account and clicking the upgrade button.

Downgrading a plan is not possible. If you want to downgrade, you will have to cancel your current plan and add the plan you want.

We have no access to your funds! We only store one quarter (in hashed form) of a two part API key pair on our servers to ensure you are a paid up customer. Even in the very unlikely event that a hacker compromised our servers there is nothing they could do with that. As an extra precaution we also advise that you do not enable withdrawal permissions on your API key pair.

Software setup

We recommend at least 4GB RAM and a HD display for Windows, macOS and Linux systems. It is possible to run margin on lower spec machines (2GB RAM with a 720p display) but this will restrict the number of pairs/bots that can be reasonably run.

Miraculously, it is also possible to run margin on a Raspberry pi!

If you don’t see any currency pairs in leonArdo’s login window, can you type the following URL for the exchange you want to connect to into your browser:


What is the outcome you get in your browser?

Did you have to get past a reCAPTCHA? If you did, then right now leonArdo does not handle this. The exchange has put up an extra barrier to connecting to its API in your country/region. One way to get around it is to connect through a VPN/VPS.

Please get in touch with us if you continue to have issues by mailing: [email protected]

Yes you can and we recommend it! You can use Microsoft Remote Desktop to connect to your VPS or VPN instance (there are even iOS and Android apps) and check in on how margin is trading for you from your PC, phone or tablet. And what’s more, you won’t need to leave your laptop running 24/7.

A few things to remember.

1) Do not to run two instances of margin in parallel connecting to an exchange with the same API key pair.
2) Make sure to set your VPS instance to the same time as the PC/laptop on which you were running margin. Otherwise, your API keys might not work.
3) Make sure your API keys do not have withdrawals activated.
4) Use margin’s encryption tool in the login screen to encrypt your keys to give you further peace of mind.

If you have any questions, don’t hesitate to get in touch with us.

Note that data usage (if connecting to your VPS instance using a phone or tablet) is pretty high so take care depending on the data plan you have for the VPS.

Yes, you can encrypt your stored API keys using leonArdo. Just click on the small lock icon in the login screen and follow the instructions. Make sure to keep that password safe and not stored in plain text on your computer.


  1. Download margin-linux-arm-<version>.tar.xz from (where will be something like 3.1.4)
  2. Extract the file with “Extract here” in the file manager.
  3. Optionally, move and/or rename the newly created folder to where you want margin to reside. A common choice is ~/opt/margin
  4. Go into the margin folder and run the file called “margin”. Before the first run, the icon will be a default icon and not the margin logo shown in the screenshot.
  5. Optionally, if you want to copy the .desktop file used to run margin to a different place, e. g. your desktop, or ~/.local/share/applications/ to be seen by your desktop environment, you’ll have to change the last line to read something like


    Adapt for the location you actually put margin in.

Command Line

  1. Download margin-linux-arm-<version>.tar.xz from (where will be something like 3.1.4)
  2. In the file is in, do: tar xvJf margin-linux-arm-<version>.tar.xz
  3. cd margin-arm
  4. ./


  1. Download from (where will be something like 3.1.4)

  2. Extract the file with “Extract here” in the file manager.

  3. Optionally, move and/or rename the newly created folder to where you want margin to reside. A common choice is ~/opt/margin

  4. Go into the margin folder and run the file called “margin”. Before the first run, the icon will be a default icon and not the margin logo shown in the screenshot.

  5. Optionally, if you want to copy the .desktop file used to run margin to a different place, e. g. your desktop, or ~/.local/share/applications/ to be seen by your desktop environment, you'll have to change the last line to read something like


    Adapt for the location you actually put margin in.

Command Line

  1. Download margin-linux-x86-<version>.zip (where will be something like 3.1.4)
  2. In the directory the file is in, do: unzip margin-linux-x86-<version>.zip
  3. cd margin-linux
  4. ./

Software handling

This occurs because you do not have enough funds to place even the minimum allowed order. For example for a BTC/USD market, if you see an invalid range in margin, it means in the ‘buy’ case that you do not have enough USD and in the ‘sell’ case enough BTC to place the minimum order possible.

Note that some bots require you to have a little more than the minimum in order to overcome trading fees and continue trading. That means that it is possible to have enough funds to place a manual trade but not start a bot in some cases.

The static ping pong bot places limit orders.

This is the simplest bot in margin. Click on the strategy button (chess knight with +) to create a new bot. Initially it will default to an effective gain of 0.1% around the spread. Click and drag the buy and sell price lines to set the prices you want. The bot waits until its order is fully filled before switching actions and then places a limit order on the opposite side. In the example below, the bot has just placed a limit buy order and is waiting for the order to become active. If this order gets filled, a limit sell order for the same amount will be placed on the opposite side. Here, we’ve specified an effective gain of just over 3%.

The bot will continue to trade until you explicitly stop it.

The mArgin maker bot is a dynamic bot that places limit orders.

There are a number of parameters you can set, some of which can be set directly in the chart. The ‘time window’ is set by dragging the long vertical blue line (see image below - it’s the thin blue line in the middle of the chart running from top to bottom) to determine what time period is desired. The vertical height of the time window is given by the lowest and highest priced trades that occurred during that time.

Inside this window the relative buy and sell margins can be set (dashed red horizontal lines). As the lowest and highest trade price will change over time, the vertical height of the window changes accordingly, which in turn means the buy and sell margin prices will change. As the market contracts, the prices become closer to each other. This also means that the initial Eff. gain* shown in the center of the time window will also change.

The Min. effective gain [%] is a very important parameter. For the mArgin maker it applies to both buy/sell and sell/buy cycles. It is always active, the default value being 0.0%. If you want to ensure that the bot makes a gain after trading fees have been subtracted, a positive value must be given. Note that this means a bot order can get stuck at a particular price in order not to violate the Min. effective gain.

The other parameters are quite self explanatory - especially if you hover over their tooltips.

Stop loss can be enabled and then adapted in the chart. If a stop-loss event occurs, the bot will accept the user-specified loss by triggering a spot sell order and then the bot stops.

Our Bollinger Band bot is inspired by the John Bollinger ( technical indicator of the same name. We have made setting it up super easy and intuitive.

The ‘Start with’ combo box (see figure) allows you to start the bot in three modes: buy, sell or any. Starting in any mode will activate both the buy and sell thresholds and is great if you are not sure which way the market will initially move.

Rather than placing limit orders like the static ping pong and mArgin maker bots, the Bollinger Band bot places spot orders. Once the bot triggers a spot order it will place it, which means you need to be prepared that the actual trade might not be at the price the order was triggered at.

How does an order get triggered? There are two bands, a sell band (solid red line) and a buy band (solid blue line), that can be configured. These are set relative to the Bollinger Bands. For an order to trigger, the opposite orderbook has to intersect the buy/sell band. For example, in the buy case, the top of sell orderbook has to touch the ‘Current buy threshold’. Note that in volatile markets this means that it can commonly occur that the orderbook rapidly retreats after triggering a spot order. This results in the spot order having to overcome the spread to get filled. On certain pairs this can be some percentage points off the trigger price.

In order to protect against unwanted losses it is possible to set a Min effective gain parameter. This can be set on both sides. In the figure the Minimum effective gain displaces the current buy threshold by more than 4% to ensure that the desired Minimum effective gain is achieved.

In the figure above, a minimum effective gain ensures that the bot does not buy back in too soon in a market that had trended upwards. Also note that the two sell trades (small yellow triangles) went through above the Bollinger Band sell threshold because of the Min effective gain setting.

Stop loss is also available on both sides. On the buy side a stop loss can be setup relative to the last buy the bot performed. This is visualised in the chart and the percentage can be manipulated by dragging the annotation up or down. Note that if stop loss is triggered, the bot will stop trading.

One VNC server that’s available on ARM and that margin has tested successfully with Raspbian on the server side and both Windows and Linux on the client side is called x11vnc.

On Raspbian it’s already in the package manager, so installation should be a matter of doing a sudo apt install x11vnc

On x86 you can use TurboVNC.

This could be a timestamp issue as Binance expects clients connecting to their API to be in sync (timewise) with their server. This might mean your system clock needs to be up-to-date. If you are on Windows, please follow these steps to get up and running :

  1. Right click on the time in the task bar and select “Adjust date/time”. In the window that appears, make sure “Set time automatically” is on.

  2. In the same window, click on “Additional date, time & regional settings”, then under “Date and Time” go to "Set the time and date”. In the “Internet Time” tab, click “Change settings...”, then make sure “Synchronize with an Internet time server” is selected and click “Update now”, then “OK”.

  3. Next, run services.msc via the Start menu, then right click on “Windows Time” in the list of services and select “Properties”. Make sure “Startup type” is set to “Automatic” and that the service is started right now. Click the “Start” button if the service status is “Stopped” right now.

  4. If all else fails, start a PowerShell as administrator and run the following lines:

    net stop w32time
    w32tm /unregister
    w32tm /register
    net start w32time
    w32tm /resync

If you continue to get the same error message or use a macOS, please contact [email protected] or click the Intercom chat bubble and ask for help!

On the exchange’s website, your BTC might be in your “Main Account”, and not your “Trading Account”. To trade with margin, you need to move it to your Trading Account.