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
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 license, create an API key pair on your exchange account and submit the first half of the secret from 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 margin. 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.
- Checking if you are on the correct payment plan
- Retrieving history data which is not available from the exchanges
- Checking whether there is an updated version of margin available
You can upgrade your license by logging into your account and clicking the upgrade button. Downgrading a license is not possible.
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.
Yes! If you would like to support us, please spread the word! We have a new promotion where we will pay $90 for any new Standard customer you bring us or $1050 for bringing us a single professional customer!
To become an affiliate partner with us you need to create an account at Impact. This will allow you to be paid out in your local currency every month for any customer you bring us. You will also be able to track your progress directly in Impact. And we have added sophisticated tracking throughout our website so that if people click on your link you still get credit even if they explore the website before purchasing.
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.
If you don’t see any currency pairs in margin'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 margin 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 margin. 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.
.zip from https://margin.de/download (where will be something like 3.1.4)
Extract the file with “Extract here” in the file manager.
Optionally, move and/or rename the newly created folder to where you want margin to reside. A common choice is
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.
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.
will be something like 3.1.4)
- In the directory the file is in, do:
margin supports Windows, macOS and Linux in the following flavours:
Windows 10 x64
macOS (every version from OS X El Capitan onwards)
Ubuntu 16.04 and Ubuntu 18.10
Please note that while margin might run on other variants of these operating systems, officially we can only offer customer support on those listed above.
Kraken recommends that you set it for a 10-15 second window. You can read more about this on Kraken's website:
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 (https://www.investopedia.com/terms/b/bollingerbands.asp) 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.
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 :
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.
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”.
services.mscvia 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.
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.
The EMA crossover bot can be started in one of three modes: buy, sell or any. In the 'buy' mode it will wait until a buy situation arises before triggering its first spot order. In 'any' mode it is ready to either buy or sell, whichever situation occurs first.
What triggers a buy?
A buy event is triggered when the short term EMA line crosses the long term EMA line from below.
What triggers a sell?
A sell event is triggered when the short term EMA line crosses the long term EMA line from above.
Please note that in default mode the EMA bot waits for a candle to fully form before calculating the current value of the two EMA lines. The actual value taken for each candle can be configured in the GUI, but the default is to take the closing value. This means that even though a crossover event may have occurred in a particular candle the bot will react one candle later. Reacting within a currently forming candle had the undesired effect of potentially multiple crossover events occurring. It is possible for the bot to react to a crossover event immediately, but we then advise that offsets are used (see Crossover fine tuning below).
It is also important to note that once the bot triggers a buy or sell event it places a spot order. This means that the resulting trade can be displaced from the crossover event due to having to overcome the spread and in cases where there is a shallow order book this can result in many partial order fills.
Crossover fine tuning
It is possible to add a buy or sell offset which provides more confidence that a crossover situation has occurred. These are visualised in the chart as separate lines ensuring you have a visual confirmation of their affect.
If you have a lot of exchanges and pairs loaded it can happen that you run out of file handles which can cause margin to crash with the following output:
QThreadPipe: Unable to create pipe: Too many open files
Abort trap: 6
You could increase the number of file handles the OS allows (by default just 256) by adding the following entry to your .bash_profile :
ulimit -n 10000
Here's a how to for linux users: https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/