Your machine can connect to an exchange so that bitcoin is automatically purchased at market rates with each bill that's inserted. In this way the price volatility of cryptocurrency is mitigated.
Bitstamp trading is supported for Bitcoin, Bitcoin Cash, Ethereum, and Litecoin on all fiat currencies.
Flow with trading
When linked to an exchange, the flow is: user inserts bills, coins are sent from the machine's hot wallet to the user, the server then triggers a purchase on the exchange account. The module will purchase the same amount of coins that is dispensed to the user.
For security purposes, the admin does not initiate a withdrawal of coins from your trading account to your hot wallet. You should periodically top up your machine's wallet by sending it the coins which are purchased on Kraken.
For more info, please see: Wallets, Exchange Linkage, and Volatility
Price Source & Markets
If your Lamassu admin is set to USD:
- The module will use your USD account funds for trading. Hold USD on Bitstamp.
- Use Bitstamp for 'Price Source' in the Wallet Settings panel.
If your Lamassu admin is set to EUR:
- The module will use your EUR account funds for trading. Hold EUR on Bitstamp.
- Use Bitstamp for 'Price Source'in the Wallet Settings panel.
If your Lamassu admin is set to any other currency:
- The module will default to EUR account funds for trading. Hold EUR on Bitstamp, or check the bottom of this page for instructions on defaulting to USD instead.
- Use any ticker other than Bitstamp for 'Price Source' in the Wallet Settings panel.
Creating an API key
To trade on Bitstamp, create a new API key from within your account. Go to Security, then API Access.
Click on 'New API key', then check the 'Account balance', 'Buy limit/market order', and 'Sell limit/market order' permission boxes. For the security of your account balance, do not enable any others.
Click 'Generate key'. In the screen that follows, copy the Key and Secret fields.
On Bitstamp, click 'Activate' next to your secret key. Check your email for an activation link and follow it to enable.
Configuring the admin
In the 'Third Party Services / Bitstamp' panel of the admin, enter your Bitstamp Client ID, key, and secret into the appropriate fields and click Submit:
Then navigate to the 'Global Settings / Wallet Settings' panel for Bitcoin. Select Bitstamp from the Exchange drop-down list. If using USD or EUR, select the Bitstamp ticker as well. Then click Submit.
Test trades by placing purchases at the machine using an amount greater than $5 USD (the minimum trade Bitstamp allows.)
Setting Bitstamp to trade on USD balance
The Bitstamp module will default to trading on Bitstamp's EUR market if your machine uses a currency other than EUR or USD. (If you use USD, it will default to the USD market.)
If your machine is configured for a currency other than EUR or USD, and you wish to trade on USD instead, you may change the default behaviour by running the command below in your server:
curl -Ss https://raw.githubusercontent.com/LamassuSupport/lamascripts/master/switches/bitstamp/bitstamp-usd.sh | bash
Then, ensure you have a balance in the USD account and place a test transaction that is above Bitstamp's minimum purchase amounts.