NEM
$0.11895 0.79%
XEM · 52w

Automating Crypto Portfolios with Trading Scripts [Binance, Bittrex, KuCoin]

Install Trading Library

Before we can start automating our trades with Python scripts, we will need to install the library which makes it all possible. Throughout this tutorial, we will use the Shrimpy Universal Crypto Trading APIs. These APIs provide simple endpoints to access data, execute trades, and manage exchange accounts across 16 of the most popular crypto exchanges.

Install the library using the following command.

pip install shrimpy-python Import Trading Library into Your Script

Once installed, we can start constructing our script. The first step is to import the trading library into your script so you can access the convenient trading features it provides.

import shrimpy API Keys

Two different API keys are required for a one time setup. After the initial linking to the Shrimpy trading library, you won’t need to link them again. The two sets of API keys are the Exchange API Keys and the Shrimpy Master Keys.

Exchange API Keys

You can access your exchange API keys by going to the exchange of your choice and generating new API keys.

Tutorials on how to generate API keys on each exchange can be found here. Once you get to the step where it says to input your API keys into Shrimpy, you can stop and come back to this tutorial.

exchange_name = 'bittrex' exchange_public_key = 'fbnnn1xzimjustkeyboardmashing8xn1t8' exchange_secret_key = '09672v4n09xn0morekeyboardmashing947' Note: In order to execute trades on an exchange through APIs, you will need to enable both “Trading” and “Balance” permissions on the API key. You DO NOT need to provide “Withdrawal” permissions. Shrimpy supports the following 16 different exchanges, which you can specify by replacing their name for “exchange_name”: binance, bittrex, bittrexinternational, kucoin, poloniex, bibox, huobi, hitbtc, bitstamp, bitfinex, coinbasepro, kraken, gemini, huobiglobal, bitmart, and okex. Shrimpy Master Keys

To access API keys for trading with the...

Continue on blog.shrimpy.io
Recent news