I tried using TradeWave (BitCoin system trading in Python)

What is this

https://tradewave.net

A web service that automates BitCoin system trading.

スクリーンショット 2015-06-13 16.06.32.png

To put it bluntly, there are many iPhone apps for trading under high & low conditions.

What's unusual about this is that it comes with a Python IDE with a built-in API for trading. Graphs can be calculated, displayed, and bought and sold very easily. Of course, the same thing can be done in a personal environment by using the API, but the threshold is low because there is no such trouble.

** In other words, you can experience system trading with interest! ** **

スクリーンショット 2015-06-13 16.16.48.png

let's try it

Let's start up

--Create an account for the time being

スクリーンショット 2015-06-13 16.06.32.png

スクリーンショット 2015-06-13 16.12.42.png

--Determine a strategy name (in short, .py file name)

スクリーンショット 2015-06-13 16.16.25.png

--Arrived!

スクリーンショット 2015-06-13 16.16.48.png

Let's put out a graph and calculate

-(Reference) Let's open [https://tradewave.net/help/api/]

スクリーンショット 2015-06-13 16.29.26.png

――It's written for a long time, but it's troublesome, so for the time being, copy [Code structure]> [An example strategy] and put it in the IDE.

python



# A basic Moving Average Crossover strategy

def initialize():
    storage.invested = False

def tick():
    short_term = data.btc_usd.ma(30)
    long_term = data.btc_usd.ma(100)

    if (short_term > long_term) and not storage.invested:
        log('Buying BTC')
        buy(pairs.btc_usd) # market order
        storage.invested = True

    elif (short_term < long_term) and storage.invested:
        log('Selling all BTC')
        sell(pairs.btc_usd)
        storage.invested = False

def stop():
    if storage.invested:
        log('Clearing our position by selling all BTC holdings')
        sell(pairs.btc_usd)

--If you press [Save]> [BackTest] on the right side, it will display the case where the sample was traded in the past BitCoin transaction history.

スクリーンショット 2015-06-13 16.34.04.png

In the sample, the principal was 10,000 dollars, and it seems that he lost 217 dollars in one day.

It's a sample, it can't be helped ...

A little more about the API

In the sample, we only look at the normal BTC / USD exchange rate, but if you want to have only an API for system trading, you can do various things.

--MA (Simple Moving Average) and EMA (Exponential Smoothing Moving Average)

def tick():
    x = data.btc_usd.ma(30)
    y = data.btc_usd.ema(30)
    plot('MA', x)
    plot('EMA', y)

スクリーンショット 2015-06-13 16.52.05.png

def tick():
    x = data.btc_usd.rsi(30)
    plot('RSI', x, secondary=True)

スクリーンショット 2015-06-13 16.59.11.png

――In addition, you can use candle data and various calculations in just a few lines without thinking.

The difficulty is ...

--Calculation is a little slow ――It's not so easy to use as an IED ――If you want to write something properly, write it in Sublime text and copy it. ――A usage fee is required to actually trade with the system built here.

after all

It's free to use, so it's easy to get to, and even I, a Python beginner, can understand it without worrying about it, so I recommend it to people who have ideas but are blocked by technical barriers around the API!

If you think it's interesting to try this, you can put in the API yourself and set up a server.

Recommended Posts

I tried using TradeWave (BitCoin system trading in Python)
I tried using Bayesian Optimization in Python
[Python] I tried using OpenPose
I tried using Thonny (Python / IDE)
I tried Line notification in Python
[Python] I tried using YOLO v3
I tried to make a stopwatch using tkinter in python
I tried to implement PLSA in Python
I tried to implement permutation in Python
Movement that changes direction in the coordinate system I tried Python 3
I tried to implement PLSA in Python 2
I tried using UnityCloudBuild API from Python
I tried to implement ADALINE in Python
I tried to implement PPO in Python
vprof --I tried using the profiler for Python
I tried web scraping using python and selenium
I tried object detection using Python and OpenCV
I tried playing a typing game in Python
I tried simulating the "birthday paradox" in Python
I tried the least squares method in Python
I tried using mecab with python2.7, ruby2.3, php7
[Memo] I tried a pivot table in Python
I tried debugging from Python via System Console
I tried to implement TOPIC MODEL in Python
I tried reading a CSV file using Python
I tried using the Datetime module by Python
I tried non-blocking I / O Eventlet behavior in Python
I tried adding a Python3 module in C
I tried to implement selection sort in python
I tried using argparse
I tried using anytree
I tried using aiomysql
I tried using Summpy
I tried Python> autopep8
I tried using coturn
I tried using Pipenv
I tried using matplotlib
I tried using "Anvil".
I tried using Hubot
I tried using ESPCN
I tried using openpyxl
I tried using Ipython
I tried using PyCaret
I tried using cron
I tried using ngrok
I tried using face_recognition
I tried using Jupyter
I tried using PyCaret
I tried using Heapq
Python --bitflyer Bitcoin trading
I tried using doctest
I tried Python> decorator
I tried using folium
I tried using jinja2
I tried using folium
I tried using time-window
I tried to graph the packages installed in Python
Basics of I / O screen using tkinter in python3
I tried using google test and CMake in C
[Python] I immediately tried using Pylance's VS Code extension.
I tried to implement a pseudo pachislot in Python