Example #1
0
#naive program to test model
from cbe import CoinbaseExchange
import json
import numpy as np
import pandas as pd
import time as timer
from sklearn.externals import joblib
model = joblib.load('brr_simple.pkl')

cb = CoinbaseExchange()

json_ticker = cb.getProductTicker()

price = []
time = []
prediction = 0.0
starttime=timer.time()
buy = False
sell = False
hold = False
profit = 0
total_profit = 0
sell_price = 0
num_buy = 1
num_sell = 0

#this will need to be own subprocess or method
while True:
    json_ticker = cb.getProductTicker()
    actual = float(json_ticker['price'])
Example #2
0
 def setUp(self):
     self.cbe = CoinbaseExchange()