Esempio n. 1
0
import bitcoinrpc
from bitcoinrpc.exceptions import InsufficientFunds
from bitcoinrpc.config import read_default_config
from bitcoinrpc.connection import BitcoinConnection
import peewee
from peewee import *
import sys, time
#from armoryengine import *
from modules.fixedpoint import FixedPoint
from coindb.coindb import db,COINModel, Order

db.init('BTCLTC_TK',host='dontoc.dlinkddns.com', user='******',passwd='hammer')   

#Order.create_table()
#exit()
db.connect()
#Order.create(sender_address='mkfK3iZX5Yb6XfbbTXQv61CkHLbVdbqFc4',send_to_address='mkfK3iZX5Yb6XfbbTXQv61CkHLbVdbqFc4',receiver_address='mkfK3iZX5Yb6XfbbTXQv61CkHLbVdbqFc4')
#Order.get(Order.address =='mkfK3iZX5Yb6XfbbTXQv61CkHLbVdbqFc4')
#Order.address.print()
#print Order.price



#newadr = 'mgGEgPX6yU8Bco1XBAgJ5bNQ8zpmMEgnWp'
#try:
#    Order.create(send_to_address=newadr,source='BTC')
#except Order.DoesNotExist:
#    print 'not found'
#except Order.DuplicateEntry:
#    print 'dup'
#else: