Exemple #1
0
def getAllOrder(symbol):
    result = huobi.orders_matchresults(symbol, "buy-limit", "2017-04-09")

    buyPackage = []

    if result['status'] == 'ok':
        datas = result['data']
        for order in datas:
            index = order['created-at']
            price = order['price']
            amount = order['filled-amount']
            orderId = order['order-id']

            transaction = Transaction(price, index, amount, orderId, 0)
            buyPackage.append(transaction)

    return buyPackage