Exemple #1
0
def settlements(ctx, asset):
    from bitshares.asset import Asset
    asset = Asset(asset, full=True)
    calls = asset.get_settle_orders(10)
    t = PrettyTable(["acount", "amount", "date"])
    t.align = 'r'
    for call in calls:
        t.add_row([
            str(call["account"]["name"]),
            str(call["amount"]),
            str(call["date"]),
        ])
    click.echo(str(t))
Exemple #2
0
def settlements(ctx, asset, limit):
    """ Show pending settlement orders of a bitasset
    """
    from bitshares.asset import Asset

    asset = Asset(asset, full=True)
    if not asset.is_bitasset:
        print_message("{} is not a bitasset.".format(asset["symbol"]), "warning")
        sys.exit(1)
    calls = asset.get_settle_orders(limit)
    t = [["acount", "amount", "date"]]
    for call in calls:
        t.append([str(call["account"]["name"]), str(call["amount"]), str(call["date"])])
    print_table(t)
Exemple #3
0
def settlements(ctx, asset):
    """ Show pending settlement orders of a bitasset
    """
    from bitshares.asset import Asset
    asset = Asset(asset, full=True)
    if not asset.is_bitasset:
        click.echo("{} is not a bitasset.".format(asset["symbol"]))
        sys.exit(1)
    calls = asset.get_settle_orders(10)
    t = PrettyTable(["acount", "amount", "date"])
    t.align = 'r'
    for call in calls:
        t.add_row([
            str(call["account"]["name"]),
            str(call["amount"]),
            str(call["date"]),
        ])
    click.echo(str(t))