예제 #1
0
def enable_customer(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("PUT",
                     "/v3/ledger/customer/{}/enable".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #2
0
def get_existing_trade(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("GET",
                     "/v3/trade/{}".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #3
0
def cancel_all_existing_trades_for_account(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("DELETE",
                     "/v3/trade/account/{}".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #4
0
def get_account_balance(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("GET",
                     "/v3/ledger/account/{}/balance".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #5
0
def unblock_all_blocked_amounts_on_account(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("DELETE",
                     "/v3/ledger/account/block/{}".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #6
0
def obtain_report_for_subscription(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("GET",
                     "/v3/subscription/report/{}".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #7
0
def cancel_existing_subscription(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("DELETE",
                     "/v3/subscription/{}".format(path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")
예제 #8
0
def unfreeze_account(path_params):
    if ledger_validator.id_path_param(path_params):
        conn.request("PUT",
                     "/v3/ledger/account/{}/unfreeze".format(
                         path_params['id']),
                     headers=headers())
        res = conn.getresponse()
        data = res.read()
        return data.decode("utf-8")