Results 1 to 16 of 16

Thread: [RESOLVED] How to convert this Python function to Vb.Net?

Threaded View

  1. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2013
    Posts
    108

    Re: How to convert this Python function to Vb.Net?

    Hi Niya,

    First of all I have to say Thanks a Lot because you made a super great job! I don't know if you already knew some python, but to me it was quite impossible to understand how python works in order to translate it on vb.net.

    So the output is almost correct, using those inputs:

    Code:
    Dim params_url As String = "https://api.hotbit.io/api/v1/order.pending"
            Dim params_str = "market=KIBA/USDT&offset=0&limit=100".Replace(" ", "")
            Dim params_dict = params_string_to_dict(params_str)
    
            params_dict = add_sign_to_params(params_dict, "KEY", "SECRETKEY")
            params_str = params_dict_to_string(params_dict)
    
            TextBox1.Text = ($"{params_url}?{params_str}")
    The output that it gives me is :

    While I'm expecting this output:

    So I don't need this
    secret_key=SECRETKEY
    in the output

    and also I don't understand the reason why
    market=KIBA/USDT&offset=0&limit=100
    is reversed "&limit=100&market=KIBA/USDT&offset=0"

    By the way, the md5 is right calculated.

    Still many thanks
    I appreciated the time you spent to help me

    Update:
    I've managed to remove the "secret_key=" from the output using
    Code:
    params_dict.Remove("secret_key")
    I'm still don't really understand now how not to let it split the params_str
    Last edited by matty95srk; Feb 11th, 2022 at 02:22 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width