Check Bitcoin Balance with mybitx api https GET url

0 votes

I am new to integrating bitcoin API to my PHP page, I have created a bitcoin account with luno, I have created API Key.

I have been given this url to get balance using my generated API Key:

$ curl -u keyid:keysecret

Can anybody help with a proper example on how I can use my API with this given url to display my wallet balance on a PHP page?

Sep 12, 2018 in Blockchain by digger
• 26,660 points

retagged Nov 22, 2018 by Priyaj 407 views

2 answers to this question.

0 votes

The easiest way I know to convert curl commands to executable PHP code is to use this site:

Just add your curl command:

curl -u keyid:keysecret

to the textbox that says "Paste curl here". Then take the PHP that is output and integrate it into your app.

answered Sep 12, 2018 by slayer
• 29,270 points
0 votes

You can use the PHP Requests library for an easy way to make HTTP Requests. Your curlcommand can be converted as follows:

    // Use additional headers if necessary
    $headers = array();
    // Create authorization using key and secret.
    $options = array('auth' => array('keyid', 'keysecret'));
    // Create the GET request to the URL
    $response = Requests::get('', $headers, $options);
    // The result is available in $response
answered Sep 17, 2018 by Lalit

Related Questions In Blockchain

0 votes
1 answer

How to get iota balance via api url?

Either run your own node (thus, the localhost reference ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,660 points
0 votes
1 answer

How can I simulate private bitcoin network with random peer discovery?

You can model the whatever network you ...READ MORE

answered May 28, 2018 in Blockchain by Johnathon
• 9,090 points
0 votes
1 answer

jQuery/ajax - two separate API requests with combined results

You can move the second ajax call ...READ MORE

answered Jun 19, 2018 in Blockchain by aryya
• 7,350 points
0 votes
1 answer

How to check Bitcoin Wallet ?

This can be done using Extended Public ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,090 points
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,660 points
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
0 votes
2 answers

How to check if bitcoin address is valid?

For Java, have a look at the ...READ MORE

answered Aug 20, 2018 in Blockchain by Omkar
• 69,000 points
0 votes
1 answer

How to open bitcoin-qt wallet with bitcoinj?

I found this issue solved at the ...READ MORE

answered Aug 24, 2018 in Blockchain by slayer
• 29,270 points