Bitcoin Forum
May 08, 2024, 11:00:16 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Bittrex API for phpmpos (script pool) on: July 14, 2014, 01:19:31 PM
In this post shows how to connect to the API Bitrex in phpmpos.

Open the file: include/classes/tools.class.php
Find:
Code:
else if (preg_match('/mintpal.com/', $url)) {
      return 'mintpal';
    }
   
   Behind paste this code:
   
 
Code:
  else if (preg_match('/bittrex.com/', $url)) {
      return 'bittrex';
    }

 Find:
 
Code:
 case 'mintpal':
        return @$aData['0']['last_price'];
        break;

  Behind paste this code:
 
Code:
  case 'bittrex':
      $aData_2 = number_format($aData['result'][0]['Price'],8);
        return @$aData_2;
        break;
 
Save changes.        
          
Open the file: include/config/global.inc.php
 
Find:
Code:
$config['price']['enabled']

Set to true

The rest of the settings should look like this:

Code:
$config['price']['url'] = 'https://bittrex.com';
$config['price']['target'] = '/api/v1/public/getmarkethistory?market=BTC-SFR&count=1';
$config['price']['currency'] = 'BTC';


market=BTC-SFR ==> this parameter change on the coin you want to retrieve the data from the API Bittrex

Save the changes. From now on you have enabled the download of data from bittrex.
I hope that someone is useful.

Donation BTC: 1DsqeqapMoGAhPmNaiL5HqxnBYiFDR7coo
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!