2017 © Pedro Peláez
 

library bittrex-currency-converter

Very simple php class to transfer your crypto currencies on Bittrex to your currency (USD, EUR, CZK, GBP....)

image

tomasnikl/bittrex-currency-converter

Very simple php class to transfer your crypto currencies on Bittrex to your currency (USD, EUR, CZK, GBP....)

  • Saturday, July 29, 2017
  • by tomasnikl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Bittrex currency converter

very simple php class to transfer your crypto currencies on Bittrex to your currency (USD, EUR, CZK, GBP....), (*1)

Image of Example, (*2)

Installation

Download sources from github or use composer to install:

composer require tomasnikl/bittrex-currency-converter

Include to your site/project and initialize BittrexCurrencyConverter class

$bittrex = new BittrexCurrencyConverter('YOUR_BITTREX_API_KEY', 'YOUR_BITTREX_API_SECRET');

Run the magic :)

$bittrex = new BittrexCurrencyConverter('YOUR_BITTREX_API_KEY', 'YOUR_BITTREX_API_SECRET');

$items = $bittrex
    ->fetchCoins()
    ->convert();

Options:

Examples are located in example folder., (*3)

Default

code:, (*4)

$bittrex = new BittrexCurrencyConverter('YOUR_BITTREX_API_KEY', 'YOUR_BITTREX_API_SECRET');

$items = $bittrex
    ->fetchCoins()
    ->convert();

returns:, (*5)

// your crypto currencies in your Bittrex account
Array
(
    [btc] => Array
        (
            [symbol] => BTC // crypto currency code
            [value] => 2.27690484 // volume in crypto currency code (BTC for this example)
            [valueInBtc] => 2.27690484 // volume in BTC
            [valueInUsd] => 5282.76076453 // volume in USD
            [valueInMyCurrency] => 5282.76076453 // volume in your custom currency (default USD)
            [progress] => Array
                (
                    [1h] => -2.03 // change in percents in last 1 hour
                    [24h] => -14.16 // change in percents in last 24 hour
                    [7d] => -13.41 // change in percents in last 7 days
                )
        )

    [sc] => Array
        (
            [symbol] => SC
            [value] => 19500.4837941
            [valueInBtc] => 0.101597520567
            [valueInUsd] => 251.039478124
            [valueInMyCurrency] => 251.039478124
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [dgb] => Array
        (
            [symbol] => DGB
            [value] => 23800.4837941
            [valueInBtc] => 0.265137389466
            [valueInUsd] => 606.91233675
            [valueInMyCurrency] => 606.91233675
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [total] => Array
        (
            [valueInBtc] => 2.64835684679
            [valueInUsd] => 6126.84997092
            [valueInMyCurrency] => 6126.84997092
        )
)

Convert to your custom currency (GBP, CZK, PLN, EUR....)

code:, (*6)

$bittrex = new BittrexCurrencyConverter('YOUR_BITTREX_API_KEY', 'YOUR_BITTREX_API_SECRET');

$items = $bittrex
    ->fetchCoins()
    ->setCurrency('CZK')
    ->convert();

returns:, (*7)

// your crypto currencies in your Bittrex account
Array
(
    [btc] => Array
        (
            [symbol] => BTC // crypto currency code
            [value] => 2.27690484 // volume in crypto currency code (BTC for this example)
            [valueInBtc] => 2.27690484 // volume in BTC
            [valueInUsd] => 5282.76076453 // volume in USD
            [valueInMyCurrency] => 122752.31856 // volume in CZK
            [progress] => Array
                (
                    [1h] => -2.03 // change in percents in last 1 hour
                    [24h] => -14.16 // change in percents in last 24 hour
                    [7d] => -13.41 // change in percents in last 7 days
                )
        )

    [sc] => Array
        (
            [symbol] => SC
            [value] => 19500.4837941
            [valueInBtc] => 0.101597520567
            [valueInUsd] => 251.039478124
            [valueInMyCurrency] => 5875.73868665
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [dgb] => Array
        (
            [symbol] => DGB
            [value] => 23800.4837941
            [valueInBtc] => 0.265137389466
            [valueInUsd] => 606.91233675
            [valueInMyCurrency] => 14336.3552649
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [total] => Array
        (
            [valueInBtc] => 2.64835684679
            [valueInUsd] => 6126.84997092
            [valueInMyCurrency] => 142964.412512
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )
)

Add more volume from your wallets

If you have crypto in your wallets, you can add to code too., (*8)

code:, (*9)

$bittrex = new BittrexCurrencyConverter('YOUR_BITTREX_API_KEY', 'YOUR_BITTREX_API_SECRET');

$items = $bittrex
    ->fetchCoins()
    ->addCoin('XZC', 3000)
    ->addCoin('GNT', 5200)
    ->setCurrency('CZK')
    ->convert();

returns:, (*10)

// your crypto currencies in your Bittrex account
Array
(
    [btc] => Array // this is currency volume from Bittrex
        (
            [symbol] => BTC // crypto currency code
            [value] => 2.27690484 // volume in crypto currency code (BTC for this example)
            [valueInBtc] => 2.27690484 // volume in BTC
            [valueInUsd] => 5282.76076453 // volume in USD
            [valueInMyCurrency] => 122752.31856 // volume in CZK
            [progress] => Array
                (
                    [1h] => -2.03 // change in percents in last 1 hour
                    [24h] => -14.16 // change in percents in last 24 hour
                    [7d] => -13.41 // change in percents in last 7 days
                )
        )

    [sc] => Array // this is currency volume from Bittrex
        (
            [symbol] => SC
            [value] => 19500.4837941
            [valueInBtc] => 0.101597520567
            [valueInUsd] => 251.039478124
            [valueInMyCurrency] => 5875.73868665
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [dgb] => Array // this is currency volume from Bittrex
        (
            [symbol] => DGB
            [value] => 23800.4837941
            [valueInBtc] => 0.265137389466
            [valueInUsd] => 606.91233675
            [valueInMyCurrency] => 14336.3552649
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [xzc] => Array // this is currency added in code
        (
            [symbol] => XZC
            [value] => 3000
            [valueInBtc] => 15.34824
            [valueInUsd] => 37446.9
            [valueInMyCurrency] => 876877.206195
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [gnt] => Array // this is currency added in code
        (
            [symbol] => GNT
            [value] => 5200
            [valueInBtc] => 1.0348
            [valueInUsd] => 2382.3956
            [valueInMyCurrency] => 55787.4856874
            [progress] => Array
                (
                    [1h] => -5.03
                    [24h] => 14.16
                    [7d] => 12.41
                )
        )

    [total] => Array
        (
            [valueInBtc] => 2.64835684679
            [valueInUsd] => 6126.84997092
            [valueInMyCurrency] => 142964.412512
        )
)

Buy me a beer

You can buy me a beer via BTC. My BTC wallet address is:, (*11)

14KBa1cBzQg5gEce2Pnu9Wtrqs4sPAAakp

The Versions

29/07 2017

dev-master

9999999-dev

Very simple php class to transfer your crypto currencies on Bittrex to your currency (USD, EUR, CZK, GBP....)

  Sources   Download

The Requires

  • php >=5.3.0

 

cryptocurrency bitcoins bittrex