first commit
This commit is contained in:
141
NiceHash/Nicehashapi.pm
Normal file
141
NiceHash/Nicehashapi.pm
Normal file
@@ -0,0 +1,141 @@
|
||||
|
||||
package Nicehashapi;
|
||||
|
||||
use Moo;
|
||||
use strictures 2;
|
||||
use namespace::clean;
|
||||
use File::Slurp;
|
||||
use Data::Printer;
|
||||
use Mojo::UserAgent;
|
||||
use Digest::SHA qw(hmac_sha256_hex);;
|
||||
use UUID::Tiny ':std';
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
use Encode qw(decode encode);
|
||||
use Data::Dumper;
|
||||
|
||||
has key => (
|
||||
is => 'ro',
|
||||
);
|
||||
|
||||
has secret => (
|
||||
is => 'ro',
|
||||
);
|
||||
|
||||
has organisation_id => (
|
||||
is => 'ro',
|
||||
);
|
||||
|
||||
# my $key = '8bcbda58-5a26-4ce4-8e61-3a0fd894cfbb';
|
||||
# my $secret = '59dc1ee5-a0e6-4ba6-9a9c-a043c350b88b84266786-2d14-4b9f-9ae5-d168ed8376b7';
|
||||
# my $organisation_id = '4c615374-bf85-42fd-860d-b1bf4568c01f';
|
||||
|
||||
sub get_payouts {
|
||||
my ( $self, $page, $size) = @_;
|
||||
return _request($self, 'GET', '/main/api/v2/mining/rigs/payouts', "page=$page&size=$size", undef);
|
||||
}
|
||||
|
||||
sub get_currencies {
|
||||
my ( $self) = @_;
|
||||
return _request($self, 'GET', '/main/api/v2/public/currencies/', '', undef);
|
||||
}
|
||||
|
||||
sub get_prices {
|
||||
my ( $self) = @_;
|
||||
return _request($self, 'GET', '/exchange/api/v2/info/prices', '', undef);
|
||||
}
|
||||
|
||||
sub get_hashpowerEarnings {
|
||||
my ( $self, $currencies) = @_;
|
||||
return _request($self, 'GET', '/main/api/v2/accounting/hashpowerEarnings/' . $currencies, '', undef);
|
||||
}
|
||||
|
||||
sub get_myOrders {
|
||||
my ( $self) = @_;
|
||||
return _request($self, 'GET', '/exchange/api/v2/info/myOrders', '', undef);
|
||||
}
|
||||
|
||||
sub get_accounts2 {
|
||||
my ( $self, $extendedResponse, $fiat) = @_;
|
||||
return _request($self, 'GET', '/main/api/v2/accounting/accounts2', "extendedResponse=$extendedResponse&fiat=$fiat", undef);
|
||||
}
|
||||
|
||||
sub get_accounting_activity {
|
||||
my ( $self, $currency, $type, $stage, $limit ) = @_;
|
||||
my $query;
|
||||
|
||||
if ( defined $limit ) {
|
||||
$query = "limit=$limit";
|
||||
}
|
||||
|
||||
if ( defined $type ) {
|
||||
$query .= "&type=$type";
|
||||
}
|
||||
|
||||
if ( defined $stage ) {
|
||||
$query .= "&stage=$stage";
|
||||
}
|
||||
|
||||
return _request($self, 'GET', '/main/api/v2/accounting/activity/'.$currency, $query, undef);
|
||||
# return _request($self, 'GET', '/main/api/v2/accounting/activity/'.$currency, '' , undef);
|
||||
}
|
||||
|
||||
sub _request {
|
||||
my ( $self, $method, $path, $query, $body) = @_;
|
||||
|
||||
my $xtime = int (gettimeofday * 1000);
|
||||
my $xnonce = create_uuid(UUID_V4);
|
||||
my $uid = uuid_to_string($xnonce);
|
||||
my $xnonce2 = create_uuid(UUID_V4);
|
||||
my $uid2 = uuid_to_string($xnonce);
|
||||
|
||||
my $message = encode('UTF-8', $self->key);
|
||||
$message .= encode('UTF-8', chr(0x00));
|
||||
$message .= encode('UTF-8',$xtime);
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8',$uid);
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8', $self->organisation_id);
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8',$method);
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8',$path);
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8',$query);
|
||||
|
||||
if ($body) {
|
||||
my $body_json = Dumper($body);
|
||||
$message .= encode('UTF-8',chr(0x00));
|
||||
$message .= encode('UTF-8', $body_json);
|
||||
}
|
||||
|
||||
my $digest = hmac_sha256_hex($message, $self->secret);
|
||||
my $ua = Mojo::UserAgent->new();
|
||||
|
||||
my $headers = {
|
||||
'X-Time' => $xtime,
|
||||
'X-Nonce'=> $uid,
|
||||
'X-Auth'=> $self->key . ':' . $digest ,
|
||||
'Content-Type'=> 'application/json',
|
||||
'X-Organization-Id'=> $self->organisation_id,
|
||||
'X-Request-Id'=> $uid2
|
||||
};
|
||||
|
||||
if ( $query ) {
|
||||
$query = '?'.$query;
|
||||
}
|
||||
|
||||
my $data = $ua->get('https://api2.nicehash.com' . $path.$query => $headers )->res;
|
||||
|
||||
if ( $path =~ /activity/ ) {
|
||||
p $data;
|
||||
print $path.$query."\n";
|
||||
}
|
||||
|
||||
# my $data = $ua->get('https://api2.nicehash.com' . $path.$query => $headers )->res->json;
|
||||
|
||||
return $data->json;
|
||||
}
|
||||
|
||||
1;
|
||||
35147
NiceHash/coingeckoid.json
Normal file
35147
NiceHash/coingeckoid.json
Normal file
File diff suppressed because it is too large
Load Diff
77
NiceHash/investment.csv
Normal file
77
NiceHash/investment.csv
Normal file
@@ -0,0 +1,77 @@
|
||||
buy ;value ;sell ;value ;date ;how ;fee ;value ;ineuro ;
|
||||
BTC ;0.00111388 ;EUR ;50 ;2021-02-17 21:24:00 ;ste ;EUR ;1.45 ;43586.38 ;
|
||||
ETH ;0.01677347 ;BTC ;0.00059096 ;2021-02-17 21:26:42 ;ste ;ETH ;0.00008387 ;1473.42 ;
|
||||
RVN ;67.56756757 ;BTC ;0.0001 ;2021-02-17 21:51:55 ;ste ;RVN ;0.33783784 ;0.06517260032601803;
|
||||
LTC ;0.05581514 ;BTC ;0.00024548 ;2021-02-18 16:14:00 ;ste ;LTC ;0.00027908 ;196.39130990886653 ;
|
||||
BTC ;0.00342421 ;EUR ;150 ;2021-02-18 16:14:00 ;ste ;EUR ;2.18 ;43169.08 ;
|
||||
XRP ;24.084778 ;BTC ;0.00025 ;2021-02-18 22:50:28 ;ste ;XRP ;0.120424 ;0.4454225873823748 ;
|
||||
POLY ;37.90087464 ;BTC ;0.00026 ;2021-02-18 22:53:37 ;ste ;POLY ;0.18950437 ;0.16528781250821772;
|
||||
RVN ;77.34806630 ;BTC ;0.00014 ;2021-02-18 23:09:21 ;ste ;RVN ;0.38674033 ;0.06149183018139609;
|
||||
XLM ;25.8799172 ;BTC ;0.00025 ;2021-02-18 23:12:00 ;ste ;XLM ;0.1293996 ;0.4126191293430188 ;
|
||||
ETH ;0.01870189 ;BTC ;0.0007 ;2021-02-18 23:22:00 ;ste ;ETH ;0.00009351 ;1532.245300670433 ;
|
||||
MATIC ;66.00660066 ;BTC ;0.0002 ;2021-02-21 17:45:00 ;ste ;MATIC ;0.330033 ;0.12043422966095804;
|
||||
TNT ;101.01010101 ;BTC ;0.0001 ;2021-02-21 17:33:00 ;ste ;TNT ;0.50505051 ;0.0495 ;
|
||||
BTC ;0.00122211 ;EUR ;50 ;2021-03-01 13:28:00 ;ste ;EUR ;1.45 ;39726.37 ;
|
||||
ETH ;0.04078763 ;BTC ;0.0013 ;2021-03-01 13:33:05 ;ste ;ETH ;0.00020394 ;1225.86 ;
|
||||
BTC ;0.00307542 ;EUR ;150 ;2021-03-11 22:59:00 ;hen ;EUR ;2.18 ;48064.98 ;
|
||||
BTC ;0.00222725 ;EUR ;100 ;2021-03-25 22:00:00 ;ste ;EUR ;1.45 ;44247.39 ;
|
||||
FTM ;27.24795640 ;BTC ;0.0002 ;2021-04-02 10:02:00 ;ste ;FTM ;0.13623978 ;0.3769306838590017 ;
|
||||
BTC ;0.00195425 ;EUR ;100 ;2021-04-12 19:33:00 ;ste ;EUR ;1.45 ;50428.55 ;
|
||||
ETH ;0.05622319 ;BTC ;0.002 ;2021-04-12 19:34:05 ;ste ;ETH ;0.00028112 ;1806.414093543639 ;
|
||||
BTC ;0.00210390 ;EUR ;100 ;2021-04-19 19:25:00 ;ste ;EUR ;1.45 ;46841.58 ;
|
||||
BTC ;0.00236794 ;EUR ;100 ;2021-04-25 19:25:00 ;ste ;EUR ;1.45 ;42230.79 ;
|
||||
ETH ;0.03071291 ;BTC ;0.0022 ;2021-05-10 23:52:24 ;ste ;ETH ;0.00015356 ;3308.70 ;
|
||||
BTC ;0.00472456 ;EUR ;200 ;2021-05-13 14:18:00 ;ste ;EUR ;2.90 ;41718.17 ;
|
||||
LBA ;1846.15384615 ;BTC ;0.00024 ;2021-05-14 17:12:00 ;ste ;LBA ;9.23076923 ;0.00544389 ;
|
||||
DOGE ;111.88983856 ;BTC ;0.0011782 ;2021-05-14 17:25:00 ;ste ;DOGE ;0.55944919 ;0.44686811 ;
|
||||
BTC ;0.00524624 ;EUR ;200 ;2021-05-18 08:22:00 ;ste ;EUR ;2.90 ;37569.76 ;
|
||||
AOA ;4007.14285714 ;BTC ;0.0002805 ;2021-05-18 18:42:12 ;ste ;AOA ;20.03571429 ;0.00249554 ;
|
||||
ETH ;0.03566481 ;BTC ;0.0028006 ;2021-05-18 19:56:40 ;ste ;ETH ;0.00017832 ;2817.97 ;
|
||||
BTC ;0.00596527 ;EUR ;200 ;2021-05-20 22:47:00 ;ste ;EUR ;2.90 ;33041.25 ;
|
||||
ETH ;0.04406291 ;BTC ;0.0030403 ;2021-05-20 23:07:13 ;ste ;EUR ;0.00022031 ;2269.48 ;
|
||||
KEY ;2303.48631882 ;BTC ;0.0005989 ;2021-05-20 23:38:00 ;ste ;KEY ;11.5174316 ;0.0089 ;
|
||||
MITH ;477.01929598 ;BTC ;0.0005984 ;2021-05-20 23:45:09 ;ste ;MITH ;2.38509648 ;0.04213771 ;
|
||||
BTC ;0.00630013 ;EUR ;200 ;2021-05-24 16:22:00 ;ste ;EUR ;2.90 ;31285.07 ;
|
||||
RVN ;162.12121212 ;BTC ;0.000321 ;2021-05-24 16:25:00 ;ste ;RVN ;0.81060606 ;0.06168224 ;
|
||||
FTM ;37.80918728 ;BTC ;0.000321 ;2021-05-24 16:28:00 ;ste ;FTM ;0.18904594 ;0.264448598 ;
|
||||
EUR ;55.81 ;BTC ;0.002 ;2021-05-29 23:13:00 ;ste ;BTC ;0.00004244 ; ;Binance
|
||||
OCEAN ;43.46733668 ;BTC ;0.0006055 ;2021-06-16 23:34:00 ;ste ;OCEAN ;0.21733668 ;0.46011561 ;
|
||||
BTC ;0.00596527 ;EUR ;200 ;2021-06-20 21:47:00 ;ste ;EUR ;2.90 ;33527.40 ;
|
||||
XRP ;18.679522 ;BTC ;0.0003612 ;2021-06-25 15:15:16 ;ste ;XRP ;0.093867 ;0.53534560 ;
|
||||
POLY ;82.24118993 ;BTC ;0.0003612 ;2021-06-25 15:16:14 ;ste ;POLY ;0.41327231 ;0.12159357 ;
|
||||
MITH ;326.46756757 ;BTC ;0.0003642 ;2021-06-25 15:17:49 ;ste ;MITH ;1.64054054 ;0.03063091 ;
|
||||
FTM ;109.82689394 ;BTC ;0.0007285 ;2021-06-25 15:18:43 ;ste ;FTM ;0.55189394 ;0.18210476 ;
|
||||
RVN ;696.94647436 ;BTC ;0.0010927 ;2021-06-25 15:17:04 ;ste ;RVN ;3.50224359 ;0.04304491 ;
|
||||
BTC ;0.00677037 ;EUR ;200 ;2021-06-28 21:35:00 ;ste ;EUR ;2.90 ;29540.48 ;
|
||||
LOOM ;243.45744680 ;BTC ;0.000345 ;2021-06-25 32:35:04 ;ste ;LOOM ;1.22340426 ;0.04107493 ;
|
||||
SNT ;239.07638889 ;BTC ;0.0010927 ;2021-06-25 15:17:04 ;ste ;SNT ;1.20138889 ;0.04182763 ;
|
||||
ETH ;0.04937313 ;BTC ;0.003403 ;2021-07-07 15:52:04 ;ste ;ETH ;0.00024811 ;2025.39316 ;
|
||||
ETH ;0.06136540 ;BTC ;0.003731 ;2021-07-21 15:41:07 ;ste ;ETH ;0.00030837 ;1629.58279 ;
|
||||
KEY ;1767.30952381 ;BTC ;0.000373 ;2021-07-21 15:50:00 ;ste ;KEY ;8.88095238 ;0.00565831 ;
|
||||
LBA ;4643.85 ;BTC ;0.000373 ;2021-07-21 15:53:38 ;ste ;LBA ;18.65 ;0.00215338 ;
|
||||
BTC ;0.00601832 ;EUR ;200 ;2021-07-26 14:15:00 ;ste ;EUR ;2.90 ;33231.86 ;
|
||||
ETH ;0.10033165 ;BTC ;0.00613 ;2021-07-26 14:14:12 ;ste ;ETH ;0.00040294 ;1993.38892 ;
|
||||
EUR ;99.51 ;BTC ;0.002967 ;2021-05-29 23:13:00 ;ste ;BTC ;0 ; ;Coinbase
|
||||
EUR ;50.11 ;BTC ;0.001541 ;2021-08-03 13:37:00 ;ste ;BTC ;0.000001 ; ;Binance
|
||||
EUR ;50 ;BTC ;0.001485 ;2021-08-04 23:57:00 ;ste ;BTC ;0.000001 ; ;freebitco.in
|
||||
BTC ;0.00496098 ;EUR ;200 ;2021-08-11 19:44:00 ;ste ;EUR ;2.90 ;40314.61 ;
|
||||
BTC ;0.00190101 ;RVN ;604 ;2021-08-12 16:25:17 ;ste ;BTC ;0.00000763 ; ;71.96
|
||||
EUR ;50.02 ;BTC ;0.001274 ;2021-08-13 11:20:00 ;ste ;BTC ;0.000001 ; ;freebitco.in
|
||||
ETH ;0.04705297 ;BTC ;0.00613 ;2021-08-16 22:07:34 ;ste ;ETH ;0.00018897 ;2725.86 ;
|
||||
EUR ;100 ;BTC ;0.0025854 ;2021-08-18 16:47:00 ;ste ;BTC ;0.000001 ; ;Binance
|
||||
XRP ;104.052804 ;BTC ;0.002477 ;2021-08-25 11:10:14 ;ste ;XRP ;0.417883 ;0.961050 ;
|
||||
EUR ;100.57 ;BTC ;0.002472 ;2021-08-25 14:22:00 ;ste ;BTC ;0 ; ;Coinbase
|
||||
BTC ;0.00109573 ;RVN ;398.44813612 ;2021-08-26 15:58:17 ;ste ;BTC ;0.00000438 ;sellout ;43.77
|
||||
RVN ;870.69677420 ;BTC ;0.002439 ;2021-08-27 19:33:37 ;ste ;RVN ;3.49677419 ;0.11485054 ;
|
||||
BTC ;0.00051639 ;LBA ;6480.77307692 ;2021-09-01 17:32:17 ;ste ;BTC ;0.00000207 ;sellout ;20.64
|
||||
BTC ;0.00466603 ;EUR ;200 ;2021-09-02 13:18:00 ;ste ;EUR ;2.90 ;42915.69 ;
|
||||
MITH ;269.18918919 ;BTC ;0.0003 ;2021-09-07 20:13:42 ;ste ;MITH ;1.08108108 ;0.04364959 ;
|
||||
RVN ;521.36296296 ;BTC ;0.001272 ;2021-09-07 20:16:29 ;ste ;RVN ;2.09382716 ;0.09722593 ;
|
||||
EUR ;140.67 ;BTC ;0.00370768 ;2021-09-13 22:07:00 ;ste ;BTC ;0.00000176 ; ;freebitco.in
|
||||
BTC ;0.00538674 ;EUR ;200 ;2021-09-22 17:46:00 ;ste ;EUR ;2.86 ;37128.20 ;
|
||||
BTC ;0.00560353 ;FTM ;174.5587519 ;2021-10-16 15:00:17 ;ste ;BTC ;0.0000225 ;sellout ;297.64
|
||||
FTM ;41.73395974 ;BTC ;0.001873 ;2021-10-30 10:40:00 ;ste ;FTM ;0.16760626 ;2.39613 ;
|
||||
RVN ;750.75376884 ;BTC ;0.0015 ;2021-11-27 13:35:55 ;ste ;RVN ;3.01507538 ;0.0959 ;
|
||||
FTM ;10.34870756 ;BTC ;0.00041 ;2021-11-27 13:51:39 ;ste ;FTM ;0.04156107 ;1.9326 ;
|
||||
BTC ;0.00020643 ;LTC ;0.05553606 ;2021-11-19 20:31:51 ;ste ;BTC ;0.00000083 ;sellout ;
|
||||
EUR ;200.29 ;BTC ;0.00546 ;2022-01-18 21:49:00 ;ste ;BTC ;0.000005 ; ;Binance
|
||||
|
206
NiceHash/nicehash.pl
Normal file
206
NiceHash/nicehash.pl
Normal file
@@ -0,0 +1,206 @@
|
||||
|
||||
use lib '/home/steffen/scripte/nicehash';
|
||||
use Nicehashapi;
|
||||
use Data::Printer;
|
||||
use File::Slurp;
|
||||
use Mojo::UserAgent;
|
||||
use Time::Piece;
|
||||
# use Term::ANSIColor;
|
||||
use File::Copy;
|
||||
|
||||
my $einsatzhenner = 150;
|
||||
|
||||
my $api = Nicehashapi->new(
|
||||
key => '8bcbda58-5a26-4ce4-8e61-3a0fd894cfbb',
|
||||
secret => '59dc1ee5-a0e6-4ba6-9a9c-a043c350b88b84266786-2d14-4b9f-9ae5-d168ed8376b7',
|
||||
organisation_id => '4c615374-bf85-42fd-860d-b1bf4568c01f'
|
||||
);
|
||||
|
||||
my $data = $api->get_payouts(0, 10_000);
|
||||
|
||||
my @trading = read_file('/home/steffen/scripte/nicehash/investment.csv');
|
||||
|
||||
my %washabich;
|
||||
my %washabichwoanders;
|
||||
my %avgineuro;
|
||||
my %count4avgineuro;
|
||||
|
||||
# my %kleinstekurse = {
|
||||
# ""
|
||||
# }
|
||||
|
||||
|
||||
for my $l ( @trading ) {
|
||||
next if ( $l =~ /^buy/ );
|
||||
chomp $l;
|
||||
$l = $l =~ s/\s//gr;
|
||||
my @sp = split(/;/, $l );
|
||||
|
||||
if ( $sp[0] eq 'BTC' && $sp[2] eq 'EUR' ) {
|
||||
$washabich{'EUR'} += $sp[3] ;
|
||||
$washabich{$sp[0]} += ($sp[1] * $sp[8] );
|
||||
$avgineuro{$sp[0]} += $sp[8];
|
||||
$count4avgineuro{$sp[0]} += 1;
|
||||
} elsif ( $sp[0] eq 'BTC' && $sp[2] ne 'EUR' ) {
|
||||
if ( $sp[8] eq 'sellout' ) {
|
||||
$avgineuro{$sp[2]} = 0;
|
||||
$count4avgineuro{$sp[2]} = 0;
|
||||
$washabich{$sp[2]} = 0;
|
||||
} else {
|
||||
$washabich{$sp[2]} -= (($sp[1]- $sp[7] ) * $sp[8] );
|
||||
}
|
||||
} elsif ( $sp[0] eq 'EUR' ) {
|
||||
$washabich{'EUR'} -= $sp[1];
|
||||
$washabichwoanders{$sp[9]} += $sp[1];
|
||||
} else {
|
||||
$washabich{$sp[0]} += (($sp[1]- $sp[7] ) * $sp[8] );
|
||||
$avgineuro{$sp[0]} += $sp[8];
|
||||
$count4avgineuro{$sp[0]} += 1;
|
||||
$washabich{'BTC'} -= (($sp[1]- $sp[7] ) * $sp[8] );
|
||||
}
|
||||
}
|
||||
|
||||
p $count4avgineuro{'FTM'};
|
||||
p $washabich{'FTM'};
|
||||
|
||||
for my $k ( keys %avgineuro ) {
|
||||
next if ( $count4avgineuro{$k} == 0 );
|
||||
$avgineuro{$k} = $avgineuro{$k} / $count4avgineuro{$k};
|
||||
}
|
||||
|
||||
$washabich{'EUR'} = $washabich{'EUR'} - $einsatzhenner;
|
||||
my $get_accounts2 = $api->get_accounts2('true', 'EUR');
|
||||
|
||||
my %btcwerte;
|
||||
my %curwerte;
|
||||
|
||||
for my $li (@{$get_accounts2->{currencies}}) {
|
||||
if ( $li->{totalBalance} > 0 ) {
|
||||
$btcwerte{$li->{currency}} = $li->{fiatRate};
|
||||
$curwerte{$li->{currency}} = $li->{totalBalance};
|
||||
}
|
||||
}
|
||||
|
||||
my $othercurrbtc = $maxbtc - $btcwerte{'BTC'};
|
||||
my $cur = $api->get_prices;
|
||||
my $gesamtgebuehr = 0;
|
||||
my $gesamt = 0;
|
||||
|
||||
# write_file('/mnt/h/Download/nicehashmining.csv', "Type,Buy Amount,Buy Currency,Sell Amount,Sell Currency,Fee,Fee Currency,Exchange,Trade-Group,Comment,Date\n");
|
||||
|
||||
my $min;
|
||||
my $max;
|
||||
|
||||
# mining
|
||||
for my $line (@{$data->{list}}) {
|
||||
my $date = localtime($line->{created} / 1000);
|
||||
if ( not defined $min ) {
|
||||
$min = $line->{created};
|
||||
}
|
||||
if ( not defined $max ) {
|
||||
$max = $line->{created};
|
||||
}
|
||||
|
||||
if ( $min > $line->{created} ) {
|
||||
$min = $line->{created};
|
||||
}
|
||||
|
||||
if ( $max < $line->{created} ) {
|
||||
$max = $line->{created};
|
||||
}
|
||||
|
||||
my $datetime = $date->ymd .' ' . $date->hms;
|
||||
my $currencies = $line->{currency}->{description};
|
||||
my $feeamount = $line->{feeAmount};
|
||||
my $amount = $line->{amount};
|
||||
my $gebuehr = sprintf('%.8f', $feeamount );
|
||||
$gesamtgebuehr += $gebuehr;
|
||||
$gesamt += $amount;
|
||||
#append_file('/mnt/h/Download/nicehashmining.csv', "Mining (kommerziell),$amount,$currencies,0,EUR,$gebuehr,$currencies,NiceHash,,,$datetime\n");
|
||||
}
|
||||
|
||||
$min = localtime($min / 1000);
|
||||
$max = localtime($max / 1000);
|
||||
|
||||
my $eur = $btcwerte{'BTC'};
|
||||
my $btchenner = 0.00307542;
|
||||
|
||||
my $gesamteuro = sprintf('%.2f', ( $gesamt * $eur ) );
|
||||
my $gebuehreuro = sprintf('%.2f', ( $gesamtgebuehr * $eur ) );
|
||||
my $gesamtgebeuro = sprintf('%.2f', ( ($gesamt - $gesamtgebuehr) * $eur ) );
|
||||
my $btchennereuro = sprintf('%.2f', ( $btchenner * $eur ) ); # Henner 150 Euro
|
||||
my $btcsteffeneuro = sprintf('%.2f', ( ($curwerte{'BTC'} - $btchenner ) * $eur ) ); #
|
||||
|
||||
print 'von '.$min->ymd.' - '.$max->ymd."\n";
|
||||
print "\n";
|
||||
print "─── Mining ───────────────────────────────────────────────────────────────────────────────────\n";
|
||||
print " BTC:\t$gesamt\t €: $gesamteuro\n";
|
||||
print " Gebuehr:\t" . sprintf('%.8f', $gesamtgebuehr). "\t €: $gebuehreuro\n";
|
||||
print "nach Gebuehr:\t". sprintf('%.8f',($gesamt - $gesamtgebuehr)). "\t €: $gesamtgebeuro\n";
|
||||
print "─── Trading ────────────────────────────────────────────────────────────│\n";
|
||||
print "BTC H:\t". sprintf('%.8f', $btchenner ). "\t €: $btchennereuro\t← 150\t→ ". _rotodergruen( _prozent(150,$btchennereuro)) ." %\t│───────────────│──────────────\n";
|
||||
print "BTC S:\t". sprintf('%.8f', ($curwerte{'BTC'} - $btchenner - $gesamt) ). "\t €: $btcsteffeneuro". "\t← ".sprintf('%.2f', $washabich{'BTC'} - 150). "\t→ ". _rotodergruen(_prozent( $washabich{'BTC'} - 150,$btcsteffeneuro))." %\t│ ".sprintf('%.4f', $eur ). " €\t│ ".sprintf('%.2f',$avgineuro{'BTC'} ). " €\n";
|
||||
|
||||
my $maxsteffen = $btcsteffeneuro;
|
||||
my $maxsteffenbtc = sprintf('%.8f', ($btcwerte{'BTC'} - $btchenner) );
|
||||
for my $cu ( sort keys %btcwerte ) {
|
||||
next if ( $cu eq 'BTC' );
|
||||
$maxsteffen += sprintf('%.2f', ( $curwerte{$cu} * $btcwerte{$cu} ) );
|
||||
$maxsteffenbtc += sprintf('%.8f', $curwerte{$cu} );
|
||||
# print sprintf('%.8f', $btcwerte{$cu}). "\n";
|
||||
my $pro = _prozent($curwerte{$cu} * $avgineuro{$cu}, $curwerte{$cu} * $btcwerte{$cu} );
|
||||
|
||||
print "$cu:\t".sprintf('%.8f', $curwerte{$cu} ). "\t €: ".sprintf('%.2f', ( $curwerte{$cu} * $btcwerte{$cu} ) ). "\t← ".sprintf('%.2f', $curwerte{$cu} * $avgineuro{$cu} ). "\t→ ". _rotodergruen($pro) . " %\t│ ".sprintf('%.4f',$btcwerte{$cu} )." €\t│ ".sprintf('%.4f',$avgineuro{$cu} ). " €\n";
|
||||
}
|
||||
|
||||
print "─── result ─────────────────────────────────────────────────────────────│───────────────│──────────────\n";
|
||||
|
||||
my $totaleuro = $get_accounts2->{total}->{totalBalance} * $eur;
|
||||
|
||||
|
||||
print "Umsatz NH:\t".sprintf('%.2f', $totaleuro)." €\n";
|
||||
print "davon mining:\t$gesamtgebeuro €\n";
|
||||
print "Rendite:\t". _rotodergruen( sprintf('%.2f', ($maxsteffen - $washabich{'EUR'}))) . " €\n";
|
||||
print "ohne mining:\t". _rotodergruen(sprintf('%.2f', ($maxsteffen - $washabich{'EUR'} - $gesamtgebeuro))) . " €\n";
|
||||
print "-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
|
||||
print "Einsatz NH:\t$washabich{'EUR'} €\n";
|
||||
my $su = 0;
|
||||
for my $exch ( sort keys %washabichwoanders ) {
|
||||
print "$exch:\t$washabichwoanders{$exch} €\n";
|
||||
$su += $washabichwoanders{$exch};
|
||||
}
|
||||
|
||||
$su += $washabich{'EUR'};
|
||||
print "===========================\n";
|
||||
print "Einsatz gesamt:\t$su €\n";
|
||||
|
||||
my @dateien = read_dir('./' );
|
||||
|
||||
for my $d ( @dateien ) {
|
||||
copy( '/home/steffen/scripte/nicehash/'.$d, '/mnt/e/Programmierung/Perl/NiceHash' );
|
||||
}
|
||||
|
||||
sub _prozent {
|
||||
my ($ist, $soll) = @_;
|
||||
if ( $ist ) {
|
||||
my $result = sprintf('%.0f', ( ($soll * 100) / $ist - 100));
|
||||
if ( $result !~ /-/ ) {
|
||||
$result = " $result";
|
||||
}
|
||||
return $result;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
sub _rotodergruen {
|
||||
my ($text) = @_;
|
||||
if ( $text =~ /-/ ) {
|
||||
return "\e[31m$text\e[0m";
|
||||
} else {
|
||||
return "\e[32m$text\e[0m";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
336
NiceHash/nicehash.py
Normal file
336
NiceHash/nicehash.py
Normal file
@@ -0,0 +1,336 @@
|
||||
from datetime import datetime
|
||||
from time import mktime
|
||||
import uuid
|
||||
import hmac
|
||||
import requests
|
||||
import json
|
||||
from hashlib import sha256
|
||||
import optparse
|
||||
import sys
|
||||
import dumper
|
||||
|
||||
class public_api:
|
||||
|
||||
def __init__(self, host, verbose=False):
|
||||
self.host = host
|
||||
self.verbose = verbose
|
||||
|
||||
def request(self, method, path, query, body):
|
||||
url = self.host + path
|
||||
if query:
|
||||
url += '?' + query
|
||||
|
||||
if self.verbose:
|
||||
print(method, url)
|
||||
|
||||
s = requests.Session()
|
||||
if body:
|
||||
body_json = json.dumps(body)
|
||||
response = s.request(method, url, data=body_json)
|
||||
else:
|
||||
response = s.request(method, url)
|
||||
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
elif response.content:
|
||||
raise Exception(str(response.status_code) + ": " + response.reason + ": " + str(response.content))
|
||||
else:
|
||||
raise Exception(str(response.status_code) + ": " + response.reason)
|
||||
|
||||
def get_current_global_stats(self):
|
||||
return self.request('GET', '/main/api/v2/public/stats/global/current/', '', None)
|
||||
|
||||
def get_global_stats_24(self):
|
||||
return self.request('GET', '/main/api/v2/public/stats/global/24h/', '', None)
|
||||
|
||||
def get_active_orders(self):
|
||||
return self.request('GET', '/main/api/v2/public/orders/active/', '', None)
|
||||
|
||||
def get_active_orders2(self):
|
||||
return self.request('GET', '/main/api/v2/public/orders/active2/', '', None)
|
||||
|
||||
def buy_info(self):
|
||||
return self.request('GET', '/main/api/v2/public/buy/info/', '', None)
|
||||
|
||||
def get_algorithms(self):
|
||||
return self.request('GET', '/main/api/v2/mining/algorithms/', '', None)
|
||||
|
||||
def get_markets(self):
|
||||
return self.request('GET', '/main/api/v2/mining/markets/', '', None)
|
||||
|
||||
def get_currencies(self):
|
||||
return self.request('GET', '/main/api/v2/public/currencies/', '', None)
|
||||
|
||||
def get_multialgo_info(self):
|
||||
return self.request('GET', '/main/api/v2/public/simplemultialgo/info/', '', None)
|
||||
|
||||
def get_exchange_markets_info(self):
|
||||
return self.request('GET', '/exchange/api/v2/info/status', '', None)
|
||||
|
||||
def get_exchange_trades(self, market):
|
||||
return self.request('GET', '/exchange/api/v2/trades', 'market=' + market, None)
|
||||
|
||||
def get_candlesticks(self, market, from_s, to_s, resolution):
|
||||
return self.request('GET', '/exchange/api/v2/candlesticks', "market={}&from={}&to={}&resolution={}".format(market, from_s, to_s, resolution), None)
|
||||
|
||||
def get_exchange_orderbook(self, market, limit):
|
||||
return self.request('GET', '/exchange/api/v2/orderbook', "market={}&limit={}".format(market, limit), None)
|
||||
|
||||
class private_api:
|
||||
|
||||
def __init__(self, host, organisation_id, key, secret, verbose=False):
|
||||
self.key = key
|
||||
self.secret = secret
|
||||
self.organisation_id = organisation_id
|
||||
self.host = host
|
||||
self.verbose = verbose
|
||||
|
||||
def request(self, method, path, query, body):
|
||||
|
||||
xtime = self.get_epoch_ms_from_now()
|
||||
print(xtime)
|
||||
|
||||
xnonce = str(uuid.uuid4())
|
||||
print(xnonce)
|
||||
|
||||
message = bytearray(self.key, 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(str(xtime), 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(xnonce, 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(self.organisation_id, 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(method, 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(path, 'utf-8')
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(query, 'utf-8')
|
||||
|
||||
print(query)
|
||||
|
||||
|
||||
if body:
|
||||
body_json = json.dumps(body)
|
||||
message += bytearray('\x00', 'utf-8')
|
||||
message += bytearray(body_json, 'utf-8')
|
||||
|
||||
digest = hmac.new(bytearray(self.secret, 'utf-8'), message, sha256).hexdigest()
|
||||
xauth = self.key + ":" + digest
|
||||
|
||||
headers = {
|
||||
'X-Time': str(xtime),
|
||||
'X-Nonce': xnonce,
|
||||
'X-Auth': xauth,
|
||||
'Content-Type': 'application/json',
|
||||
'X-Organization-Id': self.organisation_id,
|
||||
'X-Request-Id': str(uuid.uuid4())
|
||||
}
|
||||
|
||||
print(headers)
|
||||
|
||||
s = requests.Session()
|
||||
s.headers = headers
|
||||
|
||||
|
||||
url = self.host + path
|
||||
if query:
|
||||
url += '?' + query
|
||||
|
||||
if self.verbose:
|
||||
print(method, url)
|
||||
|
||||
if body:
|
||||
response = s.request(method, url, data=body_json)
|
||||
else:
|
||||
response = s.request(method, url)
|
||||
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
elif response.content:
|
||||
raise Exception(str(response.status_code) + ": " + response.reason + ": " + str(response.content))
|
||||
else:
|
||||
raise Exception(str(response.status_code) + ": " + response.reason)
|
||||
|
||||
def get_epoch_ms_from_now(self):
|
||||
now = datetime.now()
|
||||
now_ec_since_epoch = mktime(now.timetuple()) + now.microsecond / 1000000.0
|
||||
return int(now_ec_since_epoch * 1000)
|
||||
|
||||
def algo_settings_from_response(self, algorithm, algo_response):
|
||||
algo_setting = None
|
||||
for item in algo_response['miningAlgorithms']:
|
||||
if item['algorithm'] == algorithm:
|
||||
algo_setting = item
|
||||
|
||||
if algo_setting is None:
|
||||
raise Exception('Settings for algorithm not found in algo_response parameter')
|
||||
|
||||
return algo_setting
|
||||
|
||||
def get_accounts(self):
|
||||
return self.request('GET', '/main/api/v2/accounting/accounts2/', '', None)
|
||||
|
||||
def get_accounts_for_currency(self, currency):
|
||||
return self.request('GET', '/main/api/v2/accounting/account2/' + currency, '', None)
|
||||
|
||||
def get_withdrawal_addresses(self, currency, size, page):
|
||||
|
||||
params = "currency={}&size={}&page={}".format(currency, size, page)
|
||||
|
||||
return self.request('GET', '/main/api/v2/accounting/withdrawalAddresses/', params, None)
|
||||
|
||||
def get_withdrawal_types(self):
|
||||
return self.request('GET', '/main/api/v2/accounting/withdrawalAddresses/types/', '', None)
|
||||
|
||||
def withdraw_request(self, address_id, amount, currency):
|
||||
withdraw_data = {
|
||||
"withdrawalAddressId": address_id,
|
||||
"amount": amount,
|
||||
"currency": currency
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/accounting/withdrawal/', '', withdraw_data)
|
||||
|
||||
def get_my_active_orders(self, algorithm, market, limit):
|
||||
|
||||
ts = self.get_epoch_ms_from_now()
|
||||
params = "algorithm={}&market={}&ts={}&limit={}&op=LT".format(algorithm, market, ts, limit)
|
||||
|
||||
return self.request('GET', '/main/api/v2/hashpower/myOrders', params, None)
|
||||
|
||||
def create_pool(self, name, algorithm, pool_host, pool_port, username, password):
|
||||
pool_data = {
|
||||
"name": name,
|
||||
"algorithm": algorithm,
|
||||
"stratumHostname": pool_host,
|
||||
"stratumPort": pool_port,
|
||||
"username": username,
|
||||
"password": password
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/pool/', '', pool_data)
|
||||
|
||||
def delete_pool(self, pool_id):
|
||||
return self.request('DELETE', '/main/api/v2/pool/' + pool_id, '', None)
|
||||
|
||||
def get_my_pools(self, page, size):
|
||||
return self.request('GET', '/main/api/v2/pools/', '', None)
|
||||
|
||||
def get_hashpower_orderbook(self, algorithm):
|
||||
return self.request('GET', '/main/api/v2/hashpower/orderBook/', 'algorithm=' + algorithm, None )
|
||||
|
||||
def create_hashpower_order(self, market, type, algorithm, price, limit, amount, pool_id, algo_response):
|
||||
|
||||
algo_setting = self.algo_settings_from_response(algorithm, algo_response)
|
||||
|
||||
order_data = {
|
||||
"market": market,
|
||||
"algorithm": algorithm,
|
||||
"amount": amount,
|
||||
"price": price,
|
||||
"limit": limit,
|
||||
"poolId": pool_id,
|
||||
"type": type,
|
||||
"marketFactor": algo_setting['marketFactor'],
|
||||
"displayMarketFactor": algo_setting['displayMarketFactor']
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/hashpower/order/', '', order_data)
|
||||
|
||||
def cancel_hashpower_order(self, order_id):
|
||||
return self.request('DELETE', '/main/api/v2/hashpower/order/' + order_id, '', None)
|
||||
|
||||
def refill_hashpower_order(self, order_id, amount):
|
||||
refill_data = {
|
||||
"amount": amount
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/hashpower/order/' + order_id + '/refill/', '', refill_data)
|
||||
|
||||
def set_price_hashpower_order(self, order_id, price, algorithm, algo_response):
|
||||
|
||||
algo_setting = self.algo_settings_from_response(algorithm, algo_response)
|
||||
|
||||
price_data = {
|
||||
"price": price,
|
||||
"marketFactor": algo_setting['marketFactor'],
|
||||
"displayMarketFactor": algo_setting['displayMarketFactor']
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/hashpower/order/' + order_id + '/updatePriceAndLimit/', '',
|
||||
price_data)
|
||||
|
||||
def set_limit_hashpower_order(self, order_id, limit, algorithm, algo_response):
|
||||
algo_setting = self.algo_settings_from_response(algorithm, algo_response)
|
||||
limit_data = {
|
||||
"limit": limit,
|
||||
"marketFactor": algo_setting['marketFactor'],
|
||||
"displayMarketFactor": algo_setting['displayMarketFactor']
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/hashpower/order/' + order_id + '/updatePriceAndLimit/', '',
|
||||
limit_data)
|
||||
|
||||
def set_price_and_limit_hashpower_order(self, order_id, price, limit, algorithm, algo_response):
|
||||
algo_setting = self.algo_settings_from_response(algorithm, algo_response)
|
||||
|
||||
price_data = {
|
||||
"price": price,
|
||||
"limit": limit,
|
||||
"marketFactor": algo_setting['marketFactor'],
|
||||
"displayMarketFactor": algo_setting['displayMarketFactor']
|
||||
}
|
||||
return self.request('POST', '/main/api/v2/hashpower/order/' + order_id + '/updatePriceAndLimit/', '',
|
||||
price_data)
|
||||
|
||||
def get_my_exchange_orders(self, market):
|
||||
return self.request('GET', '/exchange/api/v2/myOrders', 'market=' + market, None)
|
||||
|
||||
def get_my_exchange_trades(self, market):
|
||||
return self.request('GET','/exchange/api/v2/myTrades', 'market=' + market, None)
|
||||
|
||||
def create_exchange_limit_order(self, market, side, quantity, price):
|
||||
query = "market={}&side={}&type=limit&quantity={}&price={}".format(market, side, quantity, price)
|
||||
return self.request('POST', '/exchange/api/v2/order', query, None)
|
||||
|
||||
def create_exchange_buy_market_order(self, market, quantity):
|
||||
query = "market={}&side=buy&type=market&secQuantity={}".format(market, quantity)
|
||||
return self.request('POST', '/exchange/api/v2/order', query, None)
|
||||
|
||||
def create_exchange_sell_market_order(self, market, quantity):
|
||||
query = "market={}&side=sell&type=market&quantity={}".format(market, quantity)
|
||||
return self.request('POST', '/exchange/api/v2/order', query, None)
|
||||
|
||||
def cancel_exchange_order(self, market, order_id):
|
||||
query = "market={}&orderId={}".format(market, order_id)
|
||||
return self.request('DELETE', '/exchange/api/v2/order', query, None)
|
||||
|
||||
def get_payouts(self):
|
||||
return self.request('GET', '/main/api/v2/mining/rigs/payouts/', '', None)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = optparse.OptionParser()
|
||||
|
||||
parser.add_option('-b', '--base_url', dest="base", help="Api base url", default="https://api2.nicehash.com")
|
||||
parser.add_option('-o', '--organization_id', dest="org", help="Organization id")
|
||||
parser.add_option('-k', '--key', dest="key", help="Api key")
|
||||
parser.add_option('-s', '--secret', dest="secret", help="Secret for api key")
|
||||
parser.add_option('-m', '--method', dest="method", help="Method for request", default="GET")
|
||||
parser.add_option('-p', '--path', dest="path", help="Path for request", default="/")
|
||||
parser.add_option('-q', '--params', dest="params", help="Parameters for request")
|
||||
parser.add_option('-d', '--body', dest="body", help="Body for request")
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
||||
private_api = private_api(options.base, options.org, options.key, options.secret)
|
||||
|
||||
params = ''
|
||||
if options.params is not None:
|
||||
params = options.params
|
||||
|
||||
try:
|
||||
response = private_api.request(options.method, options.path, params, options.body)
|
||||
except Exception as ex:
|
||||
print("Unexpected error:", ex)
|
||||
exit(1)
|
||||
|
||||
print(response)
|
||||
exit(0)
|
||||
BIN
NiceHash/nicehash.pyc
Normal file
BIN
NiceHash/nicehash.pyc
Normal file
Binary file not shown.
12
NiceHash/nicehash_api.py
Normal file
12
NiceHash/nicehash_api.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import nicehash
|
||||
import json
|
||||
|
||||
host = 'https://api2.nicehash.com'
|
||||
organisation_id = '4c615374-bf85-42fd-860d-b1bf4568c01f'
|
||||
key = '8bcbda58-5a26-4ce4-8e61-3a0fd894cfbb'
|
||||
secret = '59dc1ee5-a0e6-4ba6-9a9c-a043c350b88b84266786-2d14-4b9f-9ae5-d168ed8376b7'
|
||||
|
||||
private_api = nicehash.private_api(host, organisation_id, key, secret)
|
||||
|
||||
payouts = private_api.get_payouts()
|
||||
# print(y)
|
||||
85
NiceHash/nicehashmining.csv
Normal file
85
NiceHash/nicehashmining.csv
Normal file
@@ -0,0 +1,85 @@
|
||||
Type,Buy Amount,Buy Currency,Sell Amount,Sell Currency,Fee,Fee Currency,Exchange,Trade-Group,Comment,Date
|
||||
Mining (kommerziell),0.00001429,BTC,0,EUR,0.00000029,BTC,NiceHash,,,2021-03-20 05:05:26
|
||||
Mining (kommerziell),0.00001569,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-19 21:06:23
|
||||
Mining (kommerziell),0.00001564,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-19 13:07:00
|
||||
Mining (kommerziell),0.00001619,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-19 05:06:00
|
||||
Mining (kommerziell),0.00001835,BTC,0,EUR,0.00000037,BTC,NiceHash,,,2021-03-18 21:05:55
|
||||
Mining (kommerziell),0.00001552,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-18 13:05:49
|
||||
Mining (kommerziell),0.00001794,BTC,0,EUR,0.00000036,BTC,NiceHash,,,2021-03-18 05:05:21
|
||||
Mining (kommerziell),0.00001897,BTC,0,EUR,0.00000038,BTC,NiceHash,,,2021-03-17 21:04:35
|
||||
Mining (kommerziell),0.00001575,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-17 13:06:30
|
||||
Mining (kommerziell),0.00001061,BTC,0,EUR,0.00000021,BTC,NiceHash,,,2021-03-17 05:05:23
|
||||
Mining (kommerziell),0.00001939,BTC,0,EUR,0.00000039,BTC,NiceHash,,,2021-03-16 21:06:46
|
||||
Mining (kommerziell),0.00001648,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-16 13:04:12
|
||||
Mining (kommerziell),0.0000139,BTC,0,EUR,0.00000028,BTC,NiceHash,,,2021-03-16 05:04:50
|
||||
Mining (kommerziell),0.00001859,BTC,0,EUR,0.00000037,BTC,NiceHash,,,2021-03-15 21:09:55
|
||||
Mining (kommerziell),0.0000175,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-03-15 13:08:04
|
||||
Mining (kommerziell),0.00001672,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-15 05:06:25
|
||||
Mining (kommerziell),0.00001704,BTC,0,EUR,0.00000034,BTC,NiceHash,,,2021-03-14 21:03:56
|
||||
Mining (kommerziell),0.00001595,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-14 13:04:44
|
||||
Mining (kommerziell),0.00001757,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-03-14 05:03:25
|
||||
Mining (kommerziell),0.00001619,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-13 21:04:25
|
||||
Mining (kommerziell),0.00001659,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-13 13:07:03
|
||||
Mining (kommerziell),0.00001618,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-13 05:03:48
|
||||
Mining (kommerziell),0.00001818,BTC,0,EUR,0.00000036,BTC,NiceHash,,,2021-03-12 21:03:50
|
||||
Mining (kommerziell),0.00001654,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-12 13:06:54
|
||||
Mining (kommerziell),0.00001706,BTC,0,EUR,0.00000034,BTC,NiceHash,,,2021-03-12 05:04:33
|
||||
Mining (kommerziell),0.00001634,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-11 21:06:11
|
||||
Mining (kommerziell),0.00001505,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-11 13:06:38
|
||||
Mining (kommerziell),0.00001524,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-11 05:04:54
|
||||
Mining (kommerziell),0.0000172,BTC,0,EUR,0.00000034,BTC,NiceHash,,,2021-03-10 21:10:50
|
||||
Mining (kommerziell),0.00001674,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-10 13:07:12
|
||||
Mining (kommerziell),0.00001683,BTC,0,EUR,0.00000034,BTC,NiceHash,,,2021-03-10 05:02:42
|
||||
Mining (kommerziell),0.00001738,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-03-09 21:06:57
|
||||
Mining (kommerziell),0.00001675,BTC,0,EUR,0.00000034,BTC,NiceHash,,,2021-03-09 13:07:56
|
||||
Mining (kommerziell),0.00001666,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-09 05:03:28
|
||||
Mining (kommerziell),0.00001755,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-03-08 21:08:11
|
||||
Mining (kommerziell),0.00001614,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-08 13:03:42
|
||||
Mining (kommerziell),0.00001574,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-08 05:03:50
|
||||
Mining (kommerziell),0.00001754,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-03-07 21:03:32
|
||||
Mining (kommerziell),0.00001505,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-07 13:02:02
|
||||
Mining (kommerziell),0.00001249,BTC,0,EUR,0.00000025,BTC,NiceHash,,,2021-03-07 05:02:55
|
||||
Mining (kommerziell),0.0000149,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-06 21:02:07
|
||||
Mining (kommerziell),0.00001398,BTC,0,EUR,0.00000028,BTC,NiceHash,,,2021-03-06 13:02:03
|
||||
Mining (kommerziell),0.00001523,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-06 05:03:14
|
||||
Mining (kommerziell),0.00001548,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-05 21:02:46
|
||||
Mining (kommerziell),0.00001539,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-05 13:00:12
|
||||
Mining (kommerziell),0.00001183,BTC,0,EUR,0.00000024,BTC,NiceHash,,,2021-03-05 05:03:55
|
||||
Mining (kommerziell),0.00001613,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-03-04 21:05:13
|
||||
Mining (kommerziell),0.00001532,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-04 13:07:26
|
||||
Mining (kommerziell),0.00001729,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-03-04 05:05:52
|
||||
Mining (kommerziell),0.00001778,BTC,0,EUR,0.00000036,BTC,NiceHash,,,2021-03-03 21:07:33
|
||||
Mining (kommerziell),0.00001513,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-03 13:06:29
|
||||
Mining (kommerziell),0.00001422,BTC,0,EUR,0.00000028,BTC,NiceHash,,,2021-03-03 05:01:14
|
||||
Mining (kommerziell),0.00001707,BTC,0,EUR,0.00000034,BTC,NiceHash,,,2021-03-02 21:08:06
|
||||
Mining (kommerziell),0.00001513,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-02 13:03:15
|
||||
Mining (kommerziell),0.00001541,BTC,0,EUR,0.00000031,BTC,NiceHash,,,2021-03-02 05:06:50
|
||||
Mining (kommerziell),0.00001662,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-03-01 21:08:01
|
||||
Mining (kommerziell),0.00001477,BTC,0,EUR,0.00000030,BTC,NiceHash,,,2021-03-01 13:07:28
|
||||
Mining (kommerziell),0.0000125,BTC,0,EUR,0.00000025,BTC,NiceHash,,,2021-03-01 05:05:15
|
||||
Mining (kommerziell),0.00001166,BTC,0,EUR,0.00000023,BTC,NiceHash,,,2021-02-28 21:03:50
|
||||
Mining (kommerziell),0.0000139,BTC,0,EUR,0.00000028,BTC,NiceHash,,,2021-02-28 13:04:30
|
||||
Mining (kommerziell),0.00001338,BTC,0,EUR,0.00000027,BTC,NiceHash,,,2021-02-28 09:40:45
|
||||
Mining (kommerziell),0.0000125,BTC,0,EUR,0.00000025,BTC,NiceHash,,,2021-02-27 21:41:07
|
||||
Mining (kommerziell),0.00001591,BTC,0,EUR,0.00000032,BTC,NiceHash,,,2021-02-27 09:05:05
|
||||
Mining (kommerziell),0.00001789,BTC,0,EUR,0.00000036,BTC,NiceHash,,,2021-02-27 01:04:06
|
||||
Mining (kommerziell),0.00001791,BTC,0,EUR,0.00000036,BTC,NiceHash,,,2021-02-26 17:03:53
|
||||
Mining (kommerziell),0.00001767,BTC,0,EUR,0.00000035,BTC,NiceHash,,,2021-02-26 09:05:19
|
||||
Mining (kommerziell),0.0000164,BTC,0,EUR,0.00000033,BTC,NiceHash,,,2021-02-26 01:04:34
|
||||
Mining (kommerziell),0.00001252,BTC,0,EUR,0.00000025,BTC,NiceHash,,,2021-02-25 13:04:29
|
||||
Mining (kommerziell),0.00001845,BTC,0,EUR,0.00000037,BTC,NiceHash,,,2021-02-25 01:25:43
|
||||
Mining (kommerziell),0.00001115,BTC,0,EUR,0.00000022,BTC,NiceHash,,,2021-02-24 17:11:55
|
||||
Mining (kommerziell),0.00001923,BTC,0,EUR,0.00000038,BTC,NiceHash,,,2021-02-24 05:04:40
|
||||
Mining (kommerziell),0.00001008,BTC,0,EUR,0.00000020,BTC,NiceHash,,,2021-02-23 21:06:16
|
||||
Mining (kommerziell),0.00001343,BTC,0,EUR,0.00000027,BTC,NiceHash,,,2021-02-23 17:07:07
|
||||
Mining (kommerziell),0.00002585,BTC,0,EUR,0.00000052,BTC,NiceHash,,,2021-02-23 13:07:26
|
||||
Mining (kommerziell),0.00001466,BTC,0,EUR,0.00000029,BTC,NiceHash,,,2021-02-23 05:06:07
|
||||
Mining (kommerziell),0.0000206,BTC,0,EUR,0.00000041,BTC,NiceHash,,,2021-02-22 21:07:19
|
||||
Mining (kommerziell),0.00001279,BTC,0,EUR,0.00000026,BTC,NiceHash,,,2021-02-22 07:00:22
|
||||
Mining (kommerziell),0.00001782,BTC,0,EUR,0.00000036,BTC,NiceHash,,,2021-02-21 17:15:09
|
||||
Mining (kommerziell),0.00001091,BTC,0,EUR,0.00000022,BTC,NiceHash,,,2021-02-21 07:00:36
|
||||
Mining (kommerziell),0.00001108,BTC,0,EUR,0.00000022,BTC,NiceHash,,,2021-02-20 21:08:36
|
||||
Mining (kommerziell),0.00001055,BTC,0,EUR,0.00000021,BTC,NiceHash,,,2021-02-20 17:09:42
|
||||
Mining (kommerziell),0.00001456,BTC,0,EUR,0.00000029,BTC,NiceHash,,,2021-02-20 13:07:35
|
||||
Mining (kommerziell),0.00001113,BTC,0,EUR,0.00000022,BTC,NiceHash,,,2021-02-19 21:11:54
|
||||
Mining (kommerziell),0.00001173,BTC,0,EUR,0.00000023,BTC,NiceHash,,,2021-02-19 17:15:32
|
||||
|
14
NiceHash/nicehashtest.pl
Normal file
14
NiceHash/nicehashtest.pl
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
use lib '/home/steffen/scripte/Nicehash';
|
||||
use Nicehashapi;
|
||||
use Data::Printer;
|
||||
|
||||
my $api = Nicehashapi->new(
|
||||
key => '8bcbda58-5a26-4ce4-8e61-3a0fd894cfbb',
|
||||
secret => '59dc1ee5-a0e6-4ba6-9a9c-a043c350b88b84266786-2d14-4b9f-9ae5-d168ed8376b7',
|
||||
organisation_id => '4c615374-bf85-42fd-860d-b1bf4568c01f'
|
||||
);
|
||||
|
||||
my $data = $api->get_payouts;
|
||||
|
||||
p $data->{list};
|
||||
1
NiceHash/pricesbitcoin.json
Normal file
1
NiceHash/pricesbitcoin.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user