kandi background
Explore Kits

dogecoin | very currency - Select language : EN CN | Cryptography library

 by   dogecoin C++ Version: v1.14.4 License: MIT

 by   dogecoin C++ Version: v1.14.4 License: MIT

Download this library from

kandi X-RAY | dogecoin Summary

dogecoin is a C++ library typically used in Security, Cryptography, Bitcoin applications. dogecoin has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.
Select language: EN | CN. Dogecoin is a cryptocurrency like Bitcoin, although it does not use SHA256 as its proof of work (POW). Taking development cues from Tenebrix and Litecoin, Dogecoin currently employs a simplified variant of scrypt.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • dogecoin has a medium active ecosystem.
  • It has 12895 star(s) with 2288 fork(s). There are 863 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 96 open issues and 897 have been closed. On average issues are closed in 293 days. There are 62 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of dogecoin is v1.14.4
dogecoin Support
Best in #Cryptography
Average in #Cryptography
dogecoin Support
Best in #Cryptography
Average in #Cryptography

quality kandi Quality

  • dogecoin has 0 bugs and 0 code smells.
dogecoin Quality
Best in #Cryptography
Average in #Cryptography
dogecoin Quality
Best in #Cryptography
Average in #Cryptography

securitySecurity

  • dogecoin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • dogecoin code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
dogecoin Security
Best in #Cryptography
Average in #Cryptography
dogecoin Security
Best in #Cryptography
Average in #Cryptography

license License

  • dogecoin is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
dogecoin License
Best in #Cryptography
Average in #Cryptography
dogecoin License
Best in #Cryptography
Average in #Cryptography

buildReuse

  • dogecoin releases are available to install and integrate.
  • Installation instructions are available. Examples and code snippets are not available.
  • It has 20049 lines of code, 1289 functions and 213 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
dogecoin Reuse
Best in #Cryptography
Average in #Cryptography
dogecoin Reuse
Best in #Cryptography
Average in #Cryptography
Top functions reviewed by kandi - BETA

kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here

Get all kandi verified functions for this library.

Get all kandi verified functions for this library.

dogecoin Key Features

Version numbers are following major.minor.patch semantics.

dogecoin Examples and Code Snippets

See all related Code Snippets

Cannot resolve jitpack dependencies in android studio in the last gradle version

copy iconCopydownload iconDownload
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven { url "https://jitpack.io" }

    }
}
rootProject.name = "Crypto World"
include ':app'
plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }

Iterate through nested array of object in an Array of objects

copy iconCopydownload iconDownload
const data = [
  {
    id: "1",
    name: "Digitec",
    description: "Wir akzeptieren folgende Kryptowährungen",
    currencies: [
      {coin: "Bitcoin"},
      {coin: "Ethereum"},
      {coin: "XRP"},
    ],
    link: "webseite besuchen",
  },
  {
    id: "2",
    name: "Galaxus",
    description: "Wir akzeptieren folgende Kryptowährungen",
    currencies: [
      {coin: "Bitcoin"},
      {coin: "Monero"},
      {coin: "XRP"},
    ],
    link: "webseite besuchen",
  },
  {
    id: "3",
    name: "Brack.ch",
    description: "Wir akzeptieren folgende Kryptowährungen",
    currencies: [
      {coin: "Litecoin"},
      {coin: "Dogecoin"},
      {coin: "XRP"},
    ],
    link: "Onlineshop besuchen",
  },
];

const uniqueCoins = [... new Set(data.map(item => item.currencies.map(subItem => subItem.coin))
                        .reduce((arr1, arr2) => arr1.concat(arr2), []))];
console.log(uniqueCoins);
const data=[{id:"1",name:"Digitec",description:"Wir akzeptieren folgende Kryptowährungen",currencies:[{coin:"Bitcoin"},{coin:"Ethereum"},{coin:"XRP"}],link:"webseite besuchen"},{id:"2",name:"Galaxus",description:"Wir akzeptieren folgende Kryptowährungen",currencies:[{coin:"Bitcoin"},{coin:"Monero"},{coin:"XRP"}],link:"webseite besuchen"},{id:"3",name:"Brack.ch",description:"Wir akzeptieren folgende Kryptowährungen",currencies:[{coin:"Litecoin"},{coin:"Dogecoin"},{coin:"XRP"}],link:"Onlineshop besuchen"}];

// Get a new array of coins for each object, and then
// flatten all of them into one array
const coins = data.flatMap(obj => {
  return obj.currencies.map(currency => currency.coin);
});

// Create a set from the coins array
const set = new Set(coins);

// `sort and `map` over the array to produce
// an array of HTML for each option
const options = [...set].sort().map(option => {
  return `<option value=${option}>${option}</option>`;
});

// Add those options to a select
const select = `
  <select>
    <option disabled selected>Choose a coin</option>
    <option disabled>----</option>
    ${options.join('')}
  </select>
`

// Add that HTML to a container
document.body.insertAdjacentHTML('beforeend', select);
const data = [{id: "1",name: "Digitec",description: "Wir akzeptieren folgende Kryptowährungen",currencies: [{coin: "Bitcoin"},{coin: "Ethereum"},{coin: "XRP"}],link: "webseite besuchen"},{id: "2",name: "Galaxus",description: "Wir akzeptieren folgende Kryptowährungen",currencies: [{coin: "Bitcoin"},{coin: "Monero"},{coin: "XRP"}],link: "webseite besuchen"},{id: "3",name: "Brack.ch",description: "Wir akzeptieren folgende Kryptowährungen",currencies: [{coin: "Litecoin"},{coin: "Dogecoin"},{coin: "XRP"}],link: "Onlineshop besuchen"}];

const coins = [ ...new Set(
    data.flatMap(({currencies}) => currencies.map(({coin}) => coin))) 
];

console.log( coins );
const uniqueCoins = [...new Set(data.reduce((prev, cur) => prev.concat(cur.currencies.map(cur => cur.coin)), []))]
const coins = data.reduce((prev, cur) => prev.concat(cur.currencies.map(cur => cur.coin)), []);
const uniqueCoins = [...new Set(coins)];
const uniqueCoins = [...new Set(data.reduce((prev, cur) => prev.concat(cur.currencies.map(cur => cur.coin)), []))]
const coins = data.reduce((prev, cur) => prev.concat(cur.currencies.map(cur => cur.coin)), []);
const uniqueCoins = [...new Set(coins)];
const uniqueCoins = [...new Set(data.reduce((prev, cur) => prev.concat(cur.currencies.map(cur => cur.coin)), []))]
const coins = data.reduce((prev, cur) => prev.concat(cur.currencies.map(cur => cur.coin)), []);
const uniqueCoins = [...new Set(coins)];

JAVA how to convert JSONObject into a custom format?

copy iconCopydownload iconDownload
public class Library {
    private Book[] book = { };

    public Book[] getBook() {
        return book;
    }

    public void setBook(Book[] books) {
        this.book = books;
    }
}

public class Book {
    private String id;
    private String language;
    private String edition;
    private String author;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getEdition() {
        return edition;
    }

    public void setEdition(String edition) {
        this.edition = edition;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }
}

Sort table rows by ASC, DESC (different type of content per column)

copy iconCopydownload iconDownload
      if(sortOrder == "desc" && x.find('.primary-info').text().replace(/[^a-zA-Z0-9 _]/g,'') < y.find('.primary-info').text().replace(/[^a-zA-Z0-9 _]/g,''))
      {
        shouldSwitch = true;
        break;
      }
      else
      {
        shouldSwitch = true;
        break;
      }

Trying to create Dataframe from lists of zip using Pandas. wanted data table result

copy iconCopydownload iconDownload
pd.DataFrame({'coin_name': coin_name[0:81], 'chain_name': chain_name, 'withdrawal_fees':withdrawal_fees})

          coin_name       chain_name    withdrawal_fees
0        Civic(CVC)      ETH (ERC20)  97.00000000 (CVC)
1             (CVC)              BSV       0.0004 (BSV)
2   Bitcoin SV(BSV)      ETH (ERC20)   0.00625000 (ETH)
3             (BSV)      BKC (KAP20)         0.01 (KUB)
4     Ethereum(ETH)      ETH (ERC20)  0.22000000 (COMP)
..              ...              ...                ...
76       Maker(MKR)              SOL         0.01 (SOL)
77            (MKR)    AVAX_C (AVAX)        0.01 (AVAX)
78  Enjin Coin(ENJ)  MATIC (Polygon)        0.1 (MATIC)
79            (ENJ)     FTM (Fantom)         0.01 (FTM)
80      Kusama(KSM)     LUNA (Terra)        0.02 (LUNA)

[81 rows x 3 columns]

Dogecoin Address generation - Address not valid

copy iconCopydownload iconDownload
return (chr(0x1E) . $binstr . substr(sha256(sha256($binstr)), 0, 4));
return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
use strict;
use warnings;
use Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Crypt::RIPEMD160;
use Bitcoin::Crypto::Base58 qw(encode_base58 decode_base58 encode_base58check decode_base58check);
use v5.10;

# Version byte: Bitcoin 0x00, Dogecoin 0x1E
sub cv {
    my ($binstr) = @_;
    return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
}

my $pk = Crypt::PK::ECC->new()->generate_key('secp256k1');
my $dogecoin_address = encode_base58(cv(Crypt::RIPEMD160->hash(sha256($pk->export_key_raw('public')))));
say "Dogecoin Address: " . $dogecoin_address; 
Dogecoin Address: DR61RhFNCkswmDx6JjLyVPSoq51gBtxxjK
Dogecoin Address: DFFV4xa9Ph2LUXaKbyxMtViHFhu9e9h88J
Dogecoin Address: DAk4ZbSoWnhpt2exkEevG2j93CVEL7g5Fu
sub toWifKey {
    my ($binstr) = @_;
    return (chr(0x9E). $binstr . substr(sha256(sha256(chr(0x9E) . $binstr)), 0, 4));
}

my $wifkey = encode_base58(toWifKey($pk->export_key_raw('private')));
return (chr(0x1E) . $binstr . substr(sha256(sha256($binstr)), 0, 4));
return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
use strict;
use warnings;
use Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Crypt::RIPEMD160;
use Bitcoin::Crypto::Base58 qw(encode_base58 decode_base58 encode_base58check decode_base58check);
use v5.10;

# Version byte: Bitcoin 0x00, Dogecoin 0x1E
sub cv {
    my ($binstr) = @_;
    return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
}

my $pk = Crypt::PK::ECC->new()->generate_key('secp256k1');
my $dogecoin_address = encode_base58(cv(Crypt::RIPEMD160->hash(sha256($pk->export_key_raw('public')))));
say "Dogecoin Address: " . $dogecoin_address; 
Dogecoin Address: DR61RhFNCkswmDx6JjLyVPSoq51gBtxxjK
Dogecoin Address: DFFV4xa9Ph2LUXaKbyxMtViHFhu9e9h88J
Dogecoin Address: DAk4ZbSoWnhpt2exkEevG2j93CVEL7g5Fu
sub toWifKey {
    my ($binstr) = @_;
    return (chr(0x9E). $binstr . substr(sha256(sha256(chr(0x9E) . $binstr)), 0, 4));
}

my $wifkey = encode_base58(toWifKey($pk->export_key_raw('private')));
return (chr(0x1E) . $binstr . substr(sha256(sha256($binstr)), 0, 4));
return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
use strict;
use warnings;
use Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Crypt::RIPEMD160;
use Bitcoin::Crypto::Base58 qw(encode_base58 decode_base58 encode_base58check decode_base58check);
use v5.10;

# Version byte: Bitcoin 0x00, Dogecoin 0x1E
sub cv {
    my ($binstr) = @_;
    return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
}

my $pk = Crypt::PK::ECC->new()->generate_key('secp256k1');
my $dogecoin_address = encode_base58(cv(Crypt::RIPEMD160->hash(sha256($pk->export_key_raw('public')))));
say "Dogecoin Address: " . $dogecoin_address; 
Dogecoin Address: DR61RhFNCkswmDx6JjLyVPSoq51gBtxxjK
Dogecoin Address: DFFV4xa9Ph2LUXaKbyxMtViHFhu9e9h88J
Dogecoin Address: DAk4ZbSoWnhpt2exkEevG2j93CVEL7g5Fu
sub toWifKey {
    my ($binstr) = @_;
    return (chr(0x9E). $binstr . substr(sha256(sha256(chr(0x9E) . $binstr)), 0, 4));
}

my $wifkey = encode_base58(toWifKey($pk->export_key_raw('private')));
return (chr(0x1E) . $binstr . substr(sha256(sha256($binstr)), 0, 4));
return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
use strict;
use warnings;
use Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Crypt::RIPEMD160;
use Bitcoin::Crypto::Base58 qw(encode_base58 decode_base58 encode_base58check decode_base58check);
use v5.10;

# Version byte: Bitcoin 0x00, Dogecoin 0x1E
sub cv {
    my ($binstr) = @_;
    return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
}

my $pk = Crypt::PK::ECC->new()->generate_key('secp256k1');
my $dogecoin_address = encode_base58(cv(Crypt::RIPEMD160->hash(sha256($pk->export_key_raw('public')))));
say "Dogecoin Address: " . $dogecoin_address; 
Dogecoin Address: DR61RhFNCkswmDx6JjLyVPSoq51gBtxxjK
Dogecoin Address: DFFV4xa9Ph2LUXaKbyxMtViHFhu9e9h88J
Dogecoin Address: DAk4ZbSoWnhpt2exkEevG2j93CVEL7g5Fu
sub toWifKey {
    my ($binstr) = @_;
    return (chr(0x9E). $binstr . substr(sha256(sha256(chr(0x9E) . $binstr)), 0, 4));
}

my $wifkey = encode_base58(toWifKey($pk->export_key_raw('private')));
return (chr(0x1E) . $binstr . substr(sha256(sha256($binstr)), 0, 4));
return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
use strict;
use warnings;
use Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Crypt::RIPEMD160;
use Bitcoin::Crypto::Base58 qw(encode_base58 decode_base58 encode_base58check decode_base58check);
use v5.10;

# Version byte: Bitcoin 0x00, Dogecoin 0x1E
sub cv {
    my ($binstr) = @_;
    return (chr(0x1E) . $binstr . substr(sha256(sha256(chr(0x1E) . $binstr)), 0, 4));
}

my $pk = Crypt::PK::ECC->new()->generate_key('secp256k1');
my $dogecoin_address = encode_base58(cv(Crypt::RIPEMD160->hash(sha256($pk->export_key_raw('public')))));
say "Dogecoin Address: " . $dogecoin_address; 
Dogecoin Address: DR61RhFNCkswmDx6JjLyVPSoq51gBtxxjK
Dogecoin Address: DFFV4xa9Ph2LUXaKbyxMtViHFhu9e9h88J
Dogecoin Address: DAk4ZbSoWnhpt2exkEevG2j93CVEL7g5Fu
sub toWifKey {
    my ($binstr) = @_;
    return (chr(0x9E). $binstr . substr(sha256(sha256(chr(0x9E) . $binstr)), 0, 4));
}

my $wifkey = encode_base58(toWifKey($pk->export_key_raw('private')));

I am saving BeautifulSoup results to CSV file with webpage title as filename, but the filename isn't the correct webpage title

copy iconCopydownload iconDownload
if table:
    ad2 = (soup.title.string)
    ad2 = ad2.replace('Dogecoin', '')
    ad2 = ad2.replace('Address', '')
    ad2 = ad2.replace('-', '')
    filename = ad2.replace(' ', '')
    with open(f'{filename}.csv', 'w', newline='') as f:
        fcsv = csv.writer(f)
        datarows = []
        for row in table.find_all('tr'):
            heads = row.find_all('th')
            if heads:
                headers = [th.text for th in heads]
            else:
                datarows.append([td.text for td in row.find_all('td')])
        fcsv.writerow(headers)
        fcsv.writerows(datarows)

How can I properly graph these two datasets using Pandas in Matplotlib?

copy iconCopydownload iconDownload
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)
df = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv', index_col=0, parse_dates=parse_dates)
                                                     Time                                   Amount                  Balance Balance, USD @ Price    Profit
Block
4073636 2022-01-23 02:20:27 UTC 2022-01-23 02:20:27+00:00              +20,000 DOGE (2,707.16 USD)  2,740,510.04941789 DOGE    $370,950 @ $0.135  $134,009
4063557 2022-01-15 14:37:15 UTC 2022-01-15 14:37:15+00:00  -676,245.18946621 DOGE (128,175.63 USD)  2,720,510.04941789 DOGE     $515,646 @ $0.19  $281,413
4014695 2021-12-10 14:24:11 UTC 2021-12-10 14:24:11+00:00            +129,967 DOGE (21,907.16 USD)   3,396,755.2388841 DOGE    $572,555 @ $0.169  $210,146
4014652 2021-12-10 13:39:36 UTC 2021-12-10 13:39:36+00:00               +20,000 DOGE (3,466.9 USD)   3,266,788.2388841 DOGE    $566,282 @ $0.173  $225,780
4014275 2021-12-10 06:56:33 UTC 2021-12-10 06:56:33+00:00         +1,980,000 DOGE (331,523.17 USD)   3,246,788.2388841 DOGE    $543,629 @ $0.167  $206,594
dfb = pd.read_csv('DSb5CvAXhXnzFoxmiMaWpgxjDF6CfMK7h2.csv',usecols=['Time','Balance'],index_col=0, parse_dates=True)
dfb = dfb.iloc[::-1]  # reverse the data
print(dfb.head(8))
                               Balance
Time                                  
2021-04-24 10:20:22+00:00      47 DOGE
2021-04-24 10:34:39+00:00      57 DOGE
2021-04-24 10:40:49+00:00      67 DOGE
2021-04-24 10:42:22+00:00      58 DOGE
2021-04-24 10:50:46+00:00      49 DOGE
2021-04-26 09:48:52+00:00  19,049 DOGE
2021-04-26 13:39:54+00:00      49 DOGE
2021-04-26 16:22:06+00:00  20,099 DOGE
dfb["Balance"] = dfb["Balance"].str.split(expand=True).iloc[:,0]  # [:,0] to take only balance and throw away "DOGE"
dfb["Balance"] = dfb["Balance"].str.replace(',','').astype(float) # remove commas from balance and convert to float.
print(dfb.head(16))
print(dfb.tail())
                                Balance
Time                                   
2021-04-24 10:20:22+00:00  4.700000e+01
2021-04-24 10:34:39+00:00  5.700000e+01
2021-04-24 10:40:49+00:00  6.700000e+01
2021-04-24 10:42:22+00:00  5.800000e+01
2021-04-24 10:50:46+00:00  4.900000e+01
2021-04-26 09:48:52+00:00  1.904900e+04
2021-04-26 13:39:54+00:00  4.900000e+01
2021-04-26 16:22:06+00:00  2.009900e+04
2021-04-27 16:18:41+00:00  8.901000e+02
2021-04-29 15:37:30+00:00  2.500800e+04
2021-04-29 18:08:48+00:00  4.500800e+04
2021-04-29 18:21:54+00:00  7.999429e+04
2021-04-29 18:55:09+00:00  1.049685e+05
2021-04-30 02:48:24+00:00  8.049615e+05
2021-04-30 03:28:13+00:00  2.004911e+06
2021-04-30 04:36:35+00:00  1.985752e+06
                                Balance
Time                                   
2021-12-10 06:56:33+00:00  3.246788e+06
2021-12-10 13:39:36+00:00  3.266788e+06
2021-12-10 14:24:11+00:00  3.396755e+06
2022-01-15 14:37:15+00:00  2.720510e+06
2022-01-23 02:20:27+00:00  2.740510e+06
df = yf.Ticker("DOGE-USD").history(period='max')
df = df.loc["2021-01-01":] 
print(df.head(8))
print(df.tail())
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2021-01-01  0.004681  0.005685  0.004615  0.005685   228961515          0             0
2021-01-02  0.005686  0.013698  0.005584  0.010615  3421562680          0             0
2021-01-03  0.010602  0.013867  0.009409  0.009771  2707003608          0             0
2021-01-04  0.009785  0.011421  0.007878  0.009767  1372398979          0             0
2021-01-05  0.009767  0.010219  0.008972  0.009920   687256067          0             0
2021-01-06  0.009923  0.010854  0.009685  0.010465   749915516          0             0
2021-01-07  0.010454  0.010532  0.009162  0.009742   520644706          0             0
2021-01-08  0.009743  0.010285  0.008986  0.009846   394462164          0             0
                Open      High       Low     Close      Volume  Dividends  Stock Splits
Date
2022-01-22  0.142651  0.145027  0.122816  0.132892  1693524581          0             0
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0
2022-01-24  0.141881  0.141951  0.127220  0.137798  1446873574          0             0
2022-01-25  0.137784  0.147236  0.133235  0.143049  1347567750          0             0
2022-01-26  0.142737  0.146615  0.142239  0.146615  1371126400          0             0
newdfb = dfb['Balance'].resample('D').ohlc().dropna()  # dropna gets rid of rows that have no data
newdfb.drop(['open','high','low'],axis=1,inplace=True) # keep only "close"
newdfb.columns = ['Balance']  # rename "close" to "Balance"
print(newdfb.head())
                            Balance
Time                                   
2021-04-24 00:00:00+00:00  4.900000e+01
2021-04-26 00:00:00+00:00  2.009900e+04
2021-04-27 00:00:00+00:00  8.901000e+02
2021-04-29 00:00:00+00:00  1.049685e+05
2021-04-30 00:00:00+00:00  2.665753e+06
dates = [d.date() for d in newdfb.index]
newdfb.index = pd.DatetimeIndex(dates)
newdfb.index.name = 'Time'
print(newdfb.head())
                 Balance
Time                    
2021-04-24  4.900000e+01
2021-04-26  2.009900e+04
2021-04-27  8.901000e+02
2021-04-29  1.049685e+05
2021-04-30  2.665753e+06
dfc = df.join(newdfb, how='outer').dropna()
dfc.index.name = 'Date'
print(dfc.head())
print(dfc.tail())
                Open      High       Low     Close       Volume  Dividends  Stock Splits       Balance
Date
2021-04-24  0.249544  0.289390  0.229891  0.270212  11057578568          0             0  4.900000e+01
2021-04-26  0.251240  0.280452  0.248026  0.270674   5118886527          0             0  2.009900e+04
2021-04-27  0.271427  0.279629  0.264928  0.272188   3590611310          0             0  8.901000e+02
2021-04-29  0.323232  0.323881  0.296904  0.305169   5027354503          0             0  1.049685e+05
2021-04-30  0.304702  0.339757  0.302981  0.337561   5290390982          0             0  2.665753e+06
                Open      High       Low     Close      Volume  Dividends  Stock Splits       Balance
Date
2021-09-19  0.241281  0.241285  0.231337  0.233142   892763953          0             0  1.246787e+06
2021-11-27  0.201429  0.209613  0.200871  0.205347   917785649          0             0  1.246788e+06
2021-12-10  0.169466  0.174610  0.164065  0.164422   845450410          0             0  3.396755e+06
2022-01-15  0.183644  0.193600  0.182676  0.185103  1878282290          0             0  2.720510e+06
2022-01-23  0.132960  0.143072  0.132819  0.141863  1006234946          0             0  2.740510e+06
ap = mpf.make_addplot(dfc['Balance'])
mpf.plot(dfc,type='candle',addplot=ap)

BeautifulSoup Scraping Elements Containing Certain Date

copy iconCopydownload iconDownload
import csv
import requests
from bs4 import BeautifulSoup as bs
from datetime import datetime

headers = []
datarows = []
# define 1-1-2020 as a datetime object
after_date = datetime(2020, 1, 1)

with requests.Session() as s:
    s.headers = {"User-Agent": "Safari/537.36"}
    r = s.get('https://bitinfocharts.com/top-100-richest-dogecoin-addresses-2.html')
    soup = bs(r.content, 'lxml')

    # select all tr elements (minus the first one, which is the header)
    table_elements = soup.select('tr')[1:]
    address_links = []
    for element in table_elements:
        children = element.contents  # get children of table element
        url = children[1].a['href']
        last_out_str = children[8].text
        # check to make sure the date field isn't empty
        if last_out_str != "":
            # load date into datetime object for comparison (second part is defining the layout of the date as years-months-days hour:minute:second timezone)
            last_out = datetime.strptime(last_out_str, "%Y-%m-%d %H:%M:%S %Z")
            # if check to see if the date is after 2020/1/1
            if last_out > after_date:
                address_links.append(url)

    for url in address_links:

        r = s.get(url)
        soup = bs(r.content, 'lxml')
        table = soup.find(id="table_maina")

        if table:
            item = soup.find('h1').text
            newitem = item.replace('Dogecoin', '')
            finalitem = newitem.replace('Address', '')

            for row in table.find_all('tr'):
                heads = row.find_all('th')
                if heads:
                    headers = [th.text for th in heads]
                else:
                    datarows.append([td.text for td in row.find_all('td')])

            fcsv = csv.writer(open(f'{finalitem}.csv', 'w', newline=''))
            fcsv.writerow(headers)
            fcsv.writerows(datarows)

How can Beautifulsoup scrape the pages inside this list of hyperlinks?

copy iconCopydownload iconDownload
import csv
import requests
from bs4 import BeautifulSoup as bs

headers = []
datarows = []

with requests.Session() as s:
    s.headers = {"User-Agent": "Safari/537.36"}
    r = s.get('https://bitinfocharts.com/top-100-richest-dogecoin-addresses-3.html')
    soup = bs(r.content, 'lxml')
    address_links = [i['href'] for i in soup.select('.table td:nth-child(2) > a')]
    
    for url in address_links:

        r = s.get(url)
        soup = bs(r.content, 'lxml')
        table = soup.find(id="table_maina")
        
        if table:
            item = soup.find('h1').text
            newitem = item.replace('Dogecoin','')
            finalitem = newitem.replace('Address','')

            for row in table.find_all('tr'):
                heads = row.find_all('th')
                if heads:
                    headers = [th.text for th in heads]
                else:
                    datarows.append([td.text for td in row.find_all('td')])

            fcsv = csv.writer(open(f'{finalitem}.csv', 'w', newline=''))
            fcsv.writerow(headers)
            fcsv.writerows(datarows)
        else:
            print('no table for: ', url)

See all related Code Snippets

Community Discussions

Trending Discussions on dogecoin
  • Cannot resolve jitpack dependencies in android studio in the last gradle version
  • Iterate through nested array of object in an Array of objects
  • JAVA how to convert JSONObject into a custom format?
  • Sort table rows by ASC, DESC (different type of content per column)
  • How to remove unexpected parameter and attribute errors while importing data for sentiment analysis from twitter?
  • Trying to create Dataframe from lists of zip using Pandas. wanted data table result
  • Dogecoin Address generation - Address not valid
  • I am saving BeautifulSoup results to CSV file with webpage title as filename, but the filename isn't the correct webpage title
  • How can I properly graph these two datasets using Pandas in Matplotlib?
  • BeautifulSoup Scraping Elements Containing Certain Date
Trending Discussions on dogecoin

QUESTION

Cannot resolve jitpack dependencies in android studio in the last gradle version

Asked 2022-Mar-24 at 13:48

I get Failed to resolve: com.github.dogecoin:libdohj:v0.15.9 error and I don't know why. I also tried other jitpack dependencies. It works fine in my previous projects.

buildscript {
    ext {
        compose_version = '1.0.2'
    }
    repositories {
        google()
        maven { url "https://jitpack.io" }
        mavenCentral()

    }

    dependencies {
        classpath "com.android.tools.build:gradle:7.0.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
        classpath "com.google.dagger:hilt-android-gradle-plugin:2.38.1"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

ANSWER

Answered 2021-Sep-26 at 23:29

I added the maven { url "https://jitpack.io" } to the settings.gradle and it fixed the issue.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven { url "https://jitpack.io" }

    }
}
rootProject.name = "Crypto World"
include ':app'

Source https://stackoverflow.com/questions/69330102

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install dogecoin

Please see the installation guide for information about installing Dogecoin Core.

Support

If you find a bug or experience issues with this software, please report it using the issue system. Please see the contribution guide to see how you can participate in the development of Dogecoin Core. There are often topics seeking help where your contributions will have high impact and get very appreciation. wow.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Consider Popular Cryptography Libraries
Try Top Libraries by dogecoin
Compare Cryptography Libraries with Highest Support
Compare Cryptography Libraries with Highest Quality
Compare Cryptography Libraries with Highest Security
Compare Cryptography Libraries with Permissive License
Compare Cryptography Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.