Package krakenapi provides access to the Kraken cryptocurrency exchange.
Package cryptotrader A cryptocurrency trader for all famous exchanges
Cryptick - A command line cryptocurrency price ticker. Copyright (C) 2017 Andrew Siegman This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Package utreexo is a “dynamic accumulator” for utxos. The original design is due to Tadge Dryja. See his talk at the 2019 MIT Bitcoin Expo: https://youtu.be/edRun-6ubCc. In a conventional cryptocurrency network like Bitcoin, all nodes on the network are obligated to maintain replicas of the “utxo set”: the ever-changing set of valid, unspent coins and their denominations. This allows each node independently to validate an attempt to spend a coin: the node simply checks whether the coin’s unique ID exists in its copy of the utxo set. But this means individual users can impose arbitrarily high costs on the entire network, simply by creating large numbers of low-denomination coins that everyone must track. The utreexo design places this tracking burden onto individual coin owners, instead of onto everyone else while still permitting everyone else to check the validity of spends. In a blockchain based on the utreexo design, nodes do not store all utxos. Instead, they store the root hashes of *perfectly full Merkle binary trees* of utxos. In a Merkle binary tree, each node is either a leaf or has a hash computed from its children. The root of such a tree thus _commits_ to the set of values it contains. The contents of the tree can’t be changed without altering the root hash. A perfectly full Merkle binary tree has 2^N leaves. Any number of utxos can be represented with at most one 2^N tree for different values of N. For instance, if there are 18 total utxos, this can be represented with a 16-item perfectly full tree and a 2-item perfectly full tree. Merkle trees permit the construction of _proofs of inclusion_ for the values represented in the tree. The proof consists of the set of neighbors needed, when climbing from a leaf toward the root, to recreate the hashes along the way. The proof must also indicate whether each neighbor is a lefthand or a righthand neighbor, for proper hashing. Checking such a proof amounts to calculating the chain of hashes and verifying that it ends up the same as the hash at the root of the tree. As a simple example, consider the Merkle tree with two leaves, A and B, and root hash R (made from combining then hashing A and B). The proof that A is in the tree is simply <B,right>. This is enough information for a verifier to compute R and affirm it matches the root of the tree. Similarly, the proof that B is in the tree is <A,left>. In a utreexo blockchain network, transactions do not merely specify the unique ID of the utxo they wish to spend: they must also specify its _proof_. This allows nodes in the network both to check the validity of the utxo and to make the necessary changes to the Merkle trees involved. Those changes involve removing the spent utxos and reordering things to maintain the invariant of zero-or-one perfectly full Merkle binary trees of each size. At first glance this might seem impossible, since the whole point of this design is that nodes no longer have to keep the full trees around, only their root hashes. As it happens, all the necessary information for reconstructing affected parts of the trees is contained in the proofs that transactions supply when spending utxos. The owners of the utxos do not merely take on the burden of storing their proofs: they must also keep them up to date as the blockchain’s set of perfectly full Merkle binary trees undergoes continuous transformation. Each update of the “utreexo” must therefore produce information that can be used to update those proofs, and an owner must ensure all such updates are applied to a utxo’s proof before trying to spend it. (However, as a service, a node may keep some number of those update records on hand, allowing it to update any stale proofs it receives before trying to apply them to the current utreexo.)
Package cryptotrader A cryptocurrency trader for all famous exchanges
Package gonano provides an implementation of the Nano cryptocurrency. It encapsulates all packages of the gonano project. See the 'nano' package for the actual Nano implementation.
Package dola provides cryptocurrency trading primitives: exchange integrations (via github.com/thrasher-corp/gocryptotrader), event-driven strategies, utilities and more. Holdings contains related functions / types The toolbelt is a set of helper functions that eases strategies and cross usage.
Package cryptotrader A cryptocurrency trader for all famous exchanges
Acoin is a cryptocurrency with the eventual goal of being the currency for an entire decentralized internet. What exactly makes cryptocurrency so secure? How is this better than a government controlled currency? Can it be hacked? Cryptocurrency is made up of things called transactions, that are stored in things called blocks, that are arranged into something called a blockchain. Let's put aside transactions for a second and focus on what blocks are, and what a blockchain is. A crypto block consists of two parts. A header and a body. A header simply contains some meta data about the block, such as, the timestamp of when it was created, it's 'hash' (we'll discuss in a second), the previous blocks 'hash', a target for the hash (explained soon), and something called a nonce (also explained). Let's start with what exactly a hash is. A hash function is a special function that takes in some data of any size, and returns some string of letters and numbers, that somehow correlate to that data. It's impossible to 'unhash' a hash, and the cool thing is that if I hash the same data, it will return the exact hash each time. So what exactly do hashes do for a block? Well in order to make sure that there are a finite amount of blocks, and to make sure you can't just create blocks instantly, there has to be some sort of work done to create a hash. Here's where a target comes in. A hash in reality is just a large number formatted in something called base 16. A target is a predefined number that must be greater than the hash. Therefore if I hash some data and the hash returned is larger than the target, my hash is invalid. So what do I do now? Simply rehash the same data, but this time add in a number starting at the value of 1. Each time the hash is larger than the target, increase the number (called a nonce) by 1, and try again. Eventually, the hash should be less than the target, and voila you "mined" a block. So we understand how to create a hash, what a target is, and what the nonce is. Why do we need a hash though, and what does the hash of the previous block have to do with the new block? The hash is the reference to the block, and since it takes time to be found, it ensures validity to the block. The reference to the previous block's hash, is in order to create our 'blockchain'. Block C references block B which references block A. This way we can always go back x steps in the chain, and verify each block. This ensures each block is verifiable and valid. So that's the header of a block, simply some data that validates the block. The data part of the block is also the part of the block that gets hashed when finding a valid hash. The data is a list of things called transactions, and we'll get into that right now. Transactions are the 'data' part of the block and they make up the currency part of crypto. Each transaction stores things called inputs and outputs. This is about to get complicated so bear with me, and we'll try to take it slow. Outputs store our 'coins', the actual currency we use. Inputs are just references to outputs, and they store some data about which output they reference. When an input references an output, it creates a new output that stores the 'coins' that previously were stored in the referenced output. For example, block A has a transaction with an output. The output 'belongs' to Kevin, and it is storing 5 coins. When Kevin decides to send Daniel 5 coins, a transaction is created. That transaction will now be inserted into the next mined block. Let's call that block B. The transaction on block B has an input that points to Block A's transaction output, where Kevin's 5 coins are stored. Once an output is referenced, it no longer can be used. So the transaction on block B creates a new output with 5 coins, and sets the owner to Daniel. Kevin can't access the coins on block A, since that output is referenced on block B. Daniel now has an open output with 5 coins that isn't referenced by any input, so he 'owns' 5 coins. So far, anyone who has the name Kevin can take the coins stored on block A, and send them around. In order to ensure each transaction is secured and legit, a 'wallet' is generated for kevin. A wallet is literally just 2 keys. A public key which becomes his 'address', and a private key which should be... private. Anything 'signed' with his private key, can be verified to be his, using his 'address' or public key. When someone wants to send the coins belonging to Kevin, he must sign the coins using Kevin's private key. If the private key is invalid, then the transaction is not processed. Daniel does not need to input his private key for the transfer, only the one who owns the coins must input his private key. This ensures privacy while at the same time makes transferring easy and simply. When people use the term proof of work, it simply means finding a hash for a block, that is less than the given target.
Package gonano provides an implementation of the Nano cryptocurrency. It encapsulates all packages of the gonano project. See the 'nano' package for the actual Nano implementation.
CoinPrices is a utility to fetch cryptocurrency prices. Usage: By default, the prices are displayed in USD and the number of cryptocurrencies is limited to 10. Valid currencies are: USD, AUD, BRL, BGN, CAD, CHF, CLP, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PKR, PLN, RUB, SEK, SGD, THB, TRY, TWD, ZAR. The data is obtained from [CoinMarketCap API](https://coinmarketcap.com/api/) and the quotes are refreshed every 5 minutes.
Package gonano provides an implementation of the Nano cryptocurrency. It encapsulates all packages of the gonano project. See the 'nano' package for the actual Nano implementation.
CoinPrices is a utility to fetch cryptocurrency prices. Usage: By default, the prices are displayed in USD and the number of cryptocurrencies is limited to 10. Valid currencies are: USD, AUD, BRL, BGN, CAD, CHF, CLP, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PKR, PLN, RUB, SEK, SGD, THB, TRY, TWD, ZAR. The data is obtained from [CoinMarketCap API](https://coinmarketcap.com/api/) and the quotes are refreshed every 5 minutes.
CoinPrices is a utility to fetch cryptocurrency prices. Usage: By default, the prices are displayed in USD and the number of cryptocurrencies is limited to 10. Valid currencies are: USD, AUD, BRL, BGN, CAD, CHF, CLP, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PKR, PLN, RUB, SEK, SGD, THB, TRY, TWD, ZAR. The data is obtained from [CoinMarketCap API](https://coinmarketcap.com/api/) and the quotes are refreshed every 5 minutes.
Lotter is a command-line tool that works with trade data in `ledger-cli` format. While `ledger-cli` is a fantastic calculator for double-entry accounting, its support for lots, cost basis, and gains is rather limited. This tool is meant to provide features which (to the best of my knowledge) `ledger-cli` does not provide on its own. To best understand `lotter`, it is recommended to first be familiar with [`ledger-cli`](https://www.ledger-cli.org/3.0/doc/ledger3.html). Also, read background articles ["Multiple Currencies with Currency Trading Accounts"](https://github.com/ledger/ledger/wiki/Multiple-currencies-with-currency-trading-accounts), and Peter Selinger's ["Tutorial on Multiple Currency Accounting"](https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html). Use `lotter` by first entering trade information into `ledger-cli`. Run `lotter` to add "lot" information, which enables `ledger-cli` to calculate cost basis and gains. Let's say you purchased a cryptocurrency (we'll call it ABC), when it cost 2 cents. A `ledger-cli` entry could look like: Later, ABC trades at $1, and you sell some. In `ledger-cli`: The idea of `lotter` is to add "splits" to these ledger entries. The added information captures the cost basis when a "lot" is created, and gains (losses) when inventory from a lot is sold. After `lotter`, the ledger entries look like: If your wondering why the last line ("long term gain") shows a negative number, when the actual gain is a positive 98 cents, recall that in `ledger-cli`'s double-entry method, income is expressed in negative numbers while expenses are positive. Similarly in `lotter`, lot inventory and gain are negative numbers, cost basis is positive. This follows `ledger-cli`'s rules, and makes `lotter`'s splits net zero. The transactions described above are in `testdata/simple.ledger`. To see the effects of `lotter` on these transactions, compare the normal use of `ledger-cli`, with the effects of `lotter`, Usage: The base operation modifies transaction splits, converting costs and amounts into the _base_ currency. This is intended to be a pre-processor for the **lot** operation, allowing trades to be accounted for in terms of the _base_ currency, even when the trades are for other currencies. This operation observes prices in the ledger file. When a split has a cost expressed in a currency other than _base_, and a price conversion to _base_ is available on the same day as the transaction, this operation rewrites the transaction splits converting the original cost currency into the _base_. Usage: The `lot` operation adds "splits" to transactions, representing lot inventory, cost basis, and gains. Each lot is a `ledger-cli` "account", named by convention with prefix "Lot", followed by the date the lot was created, and inventory and cost information. This naming convention is intended to provide unique lot names. (It could fail to do so, if multiple purchases occur on the same day, for the same amount and cost.) `lotter` considers a transaction to be a purchase when it finds a split for a positive amount, with cost information associated with it. When constructing your ledger entries, use for example "100 ABC @ 0.02 USD" or "100 ABC @@ 2 USD". Similarly, `lotter` considers a transaction to be a sale when the amount is negative and has a cost associated. To these transactions, `lotter` adds splits that "consume" inventory (and basis) acquired earlier. To see options available, run `lotter help lot`.
Package krakenapi provides access to the Kraken cryptocurrency exchange.
Package dola provides cryptocurrency trading primitives: exchange integrations (via github.com/thrasher-corp/gocryptotrader), event-driven strategies, utilities and more. The toolbelt is a set of helper functions that eases strategies and cross usage.
Package client provides a thin-wrapper of the Katzenpost client library for cryptocurrency transactions.
Saad Shafiq 20i-1793 Blockchain and Cryptocurrency section A
Package stocks is defining a Go package named `stocks`. This package can contain functions, variables, and other Go code that can be used to work with stocks and financial data. Package stocks is defining a Go package named "stocks" that contains functions for retrieving and processing stock data from Yahoo Finance API. Package stocks is defining a Go package named "stocks" which contains various types and structs related to financial data for stocks and cryptocurrencies.
Package stocks is defining a Go package named `stocks`. This package can contain functions, variables, and other Go code that can be used to work with stocks and financial data. Package stocks is defining a Go package named "stocks" that contains functions for retrieving and processing stock data from Yahoo Finance API. Package stocks is defining a Go package named "stocks" which contains various types and structs related to financial data for stocks and cryptocurrencies.