Coinmarketcap 控制台客户端跟踪您的加密货币交易。
项目描述
硬币表
用法| 截图| 特点| 专栏| 配置| 选项| API | 要求| 执照
Coinwatch 是一个低依赖的基于 python 的控制台客户端客户端,用于跟踪您的加密交易并轻松让您查看您是赢还是输。
您所要做的就是输入您的所有购买:何时,多少硬币和每枚硬币的价格。然后每次启动时coinwatch,它都会显示您当前的状态,让您高兴或难过。
用法
# Default run
coinwatch
# Specify different profile/config
coinwatch -c ~/path/to/conf.yml
# Different columns and order
coinwatch -r "name buyprice nowprice wealth invest profit"
coinwatch -r "name date nowprice wealth profit percent"
# Specify sort and order
coinwatch -s profit -o desc
# Sort and group by name
coinwatch -s name -g name
# Disable colorized output
coinwatch -n
# Different table border
coinwatch -t ascii
coinwatch -t thin
coinwatch -t thick
# Alternative number format
coinwatch -h
# Text output wrapped in watch
watch --interval=10 'coinwatch -n'
截图
该示例显示了备用配置文件的用法。
该示例显示了另一种数字格式
该示例显示了它在文本模式下的外观
watch该示例显示了每 10 秒包裹并刷新一次
的 coinwatch 。
特征
- 跟踪您的所有交易
- 交易按每种加密货币分组
- 通过指定不同的配置文件可以使用不同的交易配置文件
- 基于纯文本的输出可用于在其他工具中进行进一步处理
列
coinwatch提供了许多可以按任何顺序显示的列。在不显示所有列的配置文件中设置了合理的有限默认值。coinwatch您可以直接在配置文件中随意更改并调整您的需求(请参阅配置)或通过命令参数 ( ) 快速启用/禁用列-r。排序、排序和分组也适用于未显示的列。看看下表,它显示了所有可用的列:
| 列名 | 默认显示 | 描述 |
|---|---|---|
name |
不 | 加密货币的名称。 |
symbol |
是的 | 加密货币的缩写名称。 |
buyprice |
是的 | 买入货币的美元价格。 |
diffprice |
是的 | 购买时间和现在之间的美元价格差异。 |
nowprice |
是的 | 货币的美元当前价格。 |
amount |
是的 | 您购买的硬币总数。 |
invest |
是的 | 您为购买的所有硬币投资的美元总额。 |
wealth |
是的 | 您的硬币现在价值的当前美元金额。 |
profit |
是的 | 您使用该货币赚取了多少美元利润。 |
percent |
是的 | 购买时间和现在之间的利润百分比。 |
percent1h |
不 | 该货币最后一小时的价格变化百分比。 |
percent24h |
不 | 该货币在过去 24 小时内的价格变化百分比。 |
percent7d |
不 | 该货币最近 7 天的价格变化百分比。 |
vol_24h |
不 | 过去 24 小时内的美元交易量。 |
marketcap |
不 | 市场容量以美元计。 |
supply_a |
不 | 目前可用的硬币供应。 |
supply_t |
不 | 硬币的总供应量。 |
supply_m |
不 | 硬币的最大供应量。 |
cust1 |
不 | 自定义字段(请参阅配置) |
cust2 |
不 | 自定义字段(请参阅配置) |
cust3 |
不 | 自定义字段(请参阅配置) |
关于自定义字段的注意事项:
自定义字段的标题和列宽可以在配置文件中设置。值本身可以添加到您的交易数组中,并且可以包含您希望为给定交易显示的任何信息。例如,它们可能包含以下信息:
- 你在什么日期购买了该货币
- 您在哪个市场购买了该货币
- 硬币所在的钱包地址
- 硬币是否仍然在线或已下载到冷钱包
配置
首次启动coinwatch时,它将在其中创建一个默认配置文件~/.config/coinwatch/config.yml,无需观看任何交易。要快速了解一下,请查看示例配置。
配置以 yaml 格式完成。如果您以前从未听说过 yaml,请查看其官方示例:http: //yaml.org/start.html
结构
配置文件是这样构建的:
# Configure coinwatch
config:
# Specify the default column to sort this table by or leave empty for unsorted.
# Overwrite via -s <column>
sort:
# Specify the sort order (asc or desc)
# Overwrite via -o desc
order: asc
# Configure what columns to display and in what order.
# To see all available columns view help: $ coinwatch --help
# Columns specified via command line (-r) take precedence
#
# There are also three other columns which are off by default: 'cust1', 'cust2' and 'cust3'.
# Enable them here or via (-r).
# Those three columns can be added to your trades in order to display custom information,
# such as which market they were bought from or on what date they were bought.
columns: name symbol date buyprice diffprice nowprice amount invest wealth profit percent
# Define your custom columns here.
# Set column headline and width.
cust:
cust1:
headline: BUY DATE
width: 10
cust2:
headline: MARKET
width: 10
cust3:
headline: EXAMPLE
width: 10
# Specify your table border style
# Available values: thin, thick and ascii
# Use ascii if you want to further process the output of this application
table: thin
# Configure your purchases
trades:
# CURRENCY_ID is found by looking up the 'id' key from
# https://api.coinmarketcap.com/v1/ticker/?limit=0
CURRENCY_ID: # <-- [array] Each currency will hold a list of trades
- amount: # <-- [decimal] [1] How many coins for that currency were bought
invest: # <-- [decimal] [1] How much money in total was invested
price: # <-- [decimal] [1] Price for 1 coin of that currency
cust1: # <-- [string] Custom column
cust2: # <-- [string] Custom column
cust3: # <-- [string] Custom column
[1] amount,invest同时price?是的,没错,存在重复,但是始终只能同时指定这三个中的两个。这使您可以以三种不同的方式记录您的交易:
选项1:金额和投资
你买了多少硬币,总共花了多少钱?
此选项在进行实际购买时最有用。输入花费的总金额和收到的硬币。这样您就不必自己计算任何市场费用或交易费用。
# Bought 0.4 coins
# Total cost of that: 3742.35 $
trades:
bitcoin:
- amount: 0.4
invest: 3742.35
选项2:数量和价格
你买了多少硬币,一枚硬币多少钱?
此选项在进行模拟交易时最有用 -如果. 输入您以每枚硬币的价格购买了多少枚硬币。
# Bought 0.4 coins
# 1 Bitcoin had a price of: 9355.875 $
trades:
bitcoin:
- amount: 0.4
price: 9355.875
选项3:投资和定价
你总共花了多少钱,一枚硬币花了多少钱?
此选项在进行模拟交易时最有用 -如果. 输入你会花多少钱以及每枚硬币的价格是多少。
# Total cost of that: 3742.35 $
# 1 Bitcoin had a price of: 9355.875 $
trades:
bitcoin:
- invest: 3742.35
price: 9355.875
获取货币名称
添加新的加密货币时,您需要确保使用正确的名称添加到配置文件中。可以从https://api.coinmarketcap.com/v1/ticker/?limit=0检索名称。
| 截屏 | 解释 |
|---|---|
访问 coinmarketcap API 页面时,查找id货币字段并使用其值添加到配置文件中。如果您想添加以太坊和比特币,如示例屏幕截图所示,您可以使用 ethereum和bitcoin作为名称放入配置文件中。 |
例子
示例文件可能如下所示。它显示了三个比特币交易(每个不同的选项来指定你的购买),一个以太坊交易和一个用于 iota 的空占位符。指定空数组时,它仅作为提醒您稍后填写,不会显示在统计信息中。
此外,还配置了两个自定义字段以向每笔交易添加更多信息。它用于显示购买日期以及购买的市场。然后为了实际显示这些列,columns配置已更改为也添加这两个字段。
config:
columns: name symbol cust1 cust2 buyprice diffprice nowprice amount invest wealth profit percent
cust:
cust1:
headline: BUY DATE
width: 01
cust2:
headline: MARKET
width: 10
trades:
bitcoin:
# Option-1: Invested 500.00$ and got 0.0425 coins
- amount: 0.4
invest: 3742.35
cust1: 2017-12-03
cust2: binance
# Option-2: bought at 10,010.50 and bought 0.5 coins
- amount: 0.4
price: 9355.875
cust1: 2017-12-04
cust2: binance
# Option-3: invested 500.00$ at 11,043.12 price/coin
- invest: 3742.35
price: 9355.875
cust1: 2017-12-05
cust2: binance
ethereum:
- amount: 20
price: 1070
date: 2017-12-05
# Note in this case 'iota' is defined as an empty array
# and will not be shown in the stats.
iota: []
以下不显示任何交易,但它可能会提醒您稍后实际交易并且已经拥有该信息:
trades:
bitcoin: []
ripple: []
cardano: []
iota: []
qtum: []
omisego: []
选项
这显示了 的输出coinwawtch --help。
Usage: coinwatch [-crtnhv]
coinwatch [--help]
coinwatch [--version]
coinwatch is a low-dependency python[23] client to keep track of your crypto trades
and easily lets you see if you are winning or losing.
OPTIONS:
-c, --config Specify path of an alternative configuration file.
Examples:
-c path/to/conf.yml
-r, --row Specify the order and columns to use in a row.
In case you dont need all columns to be shown or want
a different order of columns, use this argument to specify it.
Examples:
-r "name date profit percent"
-r "name buyprice nowprice amount wealth"
Default:
-r "name symbol date buyprice nowprice amount invest wealth profit percent"
-s, --sort Specify the column name to sort this table.
See above for available columns.
The table can also be sorted against columns that are not displayed.
The default is unsorted.
-o, --order Specify the sorting order.
Valid orders: 'asc' and 'desc'.
The default order is 'asc'.
-g, --group Group by column name (visually).
Grouping is applied after sorting and only equal vertical rows of
the specified group column are grouped.
-t, --table Specify different table border.
Available values: 'thin', 'thick' and 'ascii'.
The default is 'thin'.
In case you need to process the output of this tool use 'ascii'.
Examples:
-t thin
-t thick
-t ascii
-n, --nocolor Disable shell colors. This is useful if you want to further
process the output of this program.
-h, --human Alternative human readable number format.
-v, --verbose Be verbose.
NOTE:
No financial aid, support or any other recommendation is provided.
Trade at your own risk! And only invest what you can effort to lose.
API:
Currently supported remote price and coin APIs are:
- coinmarketcap
CONFIGURATION:
When starting coinwatch for the first time a base configuration file will be
created in ~/.config/coinwatch/config.yml.
You should edit this file and add your trades:
- What currency
- When bought
- How much bought
- Price for 1 coin of currency at that date
API
当前支持的远程 API 有:
要求
coinwatch本身需要PyYaml. 除此之外,只需要以下 Python 版本之一:
- Python 2.7(需要
futurePython 3 兼容) - 蟒蛇 3.2
- 蟒蛇 3.3
- 蟒蛇 3.4
- 蟒蛇 3.5
- 蟒蛇 3.6
执照
版权所有 (c) 2018 cytopia
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。