Recording your crypto assets with multi accounts
Run this tool, it can record your assets automatic.
git clone https://github.com/goex-top/cryptoassets.git
git submodule update --init --recursive
go build
./cryptoassets
- open brower http://localhost:9000
- input username and password which in
config.toml
file
create a config file, config.toml
, using cp sample-config.toml config.toml
, then modify it with followed description
proxy="" # socks5://127.0.0.1:1080
freq=60 # unit: second, 60 for 1min
debug = true # enable / disable verbase log print
[user]
username="admin" # username for login
password="AbcdEfgh" # password for login and encrypts and decrypts your apiseckey to store in database
- When a user creates an exchange, the security key / passhase key will be encrypted by AES (ECB) and stored in the database. Remember the password in the toml configuration file. This password is the only password to decrypt the key in the database.
- Try to create a read-only API KEY
ORM using GORM, support MySQL
, PostgreSQL
, Sqlite3
, SQL Server
Currently sqlite3
is used, it can create sqlite3
file automatically, CONVENIENCE, you can copy it to everywhere
3 tables
- account
- store all API KEY of all exchanges
- assets history. Total assets of each exchange, stored at regular intervals (based on freq in the configuration)
- total valuation of BTC, USD, USDT and CNY
- coin assets history. All coin asset history for all exchanges
- coin valuation of BTC, USD, USDT and CNY
CREATE TABLE accounts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
nick_name VARCHAR (255) UNIQUE,
exchange_name VARCHAR (255),
api_key VARCHAR (255),
api_secret_key VARCHAR (255),
api_passphrase VARCHAR (255),
last_update_time BIGINT
);
CREATE TABLE assets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
account_id INTEGER,
btc REAL,
usdt REAL,
usd REAL,
cny REAL,
btc_usdt REAL,
btc_usd REAL,
btc_cny REAL,
usdt_usd REAL,
usdt_cny REAL,
usd_cny REAL
);
CREATE TABLE coin_assets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at DATETIME,
updated_at DATETIME,
deleted_at DATETIME,
asset_id INTEGER,
coin_name VARCHAR (255),
amount REAL,
frozen_amount REAL,
btc REAL,
usdt REAL,
usd REAL,
cny REAL
);
Exchange | Spot | Future(Contract) | Future(Swap) | LOGO |
---|---|---|---|---|
BitMEX | ☑️ | ☑️ | ||
Binance | ☑️ | ☑️ | ||
OKEx | ☑️ | ☑️ | ☑️ | |
Huobi | ☑️ | ☑️ | ||
Poloniex | ☑️ | |||
Bitfinex | ☑️ | |||
Bitstamp | ☑️ | |||
Bittrex | ☑️ | |||
Bithumb | ☑️ | |||
GateIO | ☑️ | |||
ZB | ☑️ | |||
BigONE | ☑️ | |||
HitBTC | ☑️ |
All assets in difference type of account per exchange will be merged
- USD/CNY fetch from finance of yahoo
- USDT/USD fetch fromBinance US
- BTC/USD fetch fromBinance US
Update per 2 hours
If you want to modify frontend, please check out source code https://github.com/goex-top/cryptoassetsweb.git
You can buy a coffee to author if it helpful.
BTC: 3Ga5Lh6jW3h51QvRraeFdH6AgpgkxgedL8
ETH: 0x4ba3bffd3ac961de4a4030d9826f88becf745a89