Muhammad-Rabieh / cryptoassets

recording your crypto assets with multi accounts
MIT License
0 stars 0 forks source link

GitHub go.mod Go version license build status

vue vue element-ui

Crypto Assets

中文

Recording your crypto assets with multi accounts

image

Let's start

Run this tool, it can record your assets automatic.

build with source code

install go

  • git clone https://github.com/goex-top/cryptoassets.git
  • git submodule update --init --recursive
  • go build

Run it

Add API KEY

add API KEY in setting view image

Config

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

API KEY store in database

Database

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

Data models

3 tables

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
);

Exchanges to support

Exchange Spot Future(Contract) Future(Swap) LOGO
BitMEX ☑️ ☑️ bitmex
Binance ☑️ ☑️ binance
OKEx ☑️ ☑️ ☑️ OKEx
Huobi ☑️ ☑️ huobipro
Poloniex ☑️ poloniex
Bitfinex ☑️ bitfinex
Bitstamp ☑️ bitstamp
Bittrex ☑️ bittrex
Bithumb ☑️ bithumb
GateIO ☑️ GateIO
ZB ☑️ zb
BigONE ☑️ BigONE
HitBTC ☑️ HitBTC

All assets in difference type of account per exchange will be merged

Rate

Update per 2 hours

Source code of frontend

If you want to modify frontend, please check out source code https://github.com/goex-top/cryptoassetsweb.git

Buy a coffee

You can buy a coffee to author if it helpful.

BTC: 3Ga5Lh6jW3h51QvRraeFdH6AgpgkxgedL8

ETH: 0x4ba3bffd3ac961de4a4030d9826f88becf745a89

一杯咖啡 一碗热干面