Code Monkey home page Code Monkey logo

workbench's Issues

Logger for dev env

Hey @rupurt.
Thanks for the outstanding library.
I'm wondering, any specific reason to not have default logger for dev env?

Balance is not showing up when there are missing products

Hey @rupurt.

The dashboard is not showing balance for missing products for default dev config.
For my case, the solution is to add etc_usdt to products of binance and okex.

I'm wondering, how to make it user-friendly? I see several options:

  • Display appropriate error in the logs and don't show balance. E.g Missing #{product} in the #{venue} venue. Please add it in order to show the balance.
  • Filter out invalid values and show balance
  • Display the error and show balance

I'd be happy to apply any solution.

WDYT?

Example

iex> config = %Workbench.BalanceSnapshots.Config{
  boot_delay_ms: 10000,
  btc_usd_symbol: :btc_usdt,
  btc_usd_venue: :okex,
  enabled: true,
  every_ms: 10000,
  quote_pairs: [binance: :usdt, okex: :usdt],
  usd_quote_asset: :usdt,
  usd_quote_venue: :okex
}


iex> Tai.Venues.AccountStore.all()
[
  %Tai.Venues.Account{
    asset: :btc,
    credential_id: :main,
    equity: #Decimal<0>,
    free: #Decimal<0>,
    locked: #Decimal<0>,
    type: "futures",
    venue_id: :okex
  },
  %Tai.Venues.Account{
    asset: :btc,
    credential_id: :main,
    equity: #Decimal<0>,
    free: #Decimal<0>,
    locked: #Decimal<0>,
    type: "swap",
    venue_id: :okex
  },
  %Tai.Venues.Account{
    asset: :etc,
    credential_id: :main,
    equity: #Decimal<0>,
    free: #Decimal<0>,
    locked: #Decimal<0>,
    type: "swap",
    venue_id: :okex
  }
]

iex> Workbench.BalanceSnapshots.Snapshot.create(config)
{:error, [{:binance, :etc_usdt, :not_found}, {:okex, :etc_usdt, :not_found}]}

Build release in Dockerfile

I had a look at the Dockerfile and I suggest using mix release instead of copying everything and building.
I can do it, tell me if that's interesting you.

I also suggest publishing a version to hub.docker.com for ARM and x86.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.