Giter Site home page Giter Site logo

bogdantimes / trading-helper Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 6.0 7.43 MB

Simple to use and secure autonomous trading bot with WEB application.

Home Page: https://www.trading-helper.click/

License: MIT License

TypeScript 94.30% HTML 5.24% Shell 0.04% JavaScript 0.43%
automation binance bot crypto cryptocurrency google-apps-script trading bitcoin trading-bot tradinghelper

trading-helper's People

Contributors

arthedza avatar bogdantimes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

trading-helper's Issues

Regression in profit and commission calc

Debug msgs:

Bought

"{\"symbol\":\"KNCUSDT\",\"orderId\":333848539,\"orderListId\":-1,\"clientOrderId\":\"6D6ib3METsKhO12rV2jIna\",\"transactTime\":1651001137835,\"price\":\"0.00000000\",\"origQty\":\"48.40000000\",\"executedQty\":\"48.40000000\",\"cummulativeQuoteQty\":\"249.93760000\",\"status\":\"FILLED\",\"timeInForce\":\"GTC\",\"type\":\"MARKET\",\"side\":\"BUY\",\"fills\":[{\"price\":\"5.16400000\",\"qty\":\"48.40000000\",\"commission\":\"0.00048498\",\"commissionAsset\":\"BNB\",\"tradeId\":25524409}]}"

Sold

"{\"symbol\":\"KNCUSDT\",\"orderId\":334040960,\"orderListId\":-1,\"clientOrderId\":\"YRPWjV2SdkOie9jgDkOgIj\",\"transactTime\":1651007989734,\"price\":\"0.00000000\",\"origQty\":\"48.40000000\",\"executedQty\":\"48.40000000\",\"cummulativeQuoteQty\":\"255.68040000\",\"status\":\"FILLED\",\"timeInForce\":\"GTC\",\"type\":\"MARKET\",\"side\":\"SELL\",\"fills\":[{\"price\":\"5.28300000\",\"qty\":\"40.00000000\",\"commission\":\"0.00041027\",\"commissionAsset\":\"BNB\",\"tradeId\":25537438},{\"price\":\"5.28100000\",\"qty\":\"8.40000000\",\"commission\":\"0.00008612\",\"commissionAsset\":\"BNB\",\"tradeId\":25537439}]}"

Result:

Selling 48.4 of KNCUSDT
KNCUSDT: Sold. => price=5.282  gained=255.6804 profit=255.49

If BNB is present in the assets and fee was paid using BNB - update it's balance

Description

Same applies to any other swap, when gained or paid cryptocurrency is present in the current Assets and the paid or gained quantity has to be removed or added from the balance of the tracked asset.

Take for example the following real life situation, steps:

  1. USDC bought using USDT
  2. Stable Coin switched to USDC in the Settings
  3. ETH bought using USDC

Expected:
USDC quantity in the Assets should be reduced by the amount paid for ETH.

In the BNB case, if BNB is present - the fee should be reduced from it's balance,
if BNB is not present in the assets, but fee was paid using BNB, the fee should be converted to stable coin price and reduced from the calculated profit.

In some cases changing asset name (for example EPS -> EPX) can cause a corrupted state

Description

A pretty rare case, but,
If you make editing with coin name renaming, and background Process is running,
during editing, an old asset is removed,
but because the changeTrade API is returning an empty TradeMemo for non-existing anymore asset,
the Process can re-create an asset that was removed, and it will be in an incorrect/broken state.

Feature: Profit based Stop Limit

Description

/**
   * When ProfitBasedStopLimit is true - a stop limit for each asset is calculated based on the total profit of the tool.
   * All profit is divided equally between all assets and this amount is how much loss is allowed for each asset.
   * Such stop limits are always recalculated when the total profit or number of assets changes.
   * Overrides {@link StopLimit}.
   */

Alerts for crossing profit limit are repeated

When price crosses up the profit limit, the alert is sent.
Noticed that the alert is sent repeatedly a few more times, although the price seems to be above the profit limit already, e.g. no crossing up happened again.

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.