Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
v0.4.0 (#24)
Browse files Browse the repository at this point in the history
* Adjusted the ROI metric to use profit and bankroll instead of volume

* Added the metric calculation to average profit

* Version up, fix for pair by date, removed bad deal data

- the database stored failed / cancelled deals. Discovered that a ton of the metrics from this were inaccurate for cancelled deals, removing since they don't seem to be needed right now
- changed from `actual_profit` to `final_usd_profit` on a few calcs since the actual_profit doesn't show what you'd expect
- added API docs
- Changed number parsing from 3 decimals to 2

* Better deals table coloring, two decimals on percent / profit by day

* Updated profit by X to show days of the filter, not days returned by the db

* Huge style upgrade, kpis, and bug fixes

- Changed update button to just a refresh icon
- Modified all the KPIs to display relevant data and take up the screen size better
- Fixed some padding issues around the app
- TONS of UI updates across the entire app
- Profit by day chart now starts at 0
- KPIs are relevant to the page now

* Fixed left / right align issues on pill

* Vertical charts, removed extra class names

* Adjusted deal table fonts

* Initial build of the coins header

* Additional updates to the auto refresh coin data and changelog

* updated the version number

* Cleanup (#19)

* simplifying bool

* redundant local variables

* Use ES6 standards

* remove unused references

* remove unused file

* remove unused symbols

* some more cleanups

* console.log -> console.error

* Final changes to PR before merge

- Updated the chart functions to use TS default values
- Removed additional unneeded code
- Fixed bug in rounding of time string.
- Removed some of the ts-ignores

Co-authored-by: coltoneshaw <[email protected]>

* Fixed styles for coin price header and background

* load widget after TV has been loaded (#20)

* Fixed theme of the TV charts

* Added the update API, update banner, and logic on showing the banner

* change secret field type to password (#22)

* Cleaning up else statements (#21)

* else what?!

* Changes before PR merge. Additional if checking

Co-authored-by: coltoneshaw <[email protected]>

* switched to Github api for release checks

* Added SO to the deal so utilization chart

* added avg profit per deal to the bot performance chart

* Changed update header color

* Updated the change log

* Updated the changelog so it now shows and updates a version within the config.json

* Fixed some coloring across new price model and charts

* Fix since if the manual SO fills 3C will update the max SO properly

* Added handling of number length on the active deals table

* Fixed potential undef in coin data, updated changelog

Co-authored-by: Julien Tant <[email protected]>
  • Loading branch information
coltoneshaw and JulienTant authored Sep 8, 2021
1 parent d272e5e commit c8a62e3
Show file tree
Hide file tree
Showing 86 changed files with 2,278 additions and 1,745 deletions.
78 changes: 78 additions & 0 deletions 3Commas_API_Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,81 @@ Response:
]
```

# Deals Endpoint

```javascript
{
id: 1
type: Deal::ShortDeal
bot_id: 111
max_safety_orders: 2
deal_has_error: true
from_currency_id: 5 DEPRECATED
to_currency_id: 10 DEPRECATED
account_id: 121
active_safety_orders_count: 1
created_at: 2018-08-08 08:08:08
updated_at: 2018-09-09 09:09:09
closed_at: 2018-10-10 10:10:10
finished?:
current_active_safety_orders_count: 1
current_active_safety_orders: 1 DEPRECATED
completed_safety_orders_count: 2 completed safeties (not including manual)
completed_manual_safety_orders_count: 2 completed manual safeties
cancellable?:
panic_sellable?:
trailing_enabled: true
tsl_enabled: true
stop_loss_timeout_enabled: true
stop_loss_timeout_in_seconds: 2
active_manual_safety_orders: 2
pair: 'BTC_ADA' Format: QUOTE_BASE
status: 'failed' Values: created, base_order_placed, bought, cancelled, completed, failed, panic_sell_pending, panic_sell_order_placed, panic_sold, cancel_pending, stop_loss_pending, stop_loss_finished, stop_loss_order_placed, switched, switched_take_profit, ttp_activated, ttp_order_placed, liquidated, bought_safety_pending, bought_take_profit_pending, settled
localized_status:
take_profit: '1.23' Percentage
base_order_volume: '0.001'
safety_order_volume: '0.0015'
safety_order_step_percentage: '1.11'
leverage_type: 'isolated'
leverage_custom_value: '20.1'
bought_amount: '1.5'
bought_volume: '150'
bought_average_price: '100'
base_order_average_price: '100'
sold_amount: '1.5'
sold_volume: '150'
sold_average_price: '100'
take_profit_type: 'base' Values: base, total
final_profit: '-0.00051'
martingale_coefficient: '1.2' Percentage
martingale_volume_coefficient: '1.0' Percentage
martingale_step_coefficient: '1.0' Percentage
stop_loss_percentage: '3.6'
error_message: 'Error placing base order'
profit_currency: 'quote_currency' Values: quote_currency, base_currency
stop_loss_type: 'stop_loss' Values: stop_loss, stop_loss_and_disable_bot
safety_order_volume_type: 'quote_currency'Values: quote_currency, base_currency, percent, xbt
base_order_volume_type: 'base_currency,' Values: quote_currency, base_currency, percent, xbt
from_currency: 'BTC'
to_currency: 'ADA'
current_price: '102'
take_profit_price: '105'
stop_loss_price: '95.3'
final_profit_percentage: '4.2'
actual_profit_percentage: '3.4'
bot_name: My bot
account_name: My Account
usd_final_profit: '3.3523452' // Use this metric for calculating stats.
actual_profit: '0.0023'
actual_usd_profit: '0.0023' // This value will show a value, even if the deal is cancelled / failed. Do not use this field for metric calculations. This may be tied to the coin somehow...
failed_message: Failed
reserved_base_coin: 1.3423523
reserved_second_coin: 0.1412454
trailing_deviation: 0.14
trailing_max_price: 0.1412454 Highest price met in case of long deal, lowest price otherwise
tsl_max_price: 0.1412454 Highest price met in TSL in case of long deal, lowest price otherwise
strategy: 'short' short or long
reserved_quote_funds: Sum of reserved in active deals funds in QUOTE
reserved_base_funds: Sum of reserved in active deals funds in BASE
}
```
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# v0.4.0
## New Features
- Added a coin header where you can customize the coins that are tracked on a 5 second refresh.
- Update notifications that prompt you to download when you're not on the latest release!
- Added SO number to the Deal SO Utilization chart.

## Enhancements
- Redo of the entire layout of active deals, and stats.
- Changed the ROI metric from ROI on bought volume to ROI from total profit and bankroll.
- Active Deal pills now are colored based on if that metric is positive, not the deal itself.
- New Table fonts for easier viewing of financial data.
- Adjusted KPIs to be relevant to the page active.
- Adjusted quite a few metrics from three decimals to two.
- Adjusted the bot / pair charts to be vertical charts.
- Added the average line value on profit by day.
- API key is not a secret instead of text field.
- Massive backend code enhancements thanks to @TontonAo!
- Added Average profit per deal to the bot performance chart.
- Adjusted number length on the active deals table


## Bug
- Fixed bug in how the pair by date was calculated. This was using `actual_profit` from 3C which returns the profit if you never sold the coin
- Profit by day chart removed days with 0 profit, added these back.
- Fixed bug where the TA chart would not load on the first click, additionally fixed the theme of the charts.



# v0.3.0
## Bug
- Fixed bug in the date display that caused dates to show as an invalid Date
Expand Down
Loading

0 comments on commit c8a62e3

Please sign in to comment.