Skip to content

Commit

Permalink
V0.4.1 (coltoneshaw#32)
Browse files Browse the repository at this point in the history
* Style updates for the active deals table

* Fixed label wrapping on bot perf charts

* Fixed hover on darkmode button

* Initial try of the signed mac os app plus fixed with active deal numbers

* Fixed but where MSTC would be less than active + completed, causing a miscalc

This issue goes deeper than the 3cpm. It seems to be directly in 3C. You can set MSTC to 0 while still having an active SO on the exchange. What this means is in the calc before the active SO was ignored completely. This now will find the highest and use that as the total SOs. It's not a perfect fix, but in testing this made the mstc correct and the metrics matched.

github issue - 3commas-io/3commas-official-api-docs#93

This may need further work to build in manual SOs.

* Updated the manual SO count metric - coltoneshaw#29

This metric coming from 3C can have the wrong data coming from it for `completed_manual_safety_orders`. This leads to a skew in the metric view on Active deals themselves. Went the route of updating the same value with the database. Long term when redoing the api calls this will need to be looked at.

* Adding a custom menu bar with links.

* Updating readme with FAQ, API docs, and the changelog

* Fixed inactive funds calc for bots

the way 3C returns the data it's possible for max_active_deals to be lower than active_deals_count. This causes an negative value to be introduced and skew the metrics.

* Fixed bug in card causing an findDOMNode error with the day profit

* Updated changelog

* add key to the coin listing to remove react warning (coltoneshaw#30)

Co-authored-by: Julien Tant <[email protected]>
  • Loading branch information
coltoneshaw and JulienTant authored Sep 10, 2021
1 parent c8a62e3 commit 6cce857
Show file tree
Hide file tree
Showing 20 changed files with 613 additions and 321 deletions.
46 changes: 42 additions & 4 deletions 3Commas_API_Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ deal_has_error: true
from_currency_id: 5 DEPRECATED
to_currency_id: 10 DEPRECATED
account_id: 121
active_safety_orders_count: 1
active_safety_orders_count: 1 // This will return the current bot settings
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_count: 1 // Actual current active SOs
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
completed_manual_safety_orders_count: 2 // This value includes any manual SOs placed, regardless of the status.
cancellable?:
panic_sellable?:
trailing_enabled: true
Expand Down Expand Up @@ -167,4 +167,42 @@ 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
}
```
```

## Market orders

Endpoint: `GET /ver1/deals/{deal_id}/market_orders`



```javascript
[
{
"order_id": "MATICUSD_166773403",
"order_type": "BUY",
"deal_order_type": "Manual Safety",
"cancellable": false,
"status_string": "Filled",
"created_at": "2021-09-08T23:08:13.796Z",
"updated_at": "2021-09-08T23:08:13.830Z",
"quantity": "2490.0",
"quantity_remaining": "0.0",
"total": "3376.4804625",
"rate": "1.357",
"average_price": "1.355"
},
{
"order_id": "MATICUSD_166772169",
"order_type": "BUY",
"deal_order_type": "Manual Safety",
"cancellable": false,
"status_string": "Cancelled",
"created_at": "2021-09-08T23:06:52.548Z",
"updated_at": "2021-09-08T23:07:48.685Z",
"quantity": "2506.7",
"quantity_remaining": "2506.7",
"total": "0.0",
"rate": "1.348",
"average_price": "0.0"
},
```
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# v0.4.1

## New Features
- MacOS application is now signed and does not require additional permissions to download!
- Menu bar under help includes relevant links to github, discord, and more.

## Enhancements
- Updates the overall style of active deals (removed top header, normalized number width)

## Bug Fixes
- Discovered issue in how the bots calculated funds when MSTC was 0. Resolved this by properly calculating the MSTC with active + completed SOs.
- Fixed bug in the Manual SO count metric showing cancelled deals counted.
- Fixed hovering on the darkmode icon.
- Fixed the labels incorrectly wrapping on the bot performance charts




# v0.4.0
## New Features
- Added a coin header where you can customize the coins that are tracked on a 5 second refresh.
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ The 3C Portfolio Manager is an essential addon to your 3Commas experience. It en
- [Feedback / Bug reports](#feedback-or-bug-submission)
- [Building the application locally](#building-the-application-locally)
- [Frequently Asked Questions](#frequently-asked-questions)
- [Initial Setup](#initial-setup)
- [Why did we change?](#why-did-we-change)
- [Why did we go with a downloadable application?](#why-did-we-go-with-a-downloadable-application)
- [Why should I trust this?](#why-should-i-trust-this)
- [Change Log](https://github.com/coltoneshaw/3c-portfolio-manager/blob/main/CHANGELOG.md)
- [Screenshots](#screenshots)

Expand Down Expand Up @@ -119,6 +115,18 @@ npm run build

# Frequently Asked Questions

Questions
- [Why do my active SOs not match 3C?](#why-do-my-active-sos-not-match-3C)
- [Why did we change?](#why-did-we-change)
- [Why did we go with a downloadable application?](#why-did-we-go-with-a-downloadable-application)
- [Why should I trust this?](#why-should-i-trust-this)

## Why do my active SOs not match 3C?

This is a fun one. It seems that how 3Commas handles Max Safety Trades is not how you'd expect. You can fill 5 SOs, have 1 active SO but manually set your MSTC to 0. This means that when attempting to calculate the max deal funds within the application it stops at the MSTC value, causing a mismatch in max deal funds on 3cpm and on 3commas. To mitigate this we manually update this value in the app to be the max of either MSTC or filled SOs + active SOs.

TLDR; Numbers were wrong, fixed and the app is _more right_.

## Why did we change?

If you find yourself asking "Why did you go from Google Sheets to an Electron app? I love sheets!" then read below!
Expand Down
106 changes: 90 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "3c-portfolio-manager",
"productName": "3C Portfolio Manager",
"version": "v0.4.0",
"version": "v0.4.1",
"description": "An application to manage your 3Commas portfolio.",
"private": true,
"main": "./dist/main.js",
"scripts": {
"pack": " electron-builder --dir ",
"dist": " electron-builder --mac --win --linux",
"pack": "electron-builder --dir ",
"build:mac": "webpack && electron-builder --dir && electron-builder --mac",
"build:win": "electron-builder --win",
"build:linux": "electron-builder --linux",
"build": "webpack && electron-builder --dir && electron-builder --mac --win --linux",
"react:dev": "webpack serve --mode=development",
"electron:dev": "nodemon",
Expand Down Expand Up @@ -80,27 +82,32 @@
"date-fns": "^2.22.1",
"dot-prop": "^6.0.1",
"electron-fetch": "^1.7.4",
"electron-notarize": "^1.1.1",
"electron-store": "^8.0.0",
"node-fetch": "^2.6.1",
"query-string": "^7.0.1"
},
"build": {
"appId": "3CPortfolioManager",
"appId": "com.savvytoolbelt.3cportfoliomanager",
"artifactName": "${name}-${version}-${os}-${arch}.${ext}",
"afterSign": "scripts/notarize.js",
"directories": {
"output": "release"
},
"mac": {
"category": "public.app-category.finance",
"target": [
"dmg"
"dmg",
"zip"
],
"type": "distribution",
"darkModeSupport": true,
"hardenedRuntime": true,
"entitlements": "assets/entitlements.mac.plist",
"entitlementsInherit": "assets/entitlements.mac.plist",
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"gatekeeperAssess": false,
"icon": "assets/icons/icon.icns"
"icon": "assets/icons/icon.icns",
"provisioningProfile" : "build/embedded.provisionprofile"
},
"dmg": {
"contents": [
Expand Down
25 changes: 25 additions & 0 deletions scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// inspired by https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
require('dotenv').config();
const {notarize} = require('electron-notarize');


exports.default = async function notarizing(context) {
const {electronPlatformName, appOutDir} = context;
if (electronPlatformName !== 'darwin' || process.platform !== 'darwin') {
return;
}

const appName = context.packager.appInfo.productFilename;
// if (typeof process.env.APPLEID === 'undefined') {
// console.log('skipping notarization, remember to setup environment variables for APPLEID and APPLEIDPASS if you want to notarize');
// return;
// }
return await notarize({
appBundleId: 'com.savvytoolbelt.3cportfoliomanager',
appPath: `${appOutDir}/${appName}.app`,
appleId: '[email protected]',
appleIdPassword: 'cyuj-jlos-zcjw-lkoy',
tool: 'notarytool',
teamId: '4UHVHSRL22'
});
};
Loading

0 comments on commit 6cce857

Please sign in to comment.