tailwind #9

Manually merged
peperunas merged 157 commits from tailwind into master 2020-12-28 18:38:52 +00:00

157 Commits

Author SHA1 Message Date
Giulio De Pasquale
f3edea53cf profit_loss attached to frontend. buttons buggy 2020-12-24 16:52:42 +00:00
Giulio De Pasquale
d240398cce added luxon 2020-12-24 16:51:59 +00:00
Giulio De Pasquale
f8de641d78 added luxon 2020-12-24 16:51:51 +00:00
Giulio De Pasquale
e37e492439 implemented get/put_profit_loss api with frontend 2020-12-24 13:48:41 +00:00
Giulio De Pasquale
270619a316 use getters instead of non-existing attributes 2020-12-24 13:48:16 +00:00
Giulio De Pasquale
296f0abd67 fixed currency creation on quote 2020-12-24 13:47:54 +00:00
Giulio De Pasquale
54878ef323 added ledger and API for profit/loss retrieval 2020-12-24 13:47:33 +00:00
Giulio De Pasquale
f9e3ad500c refactored Symbol to TradingPair. Implemented Symbol class. Implemented Balance and BalanceGroup class along with methods to calculate balance at a specific point in time. 2020-12-23 17:17:10 +00:00
Giulio De Pasquale
01419e5927 added average to utils 2020-12-23 17:15:37 +00:00
Giulio De Pasquale
806b98bc27 fixed quote equivalent formatting in wallet 2020-12-21 14:45:07 +00:00
Giulio De Pasquale
b32fa2a19a align main content with sidebar 2020-12-21 14:41:26 +00:00
Giulio De Pasquale
419f9b75a7 inverted title 2020-12-21 14:35:51 +00:00
Giulio De Pasquale
f502ab02b5 formatting amount in title 2020-12-21 14:33:53 +00:00
Giulio De Pasquale
f931505b58 total balance displayed in wallet card. some work towards cryptocoin icons 2020-12-21 14:31:48 +00:00
Giulio De Pasquale
d00dc19926 use loop in socket.io callback 2020-12-21 13:16:26 +00:00
Giulio De Pasquale
f8754e3f69 preliminary, rough support to balances 2020-12-21 13:08:26 +00:00
Giulio De Pasquale
c4014bc48b preliminary, rough support to balances 2020-12-21 13:08:18 +00:00
Giulio De Pasquale
ec35fb1366 updated types to support currency. implemented changes in both backend and frontend. balances are sent to frontend 2020-12-21 12:54:40 +00:00
Giulio De Pasquale
9829bd2c71 chaining get_balances() 2020-12-21 12:53:37 +00:00
Giulio De Pasquale
bf58c0917c added get_balances() method 2020-12-21 12:53:23 +00:00
Giulio De Pasquale
ac8458723b super() 2020-12-21 12:02:16 +00:00
Giulio De Pasquale
00a100f618 added method to calculate maximum order amount 2020-12-21 12:00:33 +00:00
Giulio De Pasquale
70d3c262dd CurrencyPair does not have Currency anymore 2020-12-20 17:12:31 +00:00
Giulio De Pasquale
11d89dda49 symbolToPair in tables 2020-12-20 17:12:16 +00:00
Giulio De Pasquale
57b3741275 percentage text follows style of state box 2020-12-20 14:15:49 +00:00
Giulio De Pasquale
5b8436f7cb overflow hidden on plot 2020-12-20 13:29:46 +00:00
Giulio De Pasquale
8b763fbb73 connected close button 2020-12-20 13:29:39 +00:00
Giulio De Pasquale
fc8b005b8a added modal overlay, not connected to backend yet 2020-12-20 13:22:13 +00:00
Giulio De Pasquale
01cd0edb7c added modal window 2020-12-20 12:15:17 +00:00
Giulio De Pasquale
782d376967 added eventname enum, fixed x/y concatenation on plot 2020-12-20 12:06:31 +00:00
Giulio De Pasquale
a8d8d1ec43 socket.io bump to 3 2020-12-20 10:23:09 +00:00
Giulio De Pasquale
1fb1d75014 updated requirements 2020-12-20 10:14:29 +00:00
Giulio De Pasquale
e9efbdfc35 enabled plot, enabled positions table 2020-12-19 21:54:04 +00:00
Giulio De Pasquale
7208ed7d47 changed walletcard to have an internal state and not props. 2020-12-19 21:53:47 +00:00
Giulio De Pasquale
9a1a63533b commented out wallet card until backend sends data to it 2020-12-19 21:53:20 +00:00
Giulio De Pasquale
7b91111b7d added currency to types 2020-12-19 21:52:52 +00:00
Giulio De Pasquale
edbe6002df revamped position table 2020-12-19 21:52:40 +00:00
Giulio De Pasquale
3979a4f86f same top color, better number localization 2020-12-19 21:52:27 +00:00
Giulio De Pasquale
13a6fb087e return none if no position in previous tick 2020-12-19 21:46:15 +00:00
Giulio De Pasquale
e541b3d7d5 removed debug logs 2020-12-19 17:29:07 +00:00
Giulio De Pasquale
25ca106b5c remove console log at start 2020-12-19 17:28:45 +00:00
Giulio De Pasquale
e9ea60f404 put back footer 2020-12-19 17:27:46 +00:00
Giulio De Pasquale
470fa942d7 commented out wallet component because we are missing data 2020-12-19 17:27:36 +00:00
Giulio De Pasquale
248ba7da3f created coinbalance card 2020-12-19 17:27:19 +00:00
Giulio De Pasquale
95f7a3c824 renamed HCard to Cards 2020-12-19 16:18:58 +00:00
Giulio De Pasquale
eb129a3426 include new dashboard elements 2020-12-19 16:17:48 +00:00
Giulio De Pasquale
cd31780e96 modified side navbar to include wallet card 2020-12-19 16:17:26 +00:00
Giulio De Pasquale
0664ca81d9 added stub of wallet card 2020-12-19 16:17:10 +00:00
Giulio De Pasquale
2beb960aa7 added statusbar class file 2020-12-19 16:16:57 +00:00
Giulio De Pasquale
e3eb10de57 removed react 16, added cryptocoins package 2020-12-19 16:16:38 +00:00
Giulio De Pasquale
6c6d85ba78 added get_balance_delta function in wrapper 2020-12-19 10:53:55 +00:00
Giulio De Pasquale
fd54ae2ca2 added icons class to handle svg elements 2020-12-18 19:00:46 +00:00
Giulio De Pasquale
565af21955 added plot and cards to dashboard. added navbar to the left. 2020-12-18 19:00:26 +00:00
Giulio De Pasquale
eeb959bda1 added optional logo as JSX.Element 2020-12-18 19:00:02 +00:00
Giulio De Pasquale
361bf0fd2a removed limit of 500 elements, fixed margins 2020-12-18 18:59:43 +00:00
Giulio De Pasquale
76243d8b7f added left margin to left sidebar 2020-12-18 14:03:47 +00:00
Giulio De Pasquale
b36a6fac8a main page stub 2020-12-18 14:02:53 +00:00
Giulio De Pasquale
87a18b8387 added navbars components 2020-12-18 14:02:45 +00:00
Giulio De Pasquale
c24cad03c8 defined card template 2020-12-18 14:02:21 +00:00
Giulio De Pasquale
ce8d4e1ef9 importing tailwind 2020-12-18 14:02:11 +00:00
Giulio De Pasquale
3c72522011 removed extra classes from index.html template 2020-12-18 14:01:59 +00:00
Giulio De Pasquale
d13c15e7dd removed bootstrap 2020-12-18 14:01:37 +00:00
Giulio De Pasquale
84b5aca339 gitignore for generated css, added index.css 2020-12-17 20:19:17 +00:00
Giulio De Pasquale
43f9151de4 tailwind and scripts 2020-12-17 20:18:15 +00:00
Giulio De Pasquale
a0c1a58d39 don't trigger events and state callbacks in strategy evaluation 2020-12-17 10:50:08 +00:00
Giulio De Pasquale
95b1921f37 use profit_loss and not amount 2020-12-17 10:18:52 +00:00
Giulio De Pasquale
a8e3206584 returning dict and assigning it... 2020-12-17 09:56:27 +00:00
Giulio De Pasquale
2d5214d34d removed debug flag since it created another thread. tacci tua. updating trailing stop on every state 2020-12-17 09:49:48 +00:00
Giulio De Pasquale
4211f9ede0 added base and quote to title page 2020-12-17 09:31:09 +00:00
Giulio De Pasquale
d7c5d81f80 handling trailing stop 2020-12-17 09:30:48 +00:00
Giulio De Pasquale
5f29d8875c add currency component (forgot to add earlier...) and render other pairs if available 2020-12-16 18:56:23 +00:00
Giulio De Pasquale
3c1a25f051 added currency pair in app state 2020-12-16 18:46:29 +00:00
Giulio De Pasquale
c14b0afb5a created utils file 2020-12-16 18:42:26 +00:00
Giulio De Pasquale
60db4f93e0 defined CurrencyPair 2020-12-16 18:42:13 +00:00
Giulio De Pasquale
3933545a77 added types.ts. renamed various type names. added fake currency switch to be implemented 2020-12-16 18:29:39 +00:00
Giulio De Pasquale
1bc46e421c centered card text. h3 -> h5 2020-12-16 17:58:46 +00:00
Giulio De Pasquale
2a6dc24300 retrying bitfinex api operations 2020-12-16 15:06:16 +00:00
Giulio De Pasquale
0d68b2684d fixed table color on break even 2020-12-16 15:05:51 +00:00
Giulio De Pasquale
ca2c62739d initializing tick dictionary in status. bordello of fixes 2020-12-16 14:29:10 +00:00
Giulio De Pasquale
f7ea135cae removed wrong statement 2020-12-16 13:36:48 +00:00
Giulio De Pasquale
c19530badb added trailing stop 2020-12-16 13:36:20 +00:00
Giulio De Pasquale
912c4db2e2 added on_close event handler 2020-12-16 13:30:24 +00:00
Giulio De Pasquale
7bbd99ba97 added dynamic title based on current price 2020-12-16 12:57:29 +00:00
Giulio De Pasquale
f421e3b41c added react-helmet 2020-12-16 12:52:12 +00:00
Giulio De Pasquale
f9f14df519 implemented close position event and backend algorithm. 2020-12-16 12:32:16 +00:00
Giulio De Pasquale
f6a318257a detecting new events. events UI not working yet. fixed positions and events components show on demand 2020-12-16 12:02:50 +00:00
Giulio De Pasquale
4114333632 added positions on connect event. new socketio event, new_event 2020-12-16 11:44:12 +00:00
Giulio De Pasquale
ff0796024a removed price graph intestation 2020-12-16 11:39:25 +00:00
Giulio De Pasquale
14a5458c52 added contextual background 2020-12-16 11:38:58 +00:00
Giulio De Pasquale
780aae0fb1 extracted pos_to_json 2020-12-16 11:28:48 +00:00
Giulio De Pasquale
a20a06b3fe receiving first_connect message and rendering components on demand 2020-12-16 11:28:21 +00:00
Giulio De Pasquale
a7d888f00a renamed newdata 2020-12-16 11:27:53 +00:00
Giulio De Pasquale
0f82cd9d8c positiontable renders from props and not from an internal state 2020-12-16 11:27:35 +00:00
Giulio De Pasquale
74152a9fb9 renamed newtickdata to newtickmessage. added firstconnectmessage. 2020-12-16 11:27:10 +00:00
Giulio De Pasquale
dc382cd2cd modified on_close following the changes in the frontend event 2020-12-16 10:19:15 +00:00
Giulio De Pasquale
52124ee64f defined positionclosemessage type 2020-12-16 10:18:57 +00:00
Giulio De Pasquale
f35ab007d9 added print in stubs instead of raising exception 2020-12-16 10:13:37 +00:00
Giulio De Pasquale
a958d2f120 reordered methods in bfxbot. added stubs of close order and close position 2020-12-16 10:12:10 +00:00
Giulio De Pasquale
5544d681f4 added positions base prices on plot 2020-12-16 10:08:11 +00:00
Giulio De Pasquale
2c6aaadc2f added amount to tables. removed test position. 2020-12-16 09:44:25 +00:00
Giulio De Pasquale
9ae8389f83 h_price_line to current_price_line 2020-12-16 09:40:45 +00:00
Giulio De Pasquale
dfdb2e46a9 modified position json function on socket emit 2020-12-16 09:37:14 +00:00
Giulio De Pasquale
054bb0dc04 removed test entry, sending close event on button 2020-12-16 09:36:42 +00:00
Giulio De Pasquale
55bfe8824b added str and repr for positionstate. returning pw on strategy apply 2020-12-16 09:36:15 +00:00
Giulio De Pasquale
2130f8acb9 added undefined state as default 2020-12-15 20:18:31 +00:00
Giulio De Pasquale
a7cdb2288d modified signature of positionwrapper 2020-12-15 20:16:56 +00:00
Giulio De Pasquale
e5726627ca modified strategy to pack a wrapper 2020-12-15 20:16:39 +00:00
Giulio De Pasquale
2a55f67c6d comment 2020-12-15 20:11:21 +00:00
Giulio De Pasquale
2f5259ebd2 refactored names in symbolstatus. now a strategy has to assemble a positionwrapper. raising exceptions if types are not as expected. 2020-12-15 20:10:51 +00:00
Giulio De Pasquale
3534aef408 added todo 2020-12-15 16:34:36 +00:00
Giulio De Pasquale
38d13c724b implemented trailingstopmetadata 2020-12-15 16:31:20 +00:00
Giulio De Pasquale
15cad71afc refactored positionwrapper. added on_new_tick for strategy. refactored names in symbolstatus 2020-12-15 16:31:04 +00:00
Giulio De Pasquale
672a55d229 added eventmetadata class 2020-12-15 16:15:44 +00:00
Giulio De Pasquale
2d7307a038 added metadata to event. refactored function names and order in classes 2020-12-15 16:11:11 +00:00
Giulio De Pasquale
a7b1d05029 changed visibility of bfxbot attributes. removed pid from event class. added while loop to avoid race condition on socket.io first_connect event 2020-12-15 15:52:57 +00:00
Giulio De Pasquale
f930a849f0 main code cleanup 2020-12-15 15:31:09 +00:00
Giulio De Pasquale
7fafdc6293 removed old code 2020-12-15 15:16:16 +00:00
Giulio De Pasquale
e1323c5961 fixed footer margins. started adding events listgroup, events are not shown correctly yet 2020-12-14 20:26:14 +00:00
Giulio De Pasquale
e57daf3760 added base price to position table. plot code cleanup 2020-12-14 19:04:04 +00:00
Giulio De Pasquale
2cbb21f6cf code cleanup 2020-12-14 18:52:43 +00:00
Giulio De Pasquale
d72421eeb2 improved plot with dashed line and better formatting 2020-12-14 16:02:01 +00:00
Giulio De Pasquale
1718c37751 added dashed line on last price 2020-12-14 15:37:12 +00:00
Giulio De Pasquale
dfc9adcd9f fixed floating point numbers formatting in table 2020-12-14 14:58:34 +00:00
Giulio De Pasquale
ca1532fb8b first working commit for open positions table 2020-12-14 14:50:31 +00:00
Giulio De Pasquale
9d9565a9af accessing position.id instead of pid 2020-12-14 14:50:04 +00:00
Giulio De Pasquale
d1e9be15a1 parsing str to symbol when adding new positions 2020-12-14 14:49:51 +00:00
Giulio De Pasquale
3e45135809 reorganized layout with navbar and two cols 2020-12-14 13:55:33 +00:00
Giulio De Pasquale
119d80a936 show only last 500 entries 2020-12-14 13:14:32 +00:00
Giulio De Pasquale
02678fd8e6 new event first connect to send previous data on first connect 2020-12-13 20:40:55 +00:00
Giulio De Pasquale
3f09e9fea8 graph working. old functional components are now standard components 2020-12-13 19:32:33 +00:00
Giulio De Pasquale
035d7831ae HCard extends component now. added state 2020-12-13 11:27:50 +00:00
Giulio De Pasquale
c11cbe9d3f plotly added to dependencies 2020-12-13 11:22:59 +00:00
Giulio De Pasquale
46e1b461e7 include single css and js files from parcel 2020-12-12 20:20:43 +00:00
Giulio De Pasquale
67fba48714 removed old static contents, replaced by parcel packing 2020-12-12 20:20:09 +00:00
Giulio De Pasquale
aea9352ada initial commit react webapp 2020-12-12 20:18:25 +00:00
Giulio De Pasquale
1a8808b088 ignore contents of static 2020-12-12 20:17:01 +00:00
Giulio De Pasquale
0e5403449f ignore contents of static 2020-12-12 20:16:32 +00:00
Giulio De Pasquale
f60d61d342 updated gitignore 2020-12-11 10:03:23 +00:00
Giulio De Pasquale
277fe2ae02 connected/disconnected toasts 2020-12-10 16:54:49 +00:00
Giulio De Pasquale
9955ddf08e sending new_ticks event 2020-12-10 16:29:26 +00:00
Giulio De Pasquale
11bba57343 socketio and other stuff 2020-12-08 19:33:55 +00:00
Giulio De Pasquale
01bbc3b338 added jquery and plotly 2020-12-08 15:51:08 +00:00
Giulio De Pasquale
1603f2593f updated frontend 2020-12-08 15:46:26 +00:00
Giulio De Pasquale
f88befa687 style css 2020-12-08 12:31:06 +00:00
Giulio De Pasquale
b570f9a46c debug mode 2020-12-08 12:21:57 +00:00
Giulio De Pasquale
c3c7fa2a51 frontend update 2020-12-08 12:21:49 +00:00
Giulio De Pasquale
c8fbd02a86 bootstrap 2020-12-07 21:52:55 +00:00
Giulio De Pasquale
f694f81b1b added flask 2020-12-07 21:52:47 +00:00
Giulio De Pasquale
dcd91eaab8 Merge branch 'refactor' of ssh://giugl.io.gitea:10022/peperunas/gkaching into refactor 2020-12-07 21:38:22 +00:00
Giulio De Pasquale
a2b9948793 updated requirements 2020-12-07 12:27:44 +00:00
Giulio De Pasquale
074de41e57 raising exceptions if keys are not defined 2020-12-07 12:27:32 +00:00
Giulio De Pasquale
6c7f0989a6 moved trailing stop strategy to separate file. added function to calculate trailing stop 2020-12-07 12:27:09 +00:00
Giulio De Pasquale
047f4cf84b screen testing 2020-12-04 15:28:21 +00:00
Giulio De Pasquale
8391cec49e added any_state/event in handler 2020-12-04 12:13:13 +00:00
Giulio De Pasquale
5d5fbc91e1 sample main and strategy 2020-11-30 14:38:46 +00:00
Giulio De Pasquale
c7a582e6c5 heavy reorganization 2020-11-30 14:38:28 +00:00
Giulio De Pasquale
7521756115 started refactoring 2020-11-30 09:12:43 +00:00