Libraries refactor and add some sinks #4

Closed
m wants to merge 136 commits from library-refactor into master

136 Commits

Author SHA1 Message Date
Mark Veidemanis c3406bd9ea
Fix TrueLayer 2022-03-04 21:06:54 +00:00
Mark Veidemanis df281b6e43
Re-enable Nordigen 2022-03-04 21:06:20 +00:00
Mark Veidemanis 240c223344
Implement signin command for TrueLayer 2022-03-04 21:05:52 +00:00
Mark Veidemanis 6d089f4354
Add venv to gitignore 2022-03-01 21:21:54 +00:00
Mark Veidemanis b0d4f5098d
Create proper authcode flow for TrueLayer 2022-03-01 20:39:22 +00:00
Mark Veidemanis 6e1bb5a582
Fix transactions tests 2022-02-28 20:22:11 +00:00
Mark Veidemanis 90da53ce99
Refactor initialisation and add docstrings to util module 2022-02-28 20:18:42 +00:00
Mark Veidemanis e7283b304f
Implement getting TrueLayer access tokens 2022-02-28 20:09:19 +00:00
Mark Veidemanis d566b4da16
Begin implementing TrueLayer API 2022-02-28 20:03:21 +00:00
Mark Veidemanis dcfc4510ad
Begin implementing Nordigen API 2022-02-28 20:02:50 +00:00
Mark Veidemanis 833a1fdbe9
Begin implementing Fidor API 2022-02-28 20:02:02 +00:00
Mark Veidemanis 8eece59c47
Begin implementing Yapily API 2022-02-28 20:00:37 +00:00
Mark Veidemanis fde0936faf
Fix indentation while setting ES endpoint in Transactions 2022-02-28 19:59:18 +00:00
Mark Veidemanis c09bad9cc8
Simplify and refactor initialisation code 2022-02-28 19:58:46 +00:00
Mark Veidemanis f7603f5a13
Fix errors and don't print ES logging 2022-02-25 00:06:10 +00:00
Mark Veidemanis 6dd11bbfa5
Store cheat output in ES 2022-02-24 23:44:58 +00:00
Mark Veidemanis 8e81012bb3
Create boilerplate money tests 2022-02-24 22:29:09 +00:00
Mark Veidemanis 61253a5db3
Remove some debugging code from transactions tests 2022-02-24 22:28:41 +00:00
Mark Veidemanis 8f3faaab6d
Move get_profit to money 2022-02-24 22:28:00 +00:00
Mark Veidemanis 3d3e9b0279
Fix reference to get_profit in commands 2022-02-24 22:27:50 +00:00
Mark Veidemanis a08e6570ed
Simplify Ctrl+C signal handling 2022-02-24 22:27:27 +00:00
Mark Veidemanis ee93a91c04
Write various transaction test cases 2022-02-24 22:27:04 +00:00
Mark Veidemanis 158b452167
Fix how min and max are used in transactions 2022-02-24 22:26:16 +00:00
Mark Veidemanis e4e88ac301
Begin transactions tests 2022-02-24 21:32:32 +00:00
Mark Veidemanis f19fc1fb47
Re-enable withdrawing upon fund release 2022-02-22 20:16:36 +00:00
Mark Veidemanis d8c3d32bf7
Move create_distribution_list to Markets library 2022-02-22 20:15:42 +00:00
Mark Veidemanis d535852ce6
Move to_usd to Money library 2022-02-22 20:12:26 +00:00
Mark Veidemanis f2dcb977b3
Move rates and margin functions into Money library 2022-02-22 20:10:47 +00:00
Mark Veidemanis 6e8903833c
Move lookup rates into new Money library 2022-02-22 20:06:56 +00:00
Mark Veidemanis f13cacc2b9
Fix references to last_online_recent in Agora tests 2022-02-22 19:54:42 +00:00
Mark Veidemanis b3c3e7a96c
Move some functions to a util class from Agora 2022-02-22 19:53:22 +00:00
Mark Veidemanis 18011741c5
Make ES optional and properly calculate open trade volume 2022-02-22 19:21:29 +00:00
Mark Veidemanis 05993ac119
Convert amount to float before adding in total calculation 2022-02-21 10:02:20 +00:00
Mark Veidemanis d1f43f0efc
Add check in Agora for validating ad response 2022-02-21 10:01:38 +00:00
Mark Veidemanis 53f28fac40
Add recurring call for getting total profit 2022-02-18 15:19:04 +00:00
Mark Veidemanis 18ef7a0350
Run balance checks intermittently 2022-02-18 08:41:32 +00:00
Mark Veidemanis 4f24417417
Handle trying to stop the bot when threads are running 2022-02-18 08:41:17 +00:00
Mark Veidemanis 62d3f1a953
Differentiate between trades+profit and profit in ES 2022-02-17 23:24:12 +00:00
Mark Veidemanis 6979b6c34a
Add a xtype parameter for future ES expansion 2022-02-17 23:01:11 +00:00
Mark Veidemanis df195d968c
Log more things into ES 2022-02-17 22:59:11 +00:00
Mark Veidemanis dfe02f557c
Disable TLS warning for ES 2022-02-17 22:10:31 +00:00
Mark Veidemanis dec4d5a422
Add certs folder to gitignore 2022-02-17 22:03:48 +00:00
Mark Veidemanis 997aba16c1
Handle another kind of exception 2022-02-17 15:15:15 +00:00
Mark Veidemanis c6926388d9
Add provider to trade information 2022-02-17 12:18:05 +00:00
Mark Veidemanis 6eff2b76e7
Add commands to check only profit 2022-02-15 23:20:42 +00:00
Mark Veidemanis 17ec43eba0
Disable automatic withdrawals 2022-02-15 22:28:14 +00:00
Mark Veidemanis f116ed7cf3
Add commands to get various totals 2022-02-15 22:27:42 +00:00
Mark Veidemanis 6872e0d164
Add code formatting checks in runtest.sh 2022-02-15 22:27:15 +00:00
Mark Veidemanis 63f4df3749
Add script to run tests 2022-02-15 22:25:57 +00:00
Mark Veidemanis e15cec7afe
Write docstrings for Agora and Transactions classes 2022-02-15 21:50:34 +00:00
Mark Veidemanis a5bd7051df
Remove debugging code 2022-02-15 21:30:45 +00:00
Mark Veidemanis 6e660d7544
Fix Agora tests 2022-02-15 21:30:16 +00:00
Mark Veidemanis 2740c1d9f9
Fix rounding bug in cheat 2022-02-15 13:56:42 +00:00
Mark Veidemanis 83dda3ce61
Fix notification priorities 2022-02-14 20:42:24 +00:00
Mark Veidemanis 939b43e4d3
Fix transaction handling for non-Revolut trades 2022-02-14 20:37:17 +00:00
Mark Veidemanis aa10abc1c7
Set priorities for trade and withdrawal notifications 2022-02-14 20:35:48 +00:00
Mark Veidemanis 9d9f8ff148
Add extra debugging in transactions 2022-02-14 06:52:31 +00:00
Mark Veidemanis 69dde55a21
Fix TX update logic in Transactions 2022-02-13 23:01:44 +00:00
Mark Veidemanis 1f97bb36f9
Remove all cheat output 2022-02-13 22:21:49 +00:00
Mark Veidemanis a639b32727
Remove more cheat debugging and useless output 2022-02-13 22:20:09 +00:00
Mark Veidemanis a064e65068
Remove some debug output 2022-02-13 22:18:19 +00:00
Mark Veidemanis 42dbccf043
Account trades for withdrawal calculation and fix cheat for multiple providers 2022-02-13 09:56:22 +00:00
Mark Veidemanis 1f17183b1f
Fix pubads command after ads refactor 2022-02-12 15:12:52 +00:00
Mark Veidemanis affffe847f
Fix the remainder of the tests 2022-02-12 14:56:56 +00:00
Mark Veidemanis 56dc06a02f
Create more Agora tests 2022-02-11 10:45:23 +00:00
Mark Veidemanis 31db2386fa
Remove debugging code 2022-02-09 18:46:07 +00:00
Mark Veidemanis fdc3f419cc
Implement accounting for open trade value as part of total remaining 2022-02-09 18:45:43 +00:00
Mark Veidemanis 3417e6166a
Fix minor bugs with the cheat system 2022-02-09 14:57:11 +00:00
Mark Veidemanis 2db3fbac86
Merge branch 'cheat-refactor' 2022-02-09 14:43:00 +00:00
Mark Veidemanis 1a9a9980e2
Increase decimal places in rate 2022-02-09 14:19:31 +00:00
Mark Veidemanis dc1ffffbb4
Use GBP details when currency is GBP, without checking country 2022-02-09 14:07:55 +00:00
Mark Veidemanis 7d101cb02d
Finish implementation and tests for the cheat system 2022-02-09 09:01:18 +00:00
Mark Veidemanis a8fdc49281
Add some Agora tests 2022-02-07 17:42:11 +00:00
Mark Veidemanis 4fe315cf91
Improve class passing and refactor 2022-02-07 13:24:09 +00:00
Mark Veidemanis c5c3e951cf
Fix dist function 2022-02-02 14:40:17 +00:00
Mark Veidemanis 39254ef684
Implement OTP and fix getting public ads 2022-02-02 13:36:18 +00:00
Mark Veidemanis b58bb1a9cd
Add PyOTP to requirements 2022-02-02 13:17:59 +00:00
Mark Veidemanis 0813709e61
Fix AgoraDesk PaymentMethodDetail specification 2022-02-02 12:53:23 +00:00
Mark Veidemanis 5a59e5e804
Fix redist command 2022-02-02 12:53:05 +00:00
Mark Veidemanis 556aaf3d8f
Add OTP key to gitignore 2022-02-02 12:52:47 +00:00
Mark Veidemanis 8961fe2c42
Remove old command and add redist command 2022-02-01 20:50:08 +00:00
Mark Veidemanis a1a13478cb
Implement editing ads and distributing providers 2022-02-01 20:49:54 +00:00
Mark Veidemanis 22f842e2cb
Fix autoprice bugs and re-enable withdrawing on release 2022-01-31 13:45:02 +00:00
Mark Veidemanis 0675b015e5
Implement remaining command 2022-01-31 11:32:47 +00:00
Mark Veidemanis 348a27d3df
Fix bug in IRC with zero length messages 2022-01-30 09:03:47 +00:00
Mark Veidemanis ad87e88b69
Make ad listing getters understand providers 2022-01-29 09:02:27 +00:00
Mark Veidemanis 768ad84982
Implement changing the online_provider when creating an ad 2022-01-29 08:25:50 +00:00
Mark Veidemanis 21b5a839c1
Disable withdrawal on release and don't lowball people 2022-01-28 17:16:59 +00:00
Mark Veidemanis 45419d7556
Add boilerplate code for topup notifications 2022-01-28 17:16:47 +00:00
Mark Veidemanis 04ef03f543
Add the notify module 2022-01-27 19:12:15 +00:00
Mark Veidemanis d11745319d
Improve cheat system with asset turns 2022-01-27 16:52:32 +00:00
Mark Veidemanis 573163d4a1
Implement updating ads with exponential backoff 2022-01-27 13:45:08 +00:00
Mark Veidemanis b7acf5a84d
Improve Agora error handling 2022-01-27 12:08:26 +00:00
Mark Veidemanis 2afddf9814
Handle Agora library exceptions properly 2022-01-27 11:36:17 +00:00
Mark Veidemanis f871e8b93a
Don't make unnecessary calls to update ad equations 2022-01-27 11:16:28 +00:00
Mark Veidemanis 35cf84998e
Add extra checks around APIs 2022-01-27 09:49:16 +00:00
Mark Veidemanis 40686ac0b7
Fix another dash bug 2022-01-26 19:46:23 +00:00
Mark Veidemanis 9d9bf9eba4
Implement converting all Revolut accounts to one currency 2022-01-25 20:01:22 +00:00
Mark Veidemanis 2f0cb38abd
Add more error handling to AgoraDesk library 2022-01-25 20:00:25 +00:00
Mark Veidemanis 1e685c9f8d
Nag on IRC if there's not enough in the XMR wallet to withdraw 2022-01-25 18:57:35 +00:00
Mark Veidemanis bb34baee31
Implement withdrawing to wallets 2022-01-25 18:39:35 +00:00
Mark Veidemanis 469eb762f0
Move totals code to transactions 2022-01-25 17:54:42 +00:00
Mark Veidemanis ae4db73835
Implement detecting Revolut callback updates 2022-01-25 17:53:56 +00:00
Mark Veidemanis 87dccc1cf4
Don't print the access/refresh tokens 2022-01-25 13:38:40 +00:00
Mark Veidemanis 0d85d19ab9
Ignore card and negative transactions 2022-01-25 13:01:39 +00:00
Mark Veidemanis fd6fbec312
Change help text to clarify asset 2022-01-25 11:51:44 +00:00
Mark Veidemanis 8300360894
Separate out the autoprice system for XMR and BTC 2022-01-25 11:48:12 +00:00
Mark Veidemanis 862a1fa28b
Add more checks on getting messages 2022-01-25 08:43:53 +00:00
Mark Veidemanis 835307b217
Properly handle ad substitutions 2022-01-24 19:17:12 +00:00
Mark Veidemanis 7e42bbebf3
Fix posting BTC ads 2022-01-23 17:08:01 +00:00
Mark Veidemanis 38425173b9
Fix BTC aspects of commands 2022-01-23 17:07:53 +00:00
Mark Veidemanis 90e7f78f58
Add CoinGecko to requirements 2022-01-21 17:43:53 +00:00
Mark Veidemanis df592785fb
Make everything work with BTC 2022-01-21 13:54:47 +00:00
Mark Veidemanis d579f25e59
Update release URL getter to understand BTC 2022-01-21 13:27:53 +00:00
Mark Veidemanis 725eb89f27
Update dashboard hook to understand BTC 2022-01-21 13:26:58 +00:00
Mark Veidemanis 90b0c6fa70
Update dashboard getter to understand BTC 2022-01-21 13:25:33 +00:00
Mark Veidemanis 50e114cf90
Add extra check in dashboard 2022-01-21 09:17:18 +00:00
Mark Veidemanis ad04c1ac3f
Format the output from releasing funds nicer 2022-01-20 14:48:14 +00:00
Mark Veidemanis 5c7225b393
Implement getting XMR/BTC rates and total balance 2022-01-12 19:56:08 +00:00
Mark Veidemanis 2bd049a2fd
Run autoprice in thread 2022-01-12 19:55:50 +00:00
Mark Veidemanis 9de01fbb39
Reimplement autoprice function better 2022-01-12 19:17:53 +00:00
Mark Veidemanis eae7ec6539
Add minimum check to Agora autoprice 2022-01-12 10:11:44 +00:00
Mark Veidemanis fb0b5eab5d
Make cheating configurable 2022-01-11 21:40:55 +00:00
Mark Veidemanis 6b75c847b8
Schedule running cheat 2022-01-11 21:40:05 +00:00
Mark Veidemanis 1895319e17
Fix cheating logic 2022-01-11 21:22:16 +00:00
Mark Veidemanis 4b07ad9065
Add extra checks for getting messages 2022-01-11 21:16:49 +00:00
Mark Veidemanis bd48bf37f5
Fix trades command 2022-01-09 22:11:39 +00:00
Mark Veidemanis 4db63998a1
Improve market cheating algorithm 2022-01-09 17:52:26 +00:00
Mark Veidemanis ec73d1b2e1
Implement cheating the price market 2022-01-09 14:34:37 +00:00
Mark Veidemanis 737e59b5d7
Add pre-commit to requirements 2022-01-08 17:49:13 +00:00
Mark Veidemanis 1aedadd76e
Inline the AgoraDesk library 2022-01-08 17:49:04 +00:00
Mark Veidemanis c368367f54
Add requirements 2022-01-08 17:34:36 +00:00
Mark Veidemanis 71389f7ff9
Add more error handling to Agora API calls 2022-01-06 12:33:06 +00:00
Mark Veidemanis 23a30ebb86
Customise messages and add extra error checking 2022-01-05 19:24:15 +00:00
Mark Veidemanis 8bb2c2b950
Uncomment release funds code 2022-01-01 21:00:37 +00:00
Mark Veidemanis bee066680d
Merge branch 'feature/alternate-reference-check' 2022-01-01 20:27:57 +00:00