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