numerapi 2.21.0__tar.gz → 2.22.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {numerapi-2.21.0 → numerapi-2.22.0}/PKG-INFO +1 -1
  2. numerapi-2.22.0/numerapi/cryptoapi.py +49 -0
  3. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi.egg-info/PKG-INFO +1 -1
  4. {numerapi-2.21.0 → numerapi-2.22.0}/setup.py +1 -1
  5. numerapi-2.21.0/numerapi/cryptoapi.py +0 -10
  6. {numerapi-2.21.0 → numerapi-2.22.0}/LICENSE +0 -0
  7. {numerapi-2.21.0 → numerapi-2.22.0}/README.md +0 -0
  8. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/__init__.py +0 -0
  9. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/base_api.py +0 -0
  10. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/cli.py +0 -0
  11. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/numerapi.py +0 -0
  12. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/py.typed +0 -0
  13. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/signalsapi.py +0 -0
  14. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi/utils.py +0 -0
  15. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi.egg-info/SOURCES.txt +0 -0
  16. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi.egg-info/dependency_links.txt +0 -0
  17. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi.egg-info/entry_points.txt +0 -0
  18. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi.egg-info/requires.txt +0 -0
  19. {numerapi-2.21.0 → numerapi-2.22.0}/numerapi.egg-info/top_level.txt +0 -0
  20. {numerapi-2.21.0 → numerapi-2.22.0}/setup.cfg +0 -0
  21. {numerapi-2.21.0 → numerapi-2.22.0}/tests/test_base_api.py +0 -0
  22. {numerapi-2.21.0 → numerapi-2.22.0}/tests/test_cli.py +0 -0
  23. {numerapi-2.21.0 → numerapi-2.22.0}/tests/test_numerapi.py +0 -0
  24. {numerapi-2.21.0 → numerapi-2.22.0}/tests/test_signalsapi.py +0 -0
  25. {numerapi-2.21.0 → numerapi-2.22.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numerapi
3
- Version: 2.21.0
3
+ Version: 2.22.0
4
4
  Summary: Automatically download and upload data for the Numerai machine learning competition
5
5
  Home-page: https://github.com/uuazed/numerapi
6
6
  Maintainer: uuazed
@@ -0,0 +1,49 @@
1
+ """API for Numerai Crypto"""
2
+
3
+ from typing import List, Dict
4
+ from numerapi import base_api
5
+ from numerapi import utils
6
+
7
+
8
+ class CryptoAPI(base_api.Api):
9
+ """"API for Numerai Crypto"""
10
+
11
+ def __init__(self, *args, **kwargs):
12
+ base_api.Api.__init__(self, *args, **kwargs)
13
+ self.tournament_id = 12
14
+
15
+ def get_leaderboard(self, limit: int = 50, offset: int = 0) -> List[Dict]:
16
+ """Get the current Numerai Crypto leaderboard with a reduced set of fields.
17
+
18
+ Returns:
19
+ list of dicts: each dict contains only the requested fields:
20
+ - nmrStaked
21
+ - rank
22
+ - username
23
+ - corrRep
24
+ - mmcRep
25
+ - return_1_day
26
+ - return_52_weeks
27
+ - return_13_weeks
28
+ """
29
+ query = '''
30
+ query($limit: Int!
31
+ $offset: Int!) {
32
+ cryptosignalsLeaderboard(limit: $limit
33
+ offset: $offset) {
34
+ nmrStaked
35
+ rank
36
+ username
37
+ corrRep
38
+ mmcRep
39
+ return_1_day
40
+ return_52_weeks
41
+ return_13_weeks
42
+ }
43
+ }
44
+ '''
45
+ arguments = {'limit': limit, 'offset': offset}
46
+ data = self.raw_query(query, arguments)['data']['cryptosignalsLeaderboard']
47
+ for item in data:
48
+ utils.replace(item, "nmrStaked", utils.parse_float_string)
49
+ return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numerapi
3
- Version: 2.21.0
3
+ Version: 2.22.0
4
4
  Summary: Automatically download and upload data for the Numerai machine learning competition
5
5
  Home-page: https://github.com/uuazed/numerapi
6
6
  Maintainer: uuazed
@@ -5,7 +5,7 @@ def load(path):
5
5
  return open(path, "r").read()
6
6
 
7
7
 
8
- numerapi_version = "2.21.0"
8
+ numerapi_version = "2.22.0"
9
9
 
10
10
 
11
11
  classifiers = [
@@ -1,10 +0,0 @@
1
- """API for Numerai Crypto"""
2
-
3
- from numerapi import base_api
4
-
5
- class CryptoAPI(base_api.Api):
6
- """"API for Numerai Crypto"""
7
-
8
- def __init__(self, *args, **kwargs):
9
- base_api.Api.__init__(self, *args, **kwargs)
10
- self.tournament_id = 12
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes