Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_global_configuration to public endpoint #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions dydx3/modules/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,14 @@ def get_time(self):
'''
uri = '/v3/time'
return self._get(uri)

def get_global_configuration(self):
'''
Get any global configuration variables for the exchange as a whole.

:returns: Configuration information for the entire exchange

:raise: DydxAPIError
'''
uri = '/v3/config'
return self._get(uri)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ eth-account>=0.4.0,<0.6.0
mpmath==1.0.0
pytest>=4.4.0,<5.0.0
requests-mock==1.6.0
requests==2.22.0
requests==2.23.0
setuptools==50.3.2
six==1.12
sympy==1.6
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
'mpmath==1.0.0',
'pytest>=4.4.0,<5.0.0',
'requests-mock==1.6.0',
'requests==2.22.0',
'requests>2.0.0',
'setuptools==50.3.2',
'sympy==1.6',
'tox==3.13.2',
'web3>=5.0.0,<6.0.0',
]

setup(
name='dydx-v3-python',
version='1.0.10',
name='dydx-v3-python-pundix',
version='1.0.13',
packages=find_packages(),
package_data={
'dydx3': [
Expand Down
5 changes: 5 additions & 0 deletions tests/test_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ def test_get_fast_withdrawal(self):
public = Client(API_HOST).public
json = public.get_fast_withdrawal()
assert json != {}

def test_get_global_configuration(self):
public = Client(API_HOST).public
json = public.get_global_configuration()
assert json != {}