Add support for GET conf/pub:{Action}:{Object}:{Detail} endpoint. Add bfxapi/rest/enums.py script. Add Configs enumeration in enums.py.

This commit is contained in:
Davide Casale
2022-12-12 17:14:58 +01:00
parent 32d698285e
commit 862ba6d481
2 changed files with 31 additions and 1 deletions

View File

@@ -5,7 +5,9 @@ from http import HTTPStatus
from typing import List, Union, Literal, Optional, Any
from . import serializers
from .typings import *
from .enums import Configs
from .exceptions import RequestParametersError, ResourceNotFound
class BfxRestInterface(object):
@@ -155,4 +157,7 @@ class BfxRestInterface(object):
data = self.__GET(f"funding/stats/{symbol}/hist", params=params)
return [ serializers.FundingStat.parse(*subdata) for subdata in data ]
return [ serializers.FundingStat.parse(*subdata) for subdata in data ]
def conf(self, config: Configs) -> Any:
return self.__GET(f"conf/{config}")[0]