diff --git a/bfxapi/rest/BfxRestInterface.py b/bfxapi/rest/BfxRestInterface.py index 0c02687..e4bb11c 100644 --- a/bfxapi/rest/BfxRestInterface.py +++ b/bfxapi/rest/BfxRestInterface.py @@ -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 ] \ No newline at end of file + return [ serializers.FundingStat.parse(*subdata) for subdata in data ] + + def conf(self, config: Configs) -> Any: + return self.__GET(f"conf/{config}")[0] \ No newline at end of file diff --git a/bfxapi/rest/enums.py b/bfxapi/rest/enums.py new file mode 100644 index 0000000..3bb05d3 --- /dev/null +++ b/bfxapi/rest/enums.py @@ -0,0 +1,25 @@ +from enum import Enum + +class Configs(str, Enum): + MAP_CURRENCY_SYM = "pub:map:currency:sym" + MAP_CURRENCY_LABEL = "pub:map:currency:label" + MAP_CURRENCY_UNIT = "pub:map:currency:unit" + MAP_CURRENCY_UNDL = "pub:map:currency:undl" + MAP_CURRENCY_POOL = "pub:map:currency:pool" + MAP_CURRENCY_EXPLORER = "pub:map:currency:explorer" + MAP_CURRENCY_TX_FEE = "pub:map:currency:tx:fee" + MAP_TX_METHOD = "pub:map:tx:method" + + LIST_PAIR_EXCHANGE = "pub:list:pair:exchange" + LIST_PAIR_MARGIN = "pub:list:pair:margin" + LIST_PAIR_FUTURES = "pub:list:pair:futures" + LIST_PAIR_SECURITIES = "pub:list:pair:securities" + LIST_CURRENCY = "pub:list:currency" + LIST_COMPETITIONS = "pub:list:competitions" + + INFO_PAIR = "pub:info:pair" + INFO_PAIR_FUTURES = "pub:info:pair:futures" + INFO_TX_STATUS = "pub:info:tx:status" + + SPEC_MARGIN = "pub:spec:margin", + FEES = "pub:fees" \ No newline at end of file