Added tests and docstring to exchange funding_fee methods, removed utils

This commit is contained in:
Sam Germain
2021-09-09 01:43:05 -06:00
parent d54117990b
commit dfb9937436
9 changed files with 134 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
""" Binance exchange subclass """
import logging
from datetime import datetime
from typing import Dict, List, Optional
import ccxt
@@ -91,6 +92,13 @@ class Binance(Exchange):
except ccxt.BaseError as e:
raise OperationalException(e) from e
def _get_funding_rate(self, pair: str, when: datetime) -> Optional[float]:
"""
Get's the funding_rate for a pair at a specific date and time in the past
"""
# TODO-lev: implement
raise OperationalException("_get_funding_rate has not been implement on binance")
def _get_funding_fee(
self,
contract_size: float,