Open dfrankmv opened 1 month ago
I think the project is dead, we are on our own to maintain the lib. I usually add/overwrite api methods by using my own client extending the original client class, for example (I am using AsyncClient):
from binance import AsyncClient
class AsyncClient2(AsyncClient):
# the new methods
async def futures_account_config(self, **params):
return await self._request_futures_api('get', 'accountConfig', signed=True, version=1, data=params)
async def futures_symbol_config(self, **params):
return await self._request_futures_api('get', 'symbolConfig', signed=True, version=1, data=params)
# the v3 methods
async def futures_account_balance(self, **params):
return await self._request_futures_api('get', 'balance', signed=True, version=3, data=params)
async def futures_position_information(self, **params):
return await self._request_futures_api('get', 'positionRisk', signed=True, version=3, data=params)
def _create_futures_api_uri(self, path: str, version=1) -> str:
url = self.FUTURES_URL
if self.testnet:
url = self.FUTURES_TESTNET_URL
return f'{url}/v{version}/{path}'
Binance has released a v3 for some endpoint (today July 24th). See the changelog https://binance-docs.github.io/apidocs/futures/en/#get-position-margin-change-history-trade
Can we pass the version as a parameter?