Add support to new calculation endpoints.

This commit is contained in:
itsdeka
2023-01-24 12:35:12 +01:00
committed by Davide Casale
parent ae42fb7d93
commit 02a2e962d3
4 changed files with 62 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
# python -c "from examples.rest.extra_calcs import *"
from bfxapi.client import Client, Constants
bfx = Client(
REST_HOST=Constants.REST_HOST
)
t_symbol_response = bfx.rest.public.get_trading_market_average_price(
symbol="tBTCUSD",
amount=-100,
price_limit="20000.5"
)
print(t_symbol_response)
f_symbol_response = bfx.rest.public.get_funding_market_average_price(
symbol="fUSD",
amount=100,
period=2,
rate_limit="0.00015"
)
print(f_symbol_response)