mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
Add support to new calculation endpoints.
This commit is contained in:
24
examples/rest/extra_calcs.py
Normal file
24
examples/rest/extra_calcs.py
Normal 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)
|
||||
Reference in New Issue
Block a user