Rewrite all rest examples according to v3.0.0b3's changes.

This commit is contained in:
Davide Casale
2023-10-26 17:46:38 +02:00
parent 9287723678
commit 1ec6c49428
15 changed files with 141 additions and 139 deletions

View File

@@ -1,11 +1,14 @@
# python -c "import examples.rest.public.get_candles_hist"
from bfxapi import Client, PUB_REST_HOST
from bfxapi import Client
bfx = Client(rest_host=PUB_REST_HOST)
bfx = Client()
print(f"Candles: {bfx.rest.public.get_candles_hist(symbol='tBTCUSD')}")
# Be sure to specify a period or aggregated period when retrieving funding candles.
# If you wish to mimic the candles found in the UI, use the following setup to aggregate all funding candles: a30:p2:p30
print(f"Candles: {bfx.rest.public.get_candles_hist(tf='15m', symbol='fUSD:a30:p2:p30')}")
# If you wish to mimic the candles found in the UI, use the following setup
# to aggregate all funding candles: a30:p2:p30
print(
f"Candles: {bfx.rest.public.get_candles_hist(tf='15m', symbol='fUSD:a30:p2:p30')}"
)