mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Rewrite all rest examples according to v3.0.0b3's changes.
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
# python -c "import examples.rest.public.conf"
|
||||
|
||||
from bfxapi import Client, PUB_REST_HOST
|
||||
from bfxapi import Client
|
||||
|
||||
from bfxapi.rest.enums import Config
|
||||
bfx = Client()
|
||||
|
||||
bfx = Client(rest_host=PUB_REST_HOST)
|
||||
# Prints a map from symbols to their API symbols
|
||||
print(bfx.rest.public.conf("pub:map:currency:sym"))
|
||||
|
||||
print("Available configs:", [ config.value for config in Config ])
|
||||
# Prints all the available exchange trading pairs
|
||||
print(bfx.rest.public.conf("pub:list:pair:exchange"))
|
||||
|
||||
# Prints a map from symbols to their API symbols (pub:map:currency:sym)
|
||||
print (bfx.rest.public.conf(Config.MAP_CURRENCY_SYM))
|
||||
|
||||
# Prints all the available exchange trading pairs (pub:list:pair:exchange)
|
||||
print(bfx.rest.public.conf(Config.LIST_PAIR_EXCHANGE))
|
||||
|
||||
# Prints all the available funding currencies (pub:list:currency)
|
||||
print(bfx.rest.public.conf(Config.LIST_CURRENCY))
|
||||
# Prints all the available funding currencies
|
||||
print(bfx.rest.public.conf("pub:list:currency"))
|
||||
|
||||
Reference in New Issue
Block a user