Skip to content

Commit 65423aa

Browse files
committed
chore: fix docs, rest part
1 parent 5130309 commit 65423aa

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ currencies = client.get_currencies()
3737
order_book = client.get_order_book_of_symbol('EOSETH')
3838

3939
# get your wallet balances
40-
account_balance = client.get_wallet_balances()
40+
wallet_balance = client.get_wallet_balances()
4141

4242
# get your spot trading balances
4343
trading_balance = client.get_spot_trading_balances()
4444

4545
# move balance from wallet account to trading account
46-
result = client.transfer_between_wallet_and_exchange('ETH', '3.2', source=Account.WALLET, destination=Account.SPOT)
46+
transfer = client.transfer_between_wallet_and_exchange('ETH', '3.2', source=Account.WALLET, destination=Account.SPOT)
4747

4848
# get your active spot orders
4949
orders = client.get_all_active_spot_orders('EOSETH')
@@ -66,8 +66,6 @@ There are no unsubscriptions methods for the `MarketDataClient`. To stop recievi
6666
# instance a client
6767
client = MarketDataClient()
6868
client.connect()
69-
# close the client
70-
client.close()
7169

7270
# subscribe to public trades
7371
def trades_callback(trades_by_symbol: Dict[str, List[WSTrade]], notification_type):
@@ -88,9 +86,15 @@ def ticker_callback(tikers_of_symbol: Dict[str, WSTicker]):
8886
print(ticker)
8987
client.subscribe_to_ticker(
9088
callback=ticker_callback,
91-
speed=args.TICKER_SPEED._3_SECONDS,
89+
speed=TickerSpeed._3_SECONDS,
9290
result_callback=lambda err, result: print(f'err:{err}, result:{result}')
9391
)
92+
93+
# run for some time
94+
time.sleep(10)
95+
96+
# close the client
97+
client.close()
9498
```
9599

96100
### TradingClient
@@ -113,7 +117,7 @@ client.unsubscribe_to_reports()
113117
client_order_id = str(int(time.time()*1000))
114118

115119
# create an order
116-
create_spot_order(
120+
client.create_spot_order(
117121
client_order_id=client_order_id,
118122
symbol='EOSETH',
119123
side='sell',

0 commit comments

Comments
 (0)