blob: bb1273d2fbf58c24d89d0726789102dd19f39913 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Sell all
import portfolio
portfolio.Balance.prepare_trades_to_sell_all(portfolio.market)
portfolio.Trade.prepare_orders(compute_value=lambda x, y: x["bid"] * portfolio.D("1.001"))
portfolio.Trade.print_all_with_order()
portfolio.Trade.run_orders()
# get balance:
portfolio.Balance.fetch_balance(portfolio.market)
# follow orders:
portfolio.Trade.follow_orders(sleep=3)
# open orders:
portfolio.Trade.all_orders(state="open")
# Buy
|