diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb1273d --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,26 @@ | |||
1 | # Sell all | ||
2 | |||
3 | import portfolio | ||
4 | portfolio.Balance.prepare_trades_to_sell_all(portfolio.market) | ||
5 | |||
6 | portfolio.Trade.prepare_orders(compute_value=lambda x, y: x["bid"] * portfolio.D("1.001")) | ||
7 | |||
8 | portfolio.Trade.print_all_with_order() | ||
9 | |||
10 | portfolio.Trade.run_orders() | ||
11 | |||
12 | |||
13 | # get balance: | ||
14 | |||
15 | portfolio.Balance.fetch_balance(portfolio.market) | ||
16 | |||
17 | # follow orders: | ||
18 | |||
19 | portfolio.Trade.follow_orders(sleep=3) | ||
20 | |||
21 | # open orders: | ||
22 | |||
23 | portfolio.Trade.all_orders(state="open") | ||
24 | |||
25 | |||
26 | # Buy | ||