]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/blame_incremental - README.md
Add build_release in Makefile
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git] / README.md
... / ...
CommitLineData
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