diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-01-24 15:49:06 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-01-24 15:49:06 +0100 |
commit | e2c6184cdf2c4a9f9bc809088056cc365d243b13 (patch) | |
tree | a7360e559c9e4df69c65de1dc14091a8c917e30e | |
parent | c11e42744cb0355ea4c5bd2c99c7fee5fc5d647c (diff) | |
download | Trader-e2c6184cdf2c4a9f9bc809088056cc365d243b13.tar.gz Trader-e2c6184cdf2c4a9f9bc809088056cc365d243b13.tar.zst Trader-e2c6184cdf2c4a9f9bc809088056cc365d243b13.zip |
Add dummy README and gitignore
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bee8a64 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1 @@ | |||
__pycache__ | |||
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 | ||