Commit Graph

8068 Commits

Author SHA1 Message Date
c9s
38bac10050 consider fee calculation 2021-01-21 00:49:01 +08:00
c9s
bfc8e511d0 simplify average cost calculation 2021-01-20 23:46:22 +08:00
c9s
16aa070120 assign base/quote currency to the position struct 2021-01-20 23:08:57 +08:00
c9s
8a08c406c3 check symbol for the position update 2021-01-20 17:37:23 +08:00
c9s
48dd697ce3 handling short-to-long and long-to-short position 2021-01-20 17:35:58 +08:00
c9s
c2a27b031e init position with loaded symbols 2021-01-20 16:30:44 +08:00
c9s
0051dbc78a add Position accessor 2021-01-20 16:29:15 +08:00
c9s
079fcf08e3 initialize position map 2021-01-20 16:28:27 +08:00
c9s
09d712416f add json struct tags 2021-01-20 16:15:34 +08:00
c9s
617f5119fd test trade profit calculation 2021-01-20 16:14:02 +08:00
c9s
169af63846 add more position tests 2021-01-20 16:10:20 +08:00
c9s
34148948ab add position and its tests 2021-01-20 16:08:14 +08:00
c9s
42811e8157 alias logrus as log 2021-01-20 02:45:50 +08:00
c9s
9280ec348f clean up pnl command
we should use environment to load the sessions
2021-01-20 02:45:13 +08:00
c9s
0e99d9bdcb move time.Sleep to batch processor to avoid rate limit 2021-01-20 02:32:55 +08:00
c9s
c79c7d1b11 fix margin order/trade sync 2021-01-20 02:09:12 +08:00
c9s
d3f6841a27 improve sync command for margin trades and orders 2021-01-20 01:46:17 +08:00
c9s
7520430b52 support margin api for query trades 2021-01-20 01:27:27 +08:00
c9s
1d8b7dc657 handle trade and order margin field 2021-01-20 01:24:29 +08:00
c9s
334eff4682 update sync service for margin fields 2021-01-19 23:33:06 +08:00
c9s
62f6d857b3 update compiled migrations package for margin columns 2021-01-19 23:31:13 +08:00
c9s
82c1e41254 add migration for margin columns 2021-01-19 23:31:04 +08:00
c9s
a6015fb3e2 add isMargin, isIsolated columns 2021-01-19 23:31:04 +08:00
c9s
c644fb0036 use github.com/adshao/go-binance/v2@20ceb26d876b095b5294490f132d41c764ac09f1 2021-01-19 23:31:04 +08:00
c9s
2c1c9a046b tmp 2021-01-19 23:31:04 +08:00
c9s
677f4b93e6 add margin mode support to QueryOpenOrders 2021-01-19 23:31:04 +08:00
c9s
ad4226f35b support margin order creation 2021-01-19 23:31:04 +08:00
c9s
3eda64641e use exchange's margin option 2021-01-19 23:31:04 +08:00
c9s
7235100140 integrate submitMarginOrder api 2021-01-19 23:31:04 +08:00
c9s
f35e90a4f1 document marginSideEffect 2021-01-19 23:31:04 +08:00
c9s
5cab37488b move MarginSettings struct to a file 2021-01-19 23:31:04 +08:00
c9s
1c77de031a add extended margin fields to the order struct 2021-01-19 23:31:04 +08:00
c9s
f8a9610222 pass isolated margin symbol 2021-01-19 23:31:04 +08:00
c9s
f505c0e2c6 split go routine for keep alive and ping tickers 2021-01-19 23:31:04 +08:00
c9s
d4774f5f0e add IsolatedMargin option 2021-01-19 23:31:04 +08:00
c9s
310943d010 add isolated margin symbol option 2021-01-19 23:31:04 +08:00
c9s
48083151aa turning margin mode 2021-01-19 23:31:04 +08:00
c9s
54c75d4d6e add skeleton for binance margin example 2021-01-19 23:31:04 +08:00
c9s
e8fec434b5 cast exchange instance to margin exchange interface 2021-01-19 23:31:04 +08:00
c9s
3199c63d62 add margin mode 2021-01-19 23:31:04 +08:00
c9s
4002ec80d6 add public only field to the session config struct 2021-01-19 23:31:04 +08:00
c9s
e41f54d57b ignore .mod 2021-01-19 23:31:04 +08:00
c9s
c3db6db590 add margin option 2021-01-19 23:31:04 +08:00
c9s
43133197bb update github.com/adshao/go-binance to 20201124141719-8754a53fcf6a 2021-01-19 23:31:04 +08:00
c9s
1233035780 fix migration script 2021-01-19 23:11:07 +08:00
c9s
0bdfd0f04b check if err is nil 2021-01-18 21:59:02 +08:00
c9s
ddc33f633f check if err is nil 2021-01-18 21:57:57 +08:00
Yo-An Lin
2122bc9b15 Merge pull request #84 from c9s/fix/unique-index
fix unique index for binance self trade
2021-01-18 17:29:19 +08:00
c9s
463a9bf1b7 fix sql syntax 2021-01-18 16:56:01 +08:00
c9s
ad78f81b10 fix unique index for binance self trade 2021-01-18 16:48:47 +08:00