Commit Graph

1529 Commits

Author SHA1 Message Date
bailantaotao
8eb555619f
Merge pull request #1494 from c9s/edwin/okx/place-order
FEATURE: [okx] generate place order request by requestgen
2024-01-11 10:33:31 +08:00
Edwin
260eef3b0c pkg/exchange: generate place order request by requestgen 2024-01-10 16:17:13 +08:00
Edwin
a7aa34c396 pkg/exchange: add comment 2024-01-10 14:07:25 +08:00
Edwin
1dedd32f42 pkg/exchange: support unsubscribe and resubscribe 2024-01-10 13:56:17 +08:00
Edwin
9297293a46 pkg/exchange: refactor query account balance 2024-01-09 15:59:05 +08:00
Edwin
a463c02183 pkg/exchange: generate account by requestgen 2024-01-09 15:58:42 +08:00
bailantaotao
c2e3fed6d3
Merge pull request #1492 from c9s/edwin/okx/refactor-tickers
FEATURE: [okx] generate ticker request by requestgen
2024-01-09 15:38:28 +08:00
bailantaotao
0bf1e4ed59
Merge pull request #1489 from c9s/edwin/okx/refactor-account-info
REFACTOR: [okx] refactor account info
2024-01-09 14:45:17 +08:00
Edwin
188b781116 pkg/exchange: add rate limiter to ticker/tickers 2024-01-09 13:57:19 +08:00
Edwin
6d7a01ffae pkg/exchange: generate ticker request by requestgen 2024-01-09 13:57:03 +08:00
Edwin
caef31d760 pkg/exchange: early return if error 2024-01-09 11:58:43 +08:00
Edwin
6e160e7a36 pkg/exchange: add rate limiter to QueryMarkets 2024-01-09 11:56:10 +08:00
Edwin
ba5882f7b6 pkg/exchange: generate instrument request by requestgen 2024-01-09 11:55:49 +08:00
Edwin
147b31d81d pkg/exchange: refactor account stream 2024-01-09 10:59:35 +08:00
bailantaotao
a680df2938
Merge pull request #1486 from c9s/edwin/okx/add-market-trade-stream
FEATURE: [okx] support market trade streaming
2024-01-09 10:58:24 +08:00
Edwin
2e34f7840a pkg/exchange: support market trade streaming 2024-01-08 21:27:26 +08:00
c9s
11309ac8c8
Merge pull request #1487 from c9s/c9s/bitget-ignore-offline-symbols
FIX: [bitget] ignore offline symbols
2024-01-08 18:19:01 +08:00
c9s
e358da10dd
bitget: log symbol status 2024-01-08 18:13:26 +08:00
c9s
cfe3b6466c
update bitget v2 get_symbols_request_requestgen 2024-01-08 17:47:52 +08:00
c9s
33deaea6e5
bitget: bitget ignore offline symbols 2024-01-08 17:46:09 +08:00
Edwin
0b906606fe pkg/exchange: refactor book and kline 2024-01-08 10:30:11 +08:00
c9s
6e03626b36
Merge pull request #1476 from c9s/edwin/okx/add-streaming-test
CHORE: [okex] add stream test for book
2024-01-03 16:37:12 +08:00
bailantaotao
769d3ce2d8
Merge pull request #1456 from c9s/edwin/bitget/get-account-assets
FEATURE: [bitget] get account assets
2024-01-03 13:01:35 +08:00
Edwin
b5ff066aa2 pkg/exchange: print symbol 2024-01-03 11:30:50 +08:00
Edwin
30164acdcf pkg/exchange: use v2 get account asset api 2024-01-03 11:25:46 +08:00
Edwin
9ad94aa7e0 pkg/exchange: add stream test for book 2024-01-02 12:02:33 +08:00
chiahung.lin
bfd9c8ac64 FEATURE: run state machine
FEATURE: support recover

FEATURE: add order into orderStore and recover position

recover position/budget

FEATURE: support recover budget
2023-12-20 16:02:37 +08:00
c9s
841229518a
bitget: add more debug logs for orderEvent and tradeEvent 2023-12-18 16:31:04 +08:00
c9s
038d180711
bitget: check bitget websocket trade id and order status 2023-12-18 14:44:33 +08:00
Edwin
c5decf9bf8 pkg/exchange: support v2 get asset api 2023-12-18 12:17:49 +08:00
c9s
2c7e42922b
Merge pull request #1429 from c9s/edwin/bybit/get-fee-rate-on-private-stream-only 2023-12-13 18:50:19 +08:00
Edwin
29550f0013 pkg/exchange: we don't need the fee rate in the public stream 2023-12-13 13:53:58 +08:00
c9s
6cbb17fb76
all: refactor log formatter functions 2023-12-13 09:47:18 +08:00
c9s
f3ce4c2cc6
bitget: refactor debug function tool 2023-12-13 09:28:34 +08:00
c9s
b022a6119f
bitget: add bitget log prefix 2023-12-13 09:28:34 +08:00
Edwin
c2724c4f62 pkg/exchange: fix price is zero when order not executed 2023-12-12 17:30:51 +08:00
c9s
c5282a8f9b
bitget: add more debug logs 2023-12-12 16:37:43 +08:00
c9s
b9c4002704
bitget: handle order type limit maker 2023-12-08 15:18:34 +08:00
c9s
214f9fe75e
bitget: improve bitget websocket depth subscription 2023-12-07 17:38:57 +08:00
c9s
96f6f9e0d0
exchange/retry: add QueryOrderUntilCancelled 2023-12-07 16:18:23 +08:00
chiahung.lin
c67737a6d6 use retry package 2023-12-06 16:16:17 +08:00
chiahung.lin
c906d6a74d rename variable 2023-12-06 11:27:06 +08:00
chiahung.lin
d54b7365dd FEATURE: use types.OrderMap to avoid missing and duplicated orders 2023-12-05 20:10:37 +08:00
chiahung
a1d98e25c6 FEATURE: use max v3 new open orders api 2023-12-05 19:57:00 +08:00
chiahung.lin
165e788c3d fix 2023-12-05 16:59:26 +08:00
chiahung.lin
9fab37a284 use getLaunchDate 2023-12-05 15:34:31 +08:00
chiahung.lin
21c037a877 FIX: fix list closed orders api limit 2023-12-04 20:01:54 +08:00
chiahung.lin
800148b271 remain only template part 2023-11-23 16:45:28 +08:00
kbearXD
9722c3eb49
Merge pull request #1421 from c9s/feature/maxapi/get-closed-orders
FEATURE: use new max v3 api to query closed orders by timestamp
2023-11-23 12:46:30 +08:00
Edwin
87d763598f pkg/exchange: use backoff retry 2023-11-21 18:01:21 +08:00
Edwin
51718b6eb2 pkg/exchnage: add log rate limiter to stream event 2023-11-21 18:01:18 +08:00
chiahung
7cb8da08cd use asc as order by to query closed orders 2023-11-21 17:14:33 +08:00
c9s
c360c6045c
bbgo: call retry.QueryAccountUntilSuccessful in the startup time 2023-11-20 16:20:39 +08:00
chiahung.lin
ce76ad3c03 use OrderByType 2023-11-20 15:32:04 +08:00
c9s
5795a71111
binance,max: store original order status into the order struct 2023-11-17 17:14:52 +08:00
c9s
3cfc810f8d
max: group the request building statement 2023-11-17 16:57:47 +08:00
c9s
f223703247
max: force type check on max.Exchange 2023-11-17 16:57:47 +08:00
chiahung.lin
592cdede66 FEATURE: use new max v3 api to query closed orders by timestamp 2023-11-17 16:21:20 +08:00
Edwin
4f224c1c2a *: fix comments 2023-11-17 12:24:04 +08:00
Edwin
5eb1ddb49a pkg/exchange: fix out-of-index 2023-11-16 13:33:42 +08:00
Edwin
93f8b79b69 pkg/exchange: use GTC if time-in-force empty 2023-11-16 13:33:17 +08:00
Edwin
6d39c9a5d1 pkg/exchange: use the now - 90 days instead of return err if since is 90 days earlier 2023-11-15 22:22:55 +08:00
Edwin
687ffe985c pkg/exchange: use time.Time instead of int64 to represent time 2023-11-15 22:20:26 +08:00
Edwin
cf527a6f05 pkg/exchange: make the CTime and UTime to qualified name 2023-11-15 17:16:07 +08:00
Edwin
4f94f7acc0 pkg/exchange: implement order trade user stream 2023-11-15 17:16:05 +08:00
bailantaotao
580c6d2030
Merge pull request #1417 from c9s/edwin/skip-ping-pong-event
REFACTOR: [stream] skip pong event on emitting raw message
2023-11-14 20:49:13 +08:00
bailantaotao
43c50b46a6
Merge pull request #1415 from c9s/edwin/bitget/use-v2-tickers
FEATURE: [bitget] use v2 tickers
2023-11-14 20:48:52 +08:00
Edwin
562f85af75 pkg/exchange: rename v2Client -> v2client 2023-11-14 20:42:11 +08:00
Edwin
5808e0184b pkg/types: skip pong event on emitting raw message 2023-11-14 20:41:07 +08:00
bailantaotao
8ca8e4c946
Merge pull request #1416 from c9s/edwin/bitget/add-restful-api-validator
FEATURE: [bitget] add response validator
2023-11-14 20:38:15 +08:00
Edwin
53bce6d5c1 pkg/exchange: use v2 query ticker 2023-11-14 15:40:45 +08:00
Edwin
737f2fc86d pkg/exchange: add response validator 2023-11-14 15:26:07 +08:00
Edwin
5e5b8e1388 pkg/exchange: use v2 symbols 2023-11-14 14:35:16 +08:00
Edwin
eb04eaeea4 pkg/exchange: types.kline end time should -1 time.Millisecond 2023-11-14 14:21:31 +08:00
Edwin
755ea5e427 pkg/exchange: implement query kline api 2023-11-14 14:21:29 +08:00
bailantaotao
784030821e
Merge pull request #1406 from c9s/edwin/bitget/add-balance-event
FEATURE: [bitget]add balance event
2023-11-14 11:12:41 +08:00
bailantaotao
594ad89c67
Merge pull request #1409 from c9s/edwin/bybit/pint-log
CHORE: [bybit] print fee rate log
2023-11-13 12:28:55 +08:00
Edwin
ef280077cd pkg/exchange: print fee rate log 2023-11-13 11:53:41 +08:00
c9s
38507f4dd1
bitget: add channel api code 2023-11-11 07:59:44 +08:00
Edwin
f49b14ac45 pkg/exchange: add balance event 2023-11-10 22:35:39 +08:00
Edwin
6c96d12d99 pkg/exchange: add login method 2023-11-10 21:56:18 +08:00
Edwin
639947c8b7 pkg/exchange: support cancel order 2023-11-10 16:41:42 +08:00
Edwin
a26b158230 pkg/exchange: support query trades 2023-11-10 16:31:15 +08:00
bailantaotao
58a810ecc9
Merge pull request #1399 from c9s/edwin/bitget/submit-orders
FEATURE: [bitget] support submit order
2023-11-10 16:02:59 +08:00
Edwin
cb5e305fed pkg/exchange: support submit order 2023-11-10 15:47:44 +08:00
c9s
610de4c10c
Merge pull request #1403 from c9s/edwin/upgrade-requestgen 2023-11-09 11:11:34 +08:00
Edwin
3978fca27d pkg/exchange: support query closed orders 2023-11-09 09:26:59 +08:00
bailantaotao
e70c04cb65
Merge pull request #1392 from c9s/edwin/bitget/QueryOpenOrders
FEATURE: [bitget] add query open orders
2023-11-09 09:11:32 +08:00
Edwin
2c072281d7 pkg/exchange: add assertion for api response 2023-11-08 22:43:01 +08:00
Edwin
2d650cd1d9 pkg/exchange: add defensive program to ensure the order length is expected 2023-11-08 22:08:21 +08:00
Edwin
b41f4712d7 pkg/exchange: add fee recover 2023-11-07 17:17:38 +08:00
Edwin
2049e71cf6 pkg/exchange: rm the retry 2023-11-07 14:53:00 +08:00
Edwin
f595cc9cc0 pkg/exchange: add query open orders 2023-11-06 23:40:22 +08:00
Edwin
82ac8f184f pkg/exchange: to periodically fetch the fee rate 2023-11-06 22:17:29 +08:00
bailantaotao
d758efc9ff
Merge pull request #1380 from bailantaotao/edwin/bitget/add-kline
FEATURE: [bitget] support kline subscription on stream
2023-11-01 19:32:14 +08:00
Edwin
00d4805321 pkg/exchange: add query tickers api 2023-11-01 16:14:21 +08:00
Edwin
2cea089404 pkg/exchange: add rate limiter for query ticker, account 2023-11-01 13:20:46 +08:00
Edwin
102b662f7c pkg/exchange: support kline subscription on stream 2023-11-01 11:56:58 +08:00
Edwin
4bc177f21b pkg/exchange: refactor get symbol api 2023-10-31 14:48:40 +08:00
chiahung
d33240ec83 rename and simplify import 2023-10-30 17:17:36 +08:00
chiahung
671772a767 FIX: retry to get open orders only for 5 times and do not sync orders updated in 3 min 2023-10-30 16:28:34 +08:00
c9s
dcd837f0f9
Merge pull request #1372 from bailantaotao/edwin/fix-precision
FIX: [bybit][kucoin] fix negative volume, price precision
2023-10-28 08:09:51 +08:00
Edwin
39c3d23da3 pkg/exchange: support ping/pong 2023-10-27 16:45:41 +08:00
Edwin
d07b766939 pkg/exchange: Use the same conn to avoid concurrent write issues. 2023-10-27 16:03:03 +08:00
Edwin
ba7e26c800 pkg/exchange: use NumFractionalDigits instead of math.Log10(Float64) due to precision problem 2023-10-27 15:28:35 +08:00
Edwin
2a85bbebf0 pkg/exchange: fix precision 2023-10-27 12:52:36 +08:00
Edwin
55d444d86a pkg/exchange: add jumpIfEmpty opts to closed order batch query 2023-10-26 09:31:25 +08:00
Edwin
881db49b70 pkg/exchange: rename tradeRateLimiter to queryOrderTradeRateLimiter 2023-10-25 21:36:26 +08:00
Edwin
c611cfe73b pkg/exchange: add a jumpIfEmpty to batch trade option 2023-10-25 21:30:54 +08:00
Edwin
a18b1be44e pkg/exchange: support market trade stream on bitget 2023-10-20 16:42:09 +08:00
bailantaotao
f8c47f72bf
Merge pull request #1344 from bailantaotao/edwin/bitget/public-stream-book
FEATURE: [bitget] support book stream on bitget
2023-10-20 14:22:42 +08:00
c9s
eb404a5f9b
Merge pull request #1280 from c9s/feature/bitget
FEATURE: [bitget] integrate QueryMarkets, QueryTicker and QueryAccount api
2023-10-20 13:36:07 +08:00
Edwin
51d86ca059 pkg/exchange, types: support book stream on bitget 2023-10-19 15:40:32 +08:00
gx578007
10daeab1cb FIX: [max] remove outdated margin fields 2023-10-17 16:11:34 +08:00
bailantaotao
fb110a1d5b
Merge pull request #1339 from bailantaotao/edwin/support-200-depth
FEATURE: [BYBIT] support order book depth 200 on bybit
2023-10-12 21:16:56 -05:00
c9s
20df2ef3c8
Merge pull request #1335 from c9s/c9s/feature/private-channels
FEATURE: add custom private channel support to max
2023-10-12 17:20:06 +08:00
Edwin
ef582f6e52 pkg/exchange: support order book depth 200 on bybit 2023-10-12 11:11:26 +08:00
c9s
a13c65ef1d
Merge pull request #1332 from MengShue/add_supported_interval
FEATURE: add supported interval for okex
2023-10-05 21:47:51 +08:00
c9s
e01d89d619
Merge pull request #1232 from zenixls2/feature/forceOrder
feature: add forceOrder api for binance to show liquid info
2023-10-05 21:46:49 +08:00
zenix
590e1648eb fix: use MillisecondTimestamp instead 2023-10-05 16:16:27 +09:00
c9s
78ea940569
max: support private channel setter 2023-10-04 18:02:18 +08:00
Alan.sung
2309bbdee8 print local interval in error message 2023-10-04 16:24:32 +08:00
c9s
42d2ffd502
Merge pull request #1334 from c9s/c9s/max-http-transport
CHORE: [maxapi] change default http transport settings
2023-10-04 15:28:18 +08:00
c9s
4700e754a8
maxapi: change default http transport settings 2023-10-04 15:17:22 +08:00
Alan.sung
3b793b79b6 turn ToGlobalInterval to ToLocalInterval, use Map to turn to local interval 2023-10-04 14:23:13 +08:00
Alan.sung
0b5ce231ff fix lint and rename i with in 2023-10-04 12:39:30 +08:00
Alan.sung
a83335817e use interval [1m/3m/5m/15m/30m/1H/2H/4H] and [/6Hutc/12Hutc/1Dutc/2Dutc/3Dutc/1Wutc/1Mutc] and add unit test 2023-10-04 12:39:30 +08:00
Alan.sung
d200232c13 add supported interval for okex 2023-10-04 12:38:59 +08:00
c9s
32b8ca9a41
Merge pull request #1312 from MengShue/add_two_new_receiver_for_okex
FEATURE: add QueryClosedOrders() and QueryTrades() for okex
2023-10-04 12:14:32 +08:00
Alan.sung
b1c6e01e45 use types.StrInt64 for billID and add more comment for QueryTrades() and comment out personal unit test 2023-10-03 15:14:49 +08:00
Alan.sung
cc55d67eeb use default limit if not pass AND add more unit test 2023-10-03 12:29:30 +08:00
Alan.sung
648b82ead3 use NewGetTransactionHistoryRequest for QueryTrades and use billID for pagination 2023-10-02 18:47:05 +08:00
Alan.sung
6fd86fefda add unit test for QueryTrade() 2023-10-02 10:49:33 +08:00
c9s
2058ce808b
Merge pull request #1325 from zenixls2/fix/listenkeyexpired 2023-09-27 22:46:44 +08:00
bailantaotao
d37682e22c
Merge pull request #1326 from bailantaotao/ediwn/fix-bybit-query-trades
FIX: [bybit] fix bybit query trades
2023-09-27 15:28:34 +08:00
Edwin
add1c73656 pkg/exchange: support pagination 2023-09-27 14:56:46 +08:00
zenix
08dad1c497 fix: replace json.Number with MillisecondTimestamp in types 2023-09-27 15:52:02 +09:00
Edwin
9a05357350 pkg/exchange: remove the limitation of query range due to bybit support the query 2023-09-27 14:44:11 +08:00
Alan.sung
3b63858d23 handle pagenation for QueryTrade 2023-09-27 11:06:41 +08:00
zenix
2e4336a604 fix: listenKeyExpired event sends string timestamp 2023-09-26 18:41:15 +09:00
zenix
13b9fc4252 add forgotten emit 2023-09-26 18:36:46 +09:00
Edwin
9f83165032 pkg/exchange: use balance update instead of snapshot event 2023-09-26 17:13:23 +08:00
Edwin
70884538bc pkg/exchange: emit balance snapshot 2023-09-26 17:13:20 +08:00
zenix
7ae56a83da feature: add forceOrder api for binance to show liquid info 2023-09-26 15:22:09 +09:00
Alan.sung
ad7206271f QueryTrades only allow query by time interval, required 2023-09-26 01:06:58 +08:00
Alan.sung
99a69f4f2f add QueryClosedOrders() and QueryTrades() for okex, also fix conflict for QueryOrderTrades() and update typo error in QueryOrderTrades() 2023-09-26 01:05:09 +08:00
chiahung
fdfa3639ff FEATURE: use retry query order until successful 2023-09-19 11:12:14 +08:00
kbearXD
6d0c266513
Merge pull request #1302 from c9s/feature/grid2/use-quote-quantity
FEATURE: use quote quantity if there is QuoteQuantity in trade
2023-09-19 10:41:34 +08:00
c9s
a22c41f47d
Merge pull request #1307 from MengShue/add_QueryOrderTrades_for_okex
FEATURE: add QueryOrderTrades() for okex
2023-09-18 16:14:41 +08:00
c9s
542944b4cc
max: use websocket update time (TU) field 2023-09-17 18:29:14 +08:00
Alan.sung
a47c846fa5 add QueryOrderTrades() for okex 2023-09-14 14:54:02 +08:00
Edwin
e56d8d1607 pkg/exchange: emit auth in each exchange 2023-09-14 12:01:20 +09:00
bailantaotao
388b9c3f9f
Merge pull request #1308 from bailantaotao/edwin/add-trade-stream
FEATURE: [bybit] support market trade
2023-09-11 18:02:03 +08:00
c9s
4f82843b40
Merge pull request #1306 from andycheng123/improve/binance-api
Improve: Update Binance futures account api to v2
2023-09-11 11:14:56 +08:00
Edwin
1c5ad1d1f0 pkg/exchange: support market trade for bybit 2023-09-11 00:54:02 +08:00
bailantaotao
439f45bdf9
Merge pull request #1304 from bailantaotao/edwin/support-unsubscribe
FEATURE: [bybit] support unsubscribe
2023-09-08 18:22:53 +08:00
Andy Cheng
40dbfd5b42
improve/binance: rename variable to comply with golang naming convention 2023-09-08 18:14:51 +08:00
c9s
09ed7b141c
Merge pull request #1305 from MengShue/refactor_okex_for_future
FEATURE: refactor okex to future use
2023-09-07 22:57:29 +08:00
Andy Cheng
c9d67f8131
improve/binance: update futures account api to v2 2023-09-07 15:21:47 +08:00
Alan.sung
9a66f82d8c remove err since handling init for client 2023-09-07 11:25:12 +08:00
Alan.sung
dbf29f8cd2 add constructor to check url error 2023-09-06 21:21:13 +08:00
Alan.sung
7550ea2be1 refactor okex to future use 2023-09-06 19:14:21 +08:00
bailantaotao
1338499e3f
Merge pull request #1303 from bailantaotao/edwin/add-default-time
FEATURE: set default 30d for closed order batch query
2023-09-06 12:41:47 +08:00
Edwin
da13bb680e pkg/exchange: support unsubscribe for bybit 2023-09-06 12:18:47 +08:00
Edwin
f5a66baad3 pkg/exchage: set default 30d for closed order batch query 2023-09-05 22:04:16 +08:00
chiahung
db376f8483 FEATURE: use quote quantity if there is QuoteQuantity in trade 2023-09-05 18:28:10 +08:00
bailantaotao
7461b60b6b
Merge pull request #1299 from bailantaotao/edwin/add-server-time
pkg/exchange: add time to SliceOrderBook
2023-09-05 16:36:20 +08:00
c9s
415a28c32b
Merge pull request #1300 from bailantaotao/edwin/fix-okex-bid-ask
pkg/exchange: fix okex bookticker bug
2023-09-01 18:07:59 +08:00
Edwin
412d0e0558 *: fix lint 2023-09-01 17:54:43 +08:00
Edwin
50bfd8ee0e pkg/exchange: add time to SliceOrderBook 2023-09-01 17:54:40 +08:00
Edwin
594ab9cbaf pkg/exchange: fix okex bookticker bug 2023-09-01 17:12:32 +08:00
c9s
2c4b6e8cd1
Merge pull request #1238 from MengShue/add_unit_test_for_okex
TEST: add unit test for okex exchange
2023-08-24 12:44:45 +08:00
Alan.sung
f8ae408fad add continue in err != nil 2023-08-23 16:16:38 +08:00
Alan.sung
26cde5d57c use multierr to handle err return from toGlobalOrder 2023-08-23 15:44:51 +08:00
Alan.sung
a0946fbd42 use lower case in error string and add comment for IOC, FOK 2023-08-22 17:23:16 +08:00
Alan.sung
a4aa9c2eda remove mmp and mmp_post_only 2023-08-22 15:14:18 +08:00
bailantaotao
edfcbb01c0
Merge pull request #1293 from bailantaotao/edwin/fix-quantity-in-buy-market-order
FIX: [bybit] quantity in buy market order
2023-08-22 11:42:08 +08:00
Edwin
9ee7377f36 pkg/exchange: fix quantity for buy market order 2023-08-21 15:59:13 +08:00
Alan.sung
3dce63710a Fix to fit all reviews last time 2023-08-21 15:31:30 +08:00
Edwin
3ad7075ace pkg/exchange: fix quantity coin unit 2023-08-18 01:08:09 +08:00
c9s
ed948b2642
max: fix QuerySpotAccount method return value 2023-08-17 17:42:54 +08:00
bailantaotao
3eeba521f6
Merge pull request #1289 from bailantaotao/edwin/fix-misc-2
FIX: [bybit] fix misc
2023-08-16 22:07:57 +08:00
bailantaotao
b6c9f14dcc
Merge pull request #1285 from bailantaotao/edwin/query-order
FEATURE: [bybit] implement ExchangeOrderQueryService interface
2023-08-16 22:07:36 +08:00
Edwin
6cfbb84bb5 pkg/exchange: fix order id check for the submitted orders 2023-08-16 14:47:35 +08:00
c9s
252f4fbccc
deposit2transfer: call QuerySpotAccount for getting the spot balance 2023-08-16 12:02:18 +08:00
c9s
5f54c303fb
bitget: fix fixedpoint.Value init value 2023-08-15 16:40:15 +08:00
c9s
4a64701e16
bitget: implement QueryAccount 2023-08-15 16:38:48 +08:00
c9s
40762cad35
bitget: implement QueryTicker 2023-08-15 16:38:48 +08:00
c9s
2fda4477bd
bitget: implement QueryMarkets 2023-08-15 16:38:47 +08:00
Alan.sung
672a878194 update toGlobalOrder by referencing toGlobalOrders 2023-08-15 14:26:27 +08:00
Edwin
e4ebe1cffd pkg/exchange: supprot queryOrderTrades 2023-08-15 14:23:34 +08:00
Edwin
3207a8227c pkg/exchange: add QueryOrder api 2023-08-15 14:23:31 +08:00
Edwin
ed47d5064a pkg/exchange: fix the order id check for cancel order 2023-08-14 18:13:24 +08:00
Edwin
187429081f pkg/exchange: fix orderId json tag 2023-08-14 18:06:14 +08:00
Alan.sung
ea5b45bfe4 queryOrder() and test for it 2023-08-11 09:28:58 +08:00
Edwin
54e7065d8a pkg/exchange: implement trade event 2023-08-10 19:58:27 +08:00
Edwin
affff32599 pkg/exchange: get fee rate before connect 2023-08-10 17:57:47 +08:00
Edwin
0b03336fb0 pkg/exchange: support GetFeeRates on bybit exchange 2023-08-10 15:26:51 +08:00
Edwin
ace2c55a17 exchange/bybit: add fee rate restful api 2023-08-10 15:02:30 +08:00
Edwin
4cee22ce31 pkg/exchage: support k line websocket event 2023-08-10 11:07:13 +08:00
Edwin
e9d0ce5bbf pkg/exchage: support k line rest api 2023-08-10 11:07:10 +08:00
bailantaotao
24d240b1f3
Merge pull request #1279 from bailantaotao/edwin/add-query-acct
FEATURE: [bybit] support query account/balance api
2023-08-09 15:33:04 +08:00
Alan.sung
1c5d2dc759 add QueryOrder in okex exchange.go 2023-08-09 15:05:26 +08:00
Edwin
65b06ff401 pkg/exchange: add query account function 2023-08-09 14:05:57 +08:00
Edwin
dfead5ebed pkg/exchange: add query account balance api 2023-08-09 14:05:57 +08:00
Edwin
8c22863334 pkg/exchange: mv BalanceEvent to bybitapi and rename to WalletBalances 2023-08-09 14:05:55 +08:00
c9s
4ed402b775
max: update deposit states and add more fields to deposit 2023-08-08 20:51:48 +08:00
c9s
b711e1e439
Merge pull request #1275 from c9s/c9s/strategy-deposit2transfer
FEATURE: [strategy] add deposit2transfer tool
2023-08-08 15:13:06 +08:00
Edwin
b27395f6f4 pkg/exchange: avoiding GC panic caused by a rapid creation/removal slice of pointers 2023-08-08 14:11:19 +08:00
c9s
25298720d0
max: implement TransferMarginAccountAsset on max 2023-08-08 13:16:11 +08:00
c9s
5460ebdbf4
max: add margin transfer request 2023-08-08 12:49:05 +08:00
c9s
241ce657c3
binance: remove isMargin check 2023-08-08 12:01:30 +08:00
Edwin
f664ef2262 pkg/exchange: add order event 2023-08-08 11:42:02 +08:00
c9s
4c4b9db47a
types,binance: add confirmation and unlockConfirm fields to Deposit 2023-08-08 11:20:17 +08:00
c9s
9248f8ac24
binance: define DepositStatus for binance 2023-08-08 11:20:17 +08:00
c9s
9346e7d1f6
binance: replace emptyTime with IsZero 2023-08-08 11:20:17 +08:00
c9s
0118f33bfc
binance: finalize TransferMarginAccountAsset method 2023-08-08 11:20:17 +08:00
c9s
8b1cefc699
binance: integerate isolated margin / cross margin transfer 2023-08-08 11:20:17 +08:00
c9s
92691eda24
binanceapi: add margin transfer api 2023-08-08 11:20:17 +08:00
Edwin
8b68354d89 pkg/exchange: add balance snapshot event 2023-08-08 10:04:25 +08:00
Edwin
3e4e46de20 pkg/exchange: to de-pointer the value in WsOpEvent and fix test assertion 2023-08-07 15:59:50 +08:00
Edwin
84fa19afee pkg/exchange: add auth function for ws 2023-08-07 14:58:20 +08:00
Edwin
a6047f629d pkg/exchange: implement bybit stream ping 2023-08-04 18:00:50 +08:00
Edwin
e1bae5dba0 pkg/exchange: implement bybit stream ping 2023-08-02 17:55:20 +08:00
bailantaotao
ae61e10c6a
Merge pull request #1255 from bailantaotao/edwin/query-trades
FEATURE: [bybit] add query trade api
2023-08-01 18:02:29 +08:00
Edwin
4363f0ae7b pkg/exchange: add query trade api 2023-08-01 16:31:49 +08:00
c9s
54e0e1024c
Merge pull request #1254 from c9s/v1.50
merge back v1.50 into main
2023-07-31 20:24:00 +08:00
Alan.sung
b0ccc7e51b use &PublicDataService{} to create it as a pointer object and rename ser to srv 2023-07-31 11:00:38 +09:00
Edwin
86c643b513 pkx/exchange: fix batch query trade missing time range 2023-07-28 22:54:48 +08:00
bailantaotao
7eb6e402ca
Merge pull request #1252 from bailantaotao/edwin/query-closed-order
FEATURE: [bybit] query closed order
2023-07-28 14:40:38 +08:00
Edwin
d2ad504579 pkg/exchange: add QueryClosedOrders 2023-07-28 10:15:08 +08:00
Edwin
f25ab567eb pkg/exhcange: return err on max queryClosedOrdersByLastOrderID 2023-07-27 18:35:58 +08:00
Edwin
1760a5b8d6 pkg/exchange: try to parse order id to integer 2023-07-27 18:09:43 +08:00
Edwin
d8b8e7f2ac pkg/exchange: rename OpenOrders to Orders 2023-07-27 17:35:33 +08:00
c9s
b02ac837ea
max: handle SelfTradeBidFeeDiscounted 2023-07-27 16:28:54 +08:00
Edwin
574d7c0c74 pkg/exchange: rm redundant prefix 2023-07-27 10:31:24 +08:00
Edwin
5105046053 pkg/exchange: support cancel order 2023-07-26 22:24:20 +08:00
Edwin
151e8d2acf pkg/exchange: support place order for bybit 2023-07-26 21:44:49 +08:00
bailantaotao
3fd66199d7
Merge pull request #1248 from bailantaotao/edwin/add-query-open-orders
pkg/exchange: add QueryOpenOrders API for bybit
2023-07-26 15:12:37 +08:00
c9s
cddb7874ce
maxapi: set user agent 2023-07-26 14:35:33 +08:00
Edwin
6d4deb54cc pkg/exchange: add QueryOpenOrders API for bybit 2023-07-26 14:18:02 +08:00
bailantaotao
ff78637c8f
Merge pull request #1244 from bailantaotao/edwin/add-ticker
FEATURE: support QueryTickers API on bybit
2023-07-25 20:35:56 +08:00
Edwin
b71030c5db pkg: return err if rate limit err 2023-07-25 15:09:57 +08:00
Edwin
ef8d1c7046 pkg/exchange: support QueryTickers API on bybit 2023-07-25 15:02:38 +08:00
c9s
fcca3f6432
types: add fee discounted field to the global trade struct 2023-07-25 14:57:10 +08:00
c9s
4de82ccdff
max: use types.MillisecondTimestamp for UpdateTime field 2023-07-25 13:37:31 +08:00
c9s
f5feb72355
max: add fee_discounted to Trade struct for RESTful api 2023-07-25 13:35:08 +08:00
bailantaotao
157de4b2ee
Merge pull request #1243 from bailantaotao/edwin/add-query-markets
FEATURE: pkg/exchange: add query market to bybit exchange
2023-07-24 21:52:31 +08:00
Edwin
3c32acc3ed pkg/exchange: add query market to bybit 2023-07-24 20:18:44 +08:00
c9s
afc5dbb951
Merge remote-tracking branch 'origin/v1.50' 2023-07-24 17:02:08 +08:00