c9s
3428aeba03
apply default exchange fee rate
...
fixes #566
2022-06-03 03:24:34 +08:00
c9s
813166dd92
add TestWithdrawBatchQuery test
2022-06-02 13:56:24 +08:00
c9s
5527b3c48a
rename Withdrawal to Withdraw since it's a noun
2022-06-02 11:42:03 +08:00
c9s
c0f5c1963e
refactor and clean up withdraw history query method
2022-06-02 11:40:05 +08:00
c9s
e5ca6504f5
binance: add get_withdraw_history_request
2022-06-02 11:32:21 +08:00
c9s
165b4fdb20
binance: remove loop from the withdraw history api
2022-06-02 02:31:46 +08:00
c9s
5eaa4706f0
binance: set exchange field for margin records
2022-06-01 19:40:29 +08:00
c9s
bf92e28461
service: implement margin service for syncing margin related data
2022-05-31 17:43:17 +08:00
c9s
e66eb08db4
batch: refactor batch query
2022-05-31 00:59:33 +08:00
c9s
d72b56f51f
binance: refine liquidation history api
2022-05-30 18:08:54 +08:00
c9s
61a53947ee
binance: re-organize convert functions
2022-05-29 12:03:21 +08:00
c9s
11075b0d1a
cmd: add marginInterestsCmd
2022-05-29 12:01:20 +08:00
c9s
70f0dccb9f
binance: convert loans and repays to global types
2022-05-29 11:52:25 +08:00
c9s
409ad9b75c
binance: adjust margin history interface
2022-05-29 01:42:08 +08:00
c9s
f58f44ffd8
binance: refactor query methods
2022-05-29 01:21:43 +08:00
c9s
4c30fce917
binance: add GetMarginInterestHistoryRequest api
2022-05-29 01:13:33 +08:00
c9s
e72f8bcd15
binance: fix and rename margin liquidation history request
2022-05-29 00:57:46 +08:00
c9s
1ab10eb574
binance: fix and add loan/repay history test
2022-05-29 00:52:22 +08:00
zenix
71fe6c2d26
feature: SLTP from bookticker. fix: bookTicker typename, depth buffer error message
2022-05-12 19:43:04 +09:00
zenix
c81af9ce91
fix: binance futures sync issue
2022-05-09 15:04:51 +09:00
c9s
c4e1cd9480
binanceapi: add GetForceLiquidationRecordRequest api
2022-05-04 16:27:28 +08:00
c9s
2008f179a2
binance: add GetDepositHistoryRequest
2022-05-04 16:27:28 +08:00
c9s
ed8ff89f34
binance: add type alias from github.com/adshao/go-binance/v2
2022-05-04 16:27:28 +08:00
c9s
434434c8d9
binanceapi: add withdraw request
2022-05-04 16:27:28 +08:00
c9s
0fd560d699
binance: add NewGetDepositAddressRequest api
2022-05-04 16:27:28 +08:00
c9s
c3c1666154
binance: add get deposit address request
2022-05-04 16:27:28 +08:00
c9s
1f736d1f5e
binance: update stream order fields
2022-04-27 14:43:39 +08:00
c9s
ce6fd387be
remove unused ConvertTrades
2022-04-27 14:29:58 +08:00
c9s
23dd60728e
binance: fix error check
2022-04-26 16:51:41 +08:00
c9s
6c29e10caf
binance: improve binary error check
2022-04-26 16:43:40 +08:00
c9s
cbec4ac199
binance: improve query trades conditions for start time and end time
2022-04-26 15:58:12 +08:00
c9s
c70317af2b
add autoborrow strategy
2022-04-23 15:00:04 +08:00
c9s
a1c9bd7ec8
all: add AccountTypeIsolatedMargin
2022-04-23 12:51:07 +08:00
c9s
98a696a7d0
all: calculate MarginTolerance
2022-04-23 12:51:07 +08:00
c9s
76733898db
binance: add QueryMarginAssetMaxBorrowable api
2022-04-23 12:51:07 +08:00
c9s
37b5d80f6f
add margin repay and borrow api
2022-04-23 12:51:07 +08:00
c9s
c2d1ef0fc8
add margin borrow endpoint
2022-04-23 12:51:07 +08:00
c9s
a8fdd8006c
binance: add transferCrossMarginAccount method
2022-04-23 12:51:07 +08:00
c9s
ecc19e1efd
binance: assign more margin fields to account
2022-04-23 12:51:07 +08:00
c9s
cf2e8c9f0a
all: extend balance field for margin
2022-04-23 12:51:07 +08:00
c9s
fbe1906e70
binance: add more fields to the balance struct
2022-04-23 12:51:07 +08:00
c9s
304cc89f68
binance: always sort trades back
2022-04-23 12:51:07 +08:00
c9s
897dc55dcf
binance: fix margin balance convert
2022-04-13 15:38:13 +08:00
c9s
680261527c
binance: fix closed order query
2022-04-11 15:39:03 +08:00
austin362667
3f3fb1fe35
binance: fix futures limit maker order type
2022-03-28 21:12:45 +08:00
Yo-An Lin
ae4a3d81fb
Merge pull request #489 from zenixls2/feature/market_trade
...
feature: add market trade subscription in binance
2022-03-22 20:18:39 +08:00
zenix
abbe04fae9
fix: parse market trade as taker trade
2022-03-22 11:02:14 +09:00
austin362667
eca112e201
binance: add submit futures order ReduceOnly
2022-03-21 17:56:11 +08:00
zenix
efec21ca4b
feature: add market trade subscription in binance
2022-03-18 18:30:39 +09:00
zenix
84dbae1592
add readme content about testnet, fix code syntax
2022-03-18 14:17:06 +09:00
zenix
36a746d415
add binance paper trade endpoint
2022-03-18 14:04:56 +09:00
Yo-An Lin
bfdf4c245f
Merge pull request #460 from zenixls2/feature/backtest_multiple_exchange
...
feature: add multiple exchange support in backtest
2022-03-07 14:28:20 +08:00
zenix
39572c5fe0
fix: remove maker/buyer/taker/sellerCommission
2022-03-07 14:32:00 +09:00
c9s
af2070b908
binance: add updated time field
2022-03-06 18:32:33 +08:00
c9s
0c09e6b32a
use global timeInForce type
2022-02-18 13:52:13 +08:00
zenix
b8bf2af14d
fixedpoint for exchange and indicators, some fixes in types
2022-02-15 12:01:38 +09:00
ankion
98b4495d1f
Fix: precision of futures trade data is incorrect.
2022-02-14 10:32:13 +08:00
c9s
a2a7ef4f7a
exchange: implement ExchangeOrderQueryService on max and binance
2022-02-10 17:48:53 +08:00
Yo-An Lin
d79cce30e3
Merge pull request #443 from austin362667/refactor/futures-account
...
binance: add futures broker
2022-01-26 14:11:48 +08:00
c9s
e8fd1486b1
binance: fix binance closed order sync
2022-01-23 16:19:13 +08:00
austin362667
5a4adf4d72
binance: add futures broker
2022-01-23 15:26:15 +08:00
austin362667
0ab94e0884
binance: fix err handler
2022-01-15 08:28:02 +08:00
austin362667
734221028b
binance: fix parse type
2022-01-15 08:28:02 +08:00
austin362667
9a1d2cba31
binance: add account info in query account
2022-01-15 08:28:02 +08:00
austin362667
32c2f128f5
binance: add TradeFutures
2022-01-15 08:28:02 +08:00
austin362667
8130ef78c1
binance: refactor margin related conversions
2022-01-15 08:28:02 +08:00
austin362667
5404bfe7f8
binance: fix futures symbol not found from syncSession
...
binance: fix query trades, closed orders futures symbol not found
binance: fix futures symbol not found
2022-01-15 08:28:02 +08:00
austin362667
0f0539fe70
binance: add futures exchange queries
2022-01-15 08:28:02 +08:00
austin362667
6071c07073
binance: add futures conversion
2022-01-15 08:28:02 +08:00
c9s
140e5638b8
binance: apply order cancel rate limiter
2022-01-15 00:52:54 +08:00
c9s
ec72a922c8
all: add subscribe depth options
2022-01-12 22:27:42 +08:00
c9s
f9e72dc79f
binance: subscribe binance depth10@100ms
2022-01-12 22:17:07 +08:00
c9s
1a61935850
add depth buffer logs
2022-01-12 21:55:26 +08:00
Yo-An Lin
30c1dd3e3d
Merge pull request #424 from tony1223/bug/binance-add-ratelimiter
...
fix: [binance] add order rate limiter
2022-01-12 12:53:51 +08:00
c9s
b302adcc7e
types: add and use OrderError
2022-01-11 18:00:07 +08:00
c9s
857db529af
binance: show order info in the error
2022-01-11 17:05:36 +08:00
c9s
b56c800e12
binance: add order status to the error message
2022-01-11 16:47:55 +08:00
c9s
97422f26e7
binance: should return error when order does not contain orderID or clientOrderID
2022-01-11 16:38:02 +08:00
c9s
96ffab9cd8
binance: add details to order cancel error
2022-01-11 16:35:49 +08:00
c9s
4a8751e486
binance: fix listen key keep alive worker call
2022-01-11 14:16:35 +08:00
c9s
eefee46e9b
binance: invert if
2022-01-11 13:38:03 +08:00
c9s
cf07ca7aa0
binance: adjust listen key update interval to longer period
2022-01-11 13:37:02 +08:00
c9s
71a0604e72
use fixedpoint to parse payload directly
2022-01-11 01:41:33 +08:00
c9s
e5b4af53e6
all: clean up SubmitOrder fields
2022-01-11 01:36:19 +08:00
c9s
4b0e721580
binance: change binance debug client env var name to debug-binance-client
2022-01-10 16:37:41 +08:00
TonyQ
25801f9f63
add ratelmiter
2022-01-10 16:33:19 +08:00
c9s
6c3ee314d9
binance: fix order cancel client order id usage
2022-01-10 13:29:27 +08:00
c9s
cc0e5f71b0
clean up binance stream
2022-01-02 12:02:36 +08:00
c9s
85c14e5966
binance: fix parser tests
2022-01-02 02:44:47 +08:00
c9s
dcea623264
binance: change listen key update interval to 10 minutes
2022-01-02 02:41:58 +08:00
c9s
9d382a6b8c
binance: use sync.Once to protect the set server time calls
2022-01-02 02:14:04 +08:00
c9s
f4bfd8cc6b
all: move Reconnector to standard stream
2022-01-02 02:08:34 +08:00
c9s
6f6dac611e
refactor websocket stream into standard websocket stream
2022-01-02 01:54:47 +08:00
austin362667
9483a0d10d
binance: modify methods for registering callbacks
2021-12-31 00:11:47 +08:00
austin362667
65d37c1983
binance: add futures stream
2021-12-31 00:08:27 +08:00
austin362667
5cc768031e
binance: add FuturesPosition conversion
2021-12-31 00:08:27 +08:00
c9s
3c2704c4ae
add binance.us support
2021-12-30 23:46:43 +08:00
c9s
cfc66dc13e
bbgo: add session connection notification
2021-12-30 17:18:04 +08:00
c9s
8995ce2824
binance: adjust timeout
2021-12-30 16:51:30 +08:00
c9s
890fb5327a
rename StreamRequest to WebSocketCommand
2021-12-30 16:49:07 +08:00
c9s
35e0b1d146
binance: fix binance stream graceful shutdown
2021-12-30 16:47:39 +08:00
c9s
ff87fb007e
binance: pull out dispatchEvent
2021-12-30 16:30:02 +08:00
c9s
bae7df806f
binance: pull out getEndpointUrl
2021-12-30 16:22:29 +08:00
c9s
d72d57526c
binance: add DEBUG_BINANCE_STREAM env var
2021-12-30 16:20:32 +08:00
c9s
a2931da92c
move math rand
2021-12-30 16:18:32 +08:00
c9s
e73866a232
tmp
2021-12-30 16:17:26 +08:00
c9s
3b9a191c95
binance: refactor binance stream handlers
2021-12-30 14:02:36 +08:00
c9s
8f97ee7787
binance: add isolated margin flag
2021-12-29 17:36:08 +08:00
c9s
2ef4d713f8
binance: fix margin order cancel
2021-12-29 17:35:27 +08:00
c9s
1a820936c4
binance: change log level from info to debug
2021-12-29 17:30:04 +08:00
c9s
6030a62cf0
change to debug level message
2021-12-29 17:28:45 +08:00
c9s
b637d46c83
adjust keep alive interval
2021-12-29 17:27:37 +08:00
c9s
eec699cbc9
binance: adjust timeout and interval
2021-12-29 15:25:59 +08:00
austin362667
d691bfa106
binance: add futures parser
2021-12-28 06:26:27 +08:00
c9s
50fac9d491
kucoin: pull out queryDepth method to exchange
2021-12-25 23:53:34 +08:00
Yo-An Lin
8aa2ae1b32
Merge pull request #397 from austin362667/refactor/futures-account
...
binance: add futures related conversion
2021-12-25 23:17:27 +08:00
c9s
f0d4236169
all: fix and improve kucoin orderbook stream
2021-12-25 19:34:27 +08:00
c9s
3d1ca46c77
depth: remove updates assertion
2021-12-25 02:14:49 +08:00
c9s
217499528d
binance: refactor binance depthBuffer with depth query
2021-12-25 02:14:49 +08:00
c9s
7e7115b18f
replace binance.depthFrame with the extracted depth.Buffer
2021-12-25 02:14:49 +08:00
austin362667
ba972e4058
binance: add futures related conversion
...
binance: remove comments
2021-12-24 01:38:10 +08:00
c9s
c4838f5631
binance: fix depth event conversion
2021-12-23 23:55:13 +08:00
c9s
fdc5d6a54e
binance: use types.PriceVolumeSlice for depth entry
2021-12-23 23:55:02 +08:00
c9s
dae104cf9f
binance: optimize depth parsing
2021-12-23 23:54:43 +08:00
c9s
2adce6dd00
binance: return the pre-allocated err object when parsing
2021-12-23 23:54:26 +08:00
c9s
168e6306e7
binance: remove verbose log
2021-12-23 22:29:14 +08:00
c9s
562c287a4e
all: move publicOnly to StandardStream
2021-12-23 17:49:18 +08:00
c9s
cfd68fdd1d
all: change trade id to uint64
2021-12-23 17:49:18 +08:00
TonyQ
d7ac645253
exchange: update maskkey handling
2021-12-23 01:18:36 +08:00
TonyQ
16862e7208
exchange/stream : implement booktickerupdate event for ftx and
...
binance
2021-12-22 21:01:11 +08:00
c9s
bace225470
binance: fix, call set time service only when key and secret is given
2021-12-22 01:27:25 +08:00
TonyQ
3e45035ab1
database: sqlite3 issue fix
...
database: upgrade gosqllite3 version for increasing variable amount limit
types: update kline starttime/endtime field to prevent sqlite3
time parsing issue.
fix #215
2021-12-15 14:34:31 +08:00
Yo-An Lin
05323f211f
Merge pull request #368 from tony1223/feature/355-update-sync
...
backtest : auto sync
2021-12-15 01:39:19 +08:00
austin362667
ccd607ba28
binance: remove unsupported comments
2021-12-15 01:01:05 +08:00
austin362667
7f96fa8dde
binance: add multierr
2021-12-15 01:01:05 +08:00
austin362667
bb592663ab
binance: removed unsupport isolated futures trade
2021-12-15 01:01:05 +08:00
austin362667
a0130affe4
binance: add query orders & trades
2021-12-15 01:01:05 +08:00
TonyQ
20b03fe4a5
exchange: fix ftx for wrong last kline issue
2021-12-15 00:07:54 +08:00
austin362667
839bb6d0e8
binance: remove comments cuz not support isolated futures
2021-12-14 20:41:55 +08:00
austin362667
d3526b2c71
binance: add SubmitFuturesOrder and related conversions
2021-12-13 23:19:14 +08:00
austin362667
04919e0fa4
binance: add futures exchange stream connection
2021-12-12 15:40:03 +08:00
austin362667
8ca60cec10
binance: add user stream event parser & toGlobalType converter
2021-12-12 15:39:06 +08:00
c9s
ca85aa69e6
pull out global premium index type and funding rate type
2021-12-09 00:10:18 +08:00
c9s
71e043e4b2
move convertPremiumIndex to convert.go
2021-12-09 00:08:25 +08:00
c9s
fbae368e6c
make getLaunchDate as a simple function
2021-12-09 00:06:46 +08:00
c9s
078c79d73f
binance: refactor QueryMarkets
2021-12-09 00:05:36 +08:00
c9s
48612e2b13
reformat import lines and add fixme note
2021-12-09 00:01:33 +08:00
c9s
35da3ba3a0
check env vars for query related tests
2021-12-05 01:11:47 +08:00
c9s
715363298f
fix query ticker tests
2021-12-05 00:58:01 +08:00
c9s
4bde40f2db
override binance default http client timeout instead of zero timeout
2021-11-23 10:54:43 +08:00
Austin
c5d1a70a61
add Continuous Contract Kline/Candlestick Streams
2021-11-16 14:26:27 +08:00
Austin
a36739f119
add MarkPriceUpdateEvent
2021-11-16 01:24:36 +08:00
c9s
aceca1b49f
adjust listen key keep alive to 30 min
2021-11-07 23:40:13 +08:00
c9s
a2c2646a16
binance: adjust rate limiter bucket
2021-11-05 01:25:16 +08:00
c9s
82d859a43d
binance: fix binance order rate limiter
2021-11-05 01:21:58 +08:00
c9s
1a861c98a1
binance: add order rate limiter for binance
2021-11-04 12:50:32 +08:00
c9s
6cb593cd90
techsignal: use realtime funding rate
2021-10-20 14:01:19 +08:00
c9s
16fca0150d
implement futures PremiumIndex support
2021-10-19 15:54:16 +08:00
c9s
1e6692ec8d
rename funding rate query method name
2021-10-19 15:29:55 +08:00
c9s
e3431ef970
binance: fix binance order type for limit maker
2021-10-18 00:41:41 +08:00
c9s
4523135012
techsignal: add funding rate checker
2021-10-14 23:01:10 +08:00
c9s
7016d24fad
import types.FuturesSettings into binance exchange
2021-10-07 21:29:52 +08:00
c9s
b6fff482a4
binance: fix withdrawal time parsing
2021-09-03 14:21:59 +08:00
c9s
35ec9ae7b6
binance: fix binance withdrawal api
2021-09-02 00:27:57 +08:00
c9s
f177860450
binance: fix withdrawal service
2021-09-02 00:21:56 +08:00
c9s
0df26e0570
binance: adjust listen key keep alive to 20 minutes
2021-06-09 01:37:19 +08:00
c9s
457ca79517
binance: for network error, we should retry the request
2021-06-09 01:37:14 +08:00
c9s
ec6c10a96a
binance: adjust read timeout and increase read buffer size
2021-06-09 01:36:06 +08:00
c9s
f487b53d9e
binance: fix client order id checking
2021-06-07 01:07:00 +08:00
c9s
5fd0ab4cd3
skip client order id when no client order is given
2021-06-07 01:03:21 +08:00
c9s
b9584117d6
add QueryLastFundingRate api to binance exchange
2021-06-01 03:15:19 +08:00
c9s
b5c4fc3e4e
fix kline record insert fields
2021-06-01 01:39:23 +08:00
c9s
bf73def701
binance: embed fixedpoint.Value into binance Balance struct
2021-06-01 01:39:22 +08:00
c9s
e3473572e9
types: add TakerBuyBaseAssetVolume and TakerBuyQuoteAssetVolume fields to kline
2021-06-01 01:39:22 +08:00
c9s
2925a77815
binance: use fixedpoint.Value for parsing floating number string
2021-06-01 01:39:22 +08:00
c9s
7ff4051c61
binance: fix websocket handshake
2021-05-30 18:20:14 +08:00
c9s
0b935eff4f
fix connection lock call
2021-05-30 18:14:22 +08:00
c9s
d112dbb1a4
binance: check connCancel only when new context is allocated
2021-05-30 15:53:01 +08:00
c9s
f9d4068145
binance: pull out listen key from stream and reduce critical section
2021-05-30 15:51:25 +08:00
c9s
1a05f6fbd4
okex: pull read timeout and adjust to 30 seconds
2021-05-30 00:32:06 +08:00
c9s
d962dbe542
adjust read timeout
2021-05-29 20:40:47 +08:00
c9s
e11553139e
binance: make convert functions private
2021-05-29 00:26:39 +08:00
c9s
f49490f986
fix websocket ping/pong issue
2021-05-28 23:34:21 +08:00
c9s
002b28f75a
okex: implement candlestick api and improve kline console format
2021-05-28 20:51:10 +08:00
c9s
6407eab9c1
okex: convert order details into trades and orders
2021-05-28 02:21:35 +08:00
c9s
2844b7c3a7
okex: add kline command for testing kline data
2021-05-27 18:35:34 +08:00
c9s
18045bb1e7
Move ReconnectC to the StandardStream
2021-05-27 14:42:14 +08:00
c9s
016c60796d
pull out BNB currency string
2021-05-27 00:05:43 +08:00
c9s
ea78c0308b
add LocalSymbol field for exchange specific symbol
2021-05-27 00:05:43 +08:00
c9s
8842208441
okex: add market ticker api support
2021-05-27 00:05:43 +08:00
c9s
967c7e9f9d
xbalance: add withdrawal options
2021-05-26 23:24:05 +08:00
zenix
698ec9911f
Fix error formating on depth load fail
2021-05-26 00:57:35 +00:00
c9s
9c331063f4
improve depth error messages
2021-05-26 01:31:58 +08:00
c9s
06e982124b
fix depth reset
2021-05-26 01:27:42 +08:00
c9s
07ded04a9b
fix depth reset
2021-05-26 01:20:24 +08:00
c9s
44ff833c91
binance: buffer depth events
2021-05-26 01:05:12 +08:00
c9s
edeaa597f1
fix loadDepthSnapshot mutex lock issue
2021-05-26 00:58:40 +08:00
c9s
47bf7a1e03
remove time sleep for depthframe
2021-05-26 00:58:40 +08:00
c9s
686dcef2c5
binance: fix depth snapshot buffering
2021-05-25 21:36:14 +08:00
c9s
d3f06bc9d7
fix binance depth stream buffering
2021-05-25 19:13:10 +08:00