- Downgraded
betterproto
to2.0.0b6
pyproject.toml
- Dependency conflict
- Dependency: Up requirements for crypto-ws-api==2.0.13
OKX
: get_exchange_info: <class 'decimal.ConversionSyntax'> #82
HTX
: monitoring PING interval from server for each WSS channel and restart if timing out- Dependency
Binance
: add methodtransfer_to_sub()
. See use example inexample/exch_client.py
Bybit
:fetch_ledgers()
doubling of incoming transfers to a subaccount
HTX
: WSS missed account change event
- Dependency
send_request
: controlling rate_limit by changing exception handlingBitfinex
: syncnonce
for connections group- Dependency: Up requirements for crypto-ws-api==2.0.11
- Some minor improvements
- Dependency: Up requirements for crypto-ws-api==2.0.10
Bitfinex
:client.fetch_order()
: searching onorigin_client_order_id
also
- Creating and manage asynchronous tasks
Bitfinex
: add logging forcancel_order()
andcancel_all_orders()
methods- Add debug logging for
open_client_connection()
andclient.load()
Bybit
: http error handling: handling events that are not explicitly described
Bybit
:on_balance_update
: missed event during transfer from API
- Dependency: Up requirements for crypto-ws-api==2.0.8
Bybit
:on_balance_update
: duplication during transfer from web-interface- Some exception handling
- Dependency: Up requirements for crypto-ws-api==2.0.7
- Refine HTTP handle errors
- Change
datetime.now(timezone.utc).replace(tzinfo=None)
for format compatibility
- HTTP handle errors, for
response.status == 400
differ pureBad Request
and other reasons
- Some SonarLint issues
Bybit
:fetch_order
,fetch_order_trade_list
: deep refine- Some minor improvements
on_order_book_update
: skip partially empty eventfetch_order_trade_list
:ByBit
: removeendTime
limitexch_srv.py
: request processing is carried out in the methodsend_request
gRPC
proto:OpenClientConnectionId
addreal_market
field
- Incomplete description of dependencies
- Example
- Migrate
gRPC
from grpcio to grpclib + python-betterproto
CreateLimitOrder()
andFetchOpenOrders
: Exception handling reduced to one type- Dependency: Up requirements for
grpcio
andgrpcio-tools
to 1.62.0 - Dependency: Up requirements for aiohttp==3.9.3
CreateLimitOrder()
: Missedtrade_id
parameter in fetch_order() call
- Refine error handling in
http_client
HTX
: order Status set on cumulative_filled_quantity value only andstatus
from event is ignored
- Exception in fetch_order: 'KeyError': 'commission'
fetch_order_trade_list()
: variables type inconsistent- HTX: correcting order Status depending on cumulative_filled_quantity
FetchOrder()
: conditions for generating a trading event(s)
c_structures.OrderTradesEvent
: some fields are mixed up- Bybit: generating a redundant order fill event
create_trade_stream_event
: using actual order status instead of estimated status
- Bitfinex: setting original order quantity for placed order when first getting event is
te
type
- Bitfinex: use
symbol
parameter for cancel all order
- Generate trading events on the partial filled missing event
- Dependency: Rollback
grpcio
andgrpcio-tools
to 1.48.2
- Some minor fixes
- Dependency: Up requirements for
grpcio
andgrpcio-tools
to 1.60.1
- Bitfinex: refining order processing
- Binance:
TransferToMaster
: sentenceEmail address should be encoded. e.g. [email protected] should be encoded into alice%40test.com
from API docs they are False, must becontent += urlencode(kwargs["params"], safe="@")
- HTX: changed deprecated endpoint "v1/common/symbols" to "v1/settings/common/market-symbols"
- Binance:
GET /api/v3/exchangeInfo
from response remove deprecatedquotePrecision
- Binance:
TransferToMaster
now can be used for collect assets on the subaccount
- Bitfinex: order processing
- Bybit: filter LOT_SIZE.stepSize
- Bitfinex: filter LOT_SIZE.stepSize
- Binance: new method
OneClickArrivalDeposit
- Bitfinex: refine the order processing
- Dependency: Up requirements for Python>=3.9
- FetchOrder: Bitfinex: generate trades events for orders older than the last two weeks
exch_client.py
init error
- replacing json with ujson to improve performance
- Dependency: Up requirements for crypto-ws-api==2.0.6
- Before send cancel order result checking if it was being executed and generating trade event
- Rollback 1.4.3
- Binance: in create Limit order parameters adding parameter "selfTradePreventionMode": "NONE"
- For limit order get status EXPIRED_IN_MATCH on Binance testnet #42
- Binance: in create Limit order parameters adding parameter "selfTradePreventionMode": "NONE"
- For method json_format.ParseDict(..., ignore_unknown_fields=True) parameter added
- Some minor improvements
- Bybit: fetch_ledgers(): get transfer event from Sub account to Main account on Main account
- Some minor improvements
- FetchOrder for Demo - ByBitSub01: BTCUSDT: 0 exception: list index out of range
- OKX: get ws_api endpoint from config
- ByBit: send and handling WSS keepalive message
- websockets v12.0 raised
ConnectionClosed
exception - Dependency: Up requirements for crypto-ws-api==2.0.5.post3
- Bitfinex: WSS Information message processing logic adjusted
- Dependency: Up requirements for crypto-ws-api==2.0.5
- Other dependency
- protobuf format for:
- OpenClientConnectionRequest
- FetchOrderRequest
- Bybit exchange V5 API support implemented. Supported account type is Unified Trading Account, for main and sub-accounts. Spot Trading only.
- Dependency: Up requirements for crypto-ws-api==2.0.4
- Dependency: Up requirements for crypto-ws-api==2.0.3.post1
- Dependency: Up requirements for crypto-ws-api==2.0.3
- [2023-09-24 07:10:21,076: ERROR] Fetch order trades for HuobiSub2: HTUSDT exception: Client.fetch_order_trade_list() missing 1 required positional argument: 'trade_id'
- exchanges_wrapper.huobi_parser.account_trade_list: incorrect key for
orderId
- Dependency: Up requirements for crypto-ws-api==2.0.2.post1
- Bitfinex: fix 500
Internal server error
, caused by a Nonce value sequence failure
- For web socket connection migrated from aiohttp.ws_connection to websockets.client
- Bitfinex: Implemented rate limit control for the Bitfinex REST API.
- Bitfinex: Refine handling of active orders
- OnOrderBookUpdate: change queue to LifoQueue, for get last actual order book row
- gRPC (grpcio + grpcio-tools): massive memory leak for version later than 1.48.2
- The
exch_srv_cfg.toml
wants to be updated fromexch_srv_cfg.toml.template
:
[endpoint.okx]
api_public = 'https://aws.okx.com'
api_auth = 'https://aws.okx.com'
ws_public = 'wss://wsaws.okx.com:8443/ws/v5/public'
ws_auth = 'wss://wsaws.okx.com:8443/ws/v5/private'
ws_business = 'wss://ws.okx.com:8443/ws/v5/business'
api_test = 'https://aws.okx.com'
ws_test = 'wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999'
- Can't resolve missed PARTIALLY_FILLED event #29
- OKX changed WSS endpoint for Candlesticks channel #27
The exch_srv_cfg.toml
wants to be updated from exch_srv_cfg.toml.template
:
[endpoint.okx]
api_public = 'https://aws.okx.com'
api_auth = 'https://aws.okx.com'
ws_public = 'wss://wsaws.okx.com:8443/ws/v5/public'
ws_business = 'wss://ws.okx.com:8443/ws/v5/business'
api_test = 'https://aws.okx.com'
ws_test = 'wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999'
- Dependency: Up requirements for crypto-ws-api~=2.0.0rc3
- Optimise code by Sourcery AI refactoring engine
- Some minor improvements
- Binance, OKX: Most requests use WSS first, REST API is used as a backup and in the case of single rare requests
ERROR: Cannot install crypto_ws_api and grpcio==1.56.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested grpcio==1.56.0
exchanges-wrapper 1.3.3 depends on grpcio==1.48.1
The user requested grpcio==1.56.0
exchanges-wrapper 1.3.2 depends on grpcio==1.48.1
- Up requirements for grpcio to 1.56.0
Known security vulnerabilities detected
Dependency grpcio Version < 1.53.0 Upgrade to ~> 1.53.0
- Bitfinex:
exchanges_wrapper.client.Client.cancel_all_orders()
: removed unnecessary status check after cancel request
- UserWSSession moved to crypto-ws-api pkg
- Refactoring logging
- CheckStream(): fix log spamming on passed check
- Up requirements for crypto-ws-api to 1.0.1
- Binance: ws_api package implemented, last version Websocket API used for the most commonly used methods
In exch_srv_cfg.toml
added:
[endpoint]
[endpoint.binance]
...
ws_api = 'wss://ws-api.binance.com:443/ws-api/v3'
ws_api_test = 'wss://testnet.binance.vision/ws-api/v3'
- Optimizing installation and initial settings
- Binance: keepalive WSS
- exchanges_wrapper.client.Client.cancel_all_orders() set correct 'status' for cancelled orders
- protobuf format for CancelAllOrders() and OnOrderUpdate(). Now simple use
result = eval(json.loads(res.result))
for unpack incoming message. Not compatible with earlier versions - dependencies
- Binance: REST API update for endpoint: GET /api/v3/exchangeInfo was changed MIN_NOTIONAL filter
- Minor improvements
- OKX: intersection wss streams for several trades on one client (same account). WSS buffer moved from client instance to EventsDataStream instance
- OKX: FetchOpenOrders(): getting orders list for all pair per account instead specific one pair
- CheckStream() method which request active WSS for trade_id
- Add method TransferToMaster():
Send request to transfer asset from subaccount to main account
Binance, OKX: not additional settings needed
Bitfinex: for subaccount setting 2FA method, set WITHDRAWAL permission for API key,
in config for subaccount set 2FA key and master account EMail
Huobi: in config for subaccount set master_name for Main account
- Up requirements aiohttp to 3.8.4
- Some minor improvements
- Remove unnecessary shebang
- Additional check for order status if its can't place during timeout period for avoid place duplicate order
- Removing FTX smell
- Add connection to binance.us
- Bitfinex: handling canceled TP order after it partially filled
- Binance: REST API: filter type "PERCENT_PRICE" to "PERCENT_PRICE_BY_SIDE"
- FetchOpenOrders() add handler for errors.QueryCanceled, in case RateLimitReached was raised elsewhere
- Some minor improvements
- Clearing cancel previous wss start() before restart from 1.2.7-3 was a bad idea. It's kill himself. Rollback.
- Huobi: incorrect handling for incoming ping for private channel
- OKX: refactoring wss heartbeat
- Clearing cancel previous wss start() before restart
- Bitfinex: add "receive_timeout=30" parameter in ws_connect(), this is a reliable solution for monitoring the presence of a connection
- Add OKX section in config file
- OKX exchange
- FTX: OnFundsUpdate() did not return a result
- OnBalanceUpdate() for autocorrect depo and initial balance
- refactoring http_client module for multi exchanges purposes
- added _percent_price filter dummy for all parsers
- Huobi Restart WSS for PING timeout, 20s for market and 60s for user streams
- Removed unnecessary refine amount/price in create_order() for Bitfinex, FTX and Huobi
- Huobi exchange
- #2 FTX WS market stream lies down quietly
- Slightly optimized process of docker container setup and start-up
- Published as Docker image
- README.md add info about Docker image use
- Restoring the closed WSS for any reason other than forced explicit shutdown
- Correct max size on queue() for book WSS
- Doesn't work on bitfinex: trading rules, step_size restriction not applicable, check
- FTX WS market stream lies down quietly Refactoring WSS control
- Keep alive Binance combined market WSS, correct restart after stop pair
- FetchOrder for 'PARTIALLY_FILLED' event on 'binance' and 'ftx'
- User data and settings config are moved outside the package to simplify the upgrade
- Version accounting of the configuration file is given to the package
- Published as Docker image
- On first run create catalog structure for user files at
/home/user/.MartinBinance/
- Incomplete account setup
- 1.2.3-2 Fix wss market handler, was stopped after get int type message instead of dict
- 1.2.3-5 clear console output
- 1.2.3-6 Bitfinex WSServerHandshakeError handling
- refactoring web_socket.py for correct handling and restart wss
- up to Python 3.10.6 compatible
- reuse aiohttp.ClientSession().ws_connect() for client session
- Bitfinex: restore active orders list after restart
- exch_server not exiting if it can't obtain port
- Incorrect handling fetch_open_orders response after reinit connection
- FTX: WSS 'orderbook' check status by provided checksum value
- FTX: WSS 'ticker' incorrect init
- Bitfinex: changed priority for order status, CANCELED priority raised
- Bitfinex REST API / WSS implemented
- Optimized WSS processing methods to improve performance and fault tolerance
- Updated configuration file format for multi-exchange use