GithubHelp home page GithubHelp logo

tokocrypto / hummingbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hummingbot/hummingbot

4.0 1.0 5.0 521.28 MB

Hummingbot: a client for crypto market making

Home Page: https://www.hummingbot.io/

License: Apache License 2.0

Python 77.60% Shell 0.40% Batchfile 0.01% Dockerfile 0.04% C++ 0.13% Makefile 0.01% JavaScript 0.02% TypeScript 11.94% Cython 9.86%

hummingbot's Introduction

Hummingbot


License Twitter Discord Discourse

Hummingbot is an open source client-side framework that helps you build, manage, and run automated trading strategies, or bots. This code is free and publicly available under the Apache 2.0 open source license!

Why Hummingbot?

  • CEX and DEX connectors: Hummingbot supports connectors to 30+ centralized exchanges and 7+ decentralized exchanges
  • Advanced market making strategies: Hummingbot ships with 10+ customizable strategy templates like Cross-Exchange Market Making, Avellaneda Market Making (based on the classic Avellaneda & Stoikov paper), and Spot Perpetual Arbitrage
  • Secure local client: Hummingbot is a local client software that you install and run on your own devices or cloud virtual machines. It encrypts your API keys and private keys and never exposes them to any third parties.
  • Community-driven: Inspired by Linux, Hummingbot is managed by a not-for-profit foundation that enables the community to govern how the codebase evolves, using the Hummingbot Governance Token (HBOT).

Help us democratize high-frequency trading and make powerful trading algorithms accessible to everyone in the world!

Certified Cryptocurrency Exchanges

Hummingbot's Exchange Certification program is a community-driven process that selects certain exchanges in the Hummingbot codebase to be certified. Certified exchanges are clearly differentiated from non-certified exchanges in the Hummingbot client and documentation, get developer bounties to fund bug fixes and improvements, priority support, and other benefits.

logo name docs (by connector type) certified signup code
AscendEx AscendEx spot Hummingbot Certified UEIXNXKW
Binance Binance spot Hummingbot Certified FQQNNGCD
Binance Futures Binance Futures perps Hummingbot Certified hummingbot
Bybit Bybit spot / perps Hummingbot Certified
FTX FTX spot Hummingbot Certified
Gate.io Gate.io spot Hummingbot Certified 5868285
HitBTC HitBTC spot Hummingbot Certified
Huobi Global Huobi Global spot Hummingbot Certified en9k2223
KuCoin KuCoin spot Hummingbot Certified 272KvRf
OKEx OKX spot Hummingbot Certified 1931920

Supported Centralized Exchange Connectors

logo name docs (by connector type) certified signup code
AltMarkets.io AltMarkets.io spot
AscendEx AscendEx spot Hummingbot Certified UEIXNXKW
Beaxy Beaxy spot
Binance Binance spot Hummingbot Certified FQQNNGCD
Binance Futures Binance Futures perps Hummingbot Certified hummingbot
Binance US Binance US spot
Bitfinex Bitfinex spot dxCUrjvc
Bitget Bitget perps
BitMart BitMart spot UM6fQV
Bitmex Bitmex spot / perps
Bittrex Global Bittrex Global spot
Blocktane Blocktane spot
BTC Markets BTC Markets spot
Bybit Bybit spot / perps Hummingbot Certified
Coinbase Pro Coinbase Pro spot
CoinFLEX CoinFLEX spot / perps
CoinZoom CoinZoom spot
Crypto.com Crypto.com spot
Digifinex Digifinex spot
FTX FTX spot Hummingbot Certified
Gate.io Gate.io spot Hummingbot Certified 5868285
HitBTC HitBTC spot Hummingbot Certified
Huobi Global Huobi Global spot Hummingbot Certified en9k2223
Kraken Kraken spot
KuCoin KuCoin spot Hummingbot Certified 272KvRf
Latoken Latoken spot
Liquid Liquid spot
MEXC MEXC Global spot
NDAX NDAX spot
OKEx OKX spot Hummingbot Certified 1931920
Probit Global Probit Global spot
Probit Korea Probit Korea spot
Wazirx WazirX spot

Decentralized Exchange Connectors

logo name docs (by connector type) certified signup code
dYdX Perpetual dYdX Perpetual perp clob
Loopring Loopring spot clob
Pangolin Pangolin amm
Quickswap Quickswap amm
Sushiswap Sushiswap amm
Traderjoe TraderJoe amm
Uniswap Uniswap concentrated liquidity amm

Getting Started

Community

Other Hummingbot Repos

Contributions

Hummingbot belongs to its community, so we welcome contributions! Please review these guidelines first.

To have your pull request reviewed by the community, submit a Pull Request Proposal on our Snapshot. Note that you will need 1 HBOT in your Ethereum wallet to submit a Pull Request Proposal. See https://www.coingecko.com/coins/hummingbot for markets where HBOT trades.

Legal

hummingbot's People

Contributors

nullably avatar dennisocana avatar vic-en avatar yzhang1994 avatar aarmoa avatar martinkou avatar petioptrv avatar fengtality avatar jeremykono avatar crimsonjacket avatar michaelc9 avatar veecos2 avatar danilo-araujo-silva avatar nicolasbaum avatar ptrckm avatar chowryan avatar theholyroger avatar kmcgowan2000 avatar rapcmia avatar carlolm avatar willapa avatar mhrvth avatar navijation avatar arctek avatar cardosofede avatar nikspz avatar nionis avatar mborraccia avatar rc-13 avatar ed-latoken avatar

Stargazers

Crypto Wolf  avatar Crypto Wolf ◾️ avatar Sri Ram Bandi avatar  avatar

Watchers

Crypto Wolf  avatar

hummingbot's Issues

Tokocrypto: Number of filled trades differ on the client and on the exchange

Describe the bug
There is a discrepancy on recorded filled orders on the exchange and on the client/tradecsv. On my most recent test, I got 8 trades recorded in the exchange.
image
But on the client, it shows 15
image

Steps To Reproduce
1.Create a PMM strategy using tokocrypto
2.set a tight spread to get orders filled easily.
3.Run the bot for 10-20 minutes. Compare result on the history/history --verbose vs the recorded filled trades on the exchange

Release version
Version: dev-1.10.0

Attachments
tokotrades.zip

Tokocrypto: response server time log at the start of the client

Describe the bug
Opening this ticket for confirmation if this is an expected behavior.

The following message is shown right after starting the client, although this doesn't affect the bots behavior, it's just not clear where it is coming from. Maybe this can be hidden or we just need a confirmation from the dev what triggers the message.

image

Steps To Reproduce
Here are the steps to reproduce the issue (see attachments in the section below):

  1. Set up your configuration file with these parameters: ...
  2. Start the bot using this command: ...
    ...

Screenshots
Similar message are seen after adding and API key and starting the strategy
image
image

Release version
Version: dev-1.10.0

Attachments
Logs not required since message is not added in the log file

Tokocrypto: Failed to refresh listen key

Describe the bug
Captured this error while running a bot for an hour. So far I only had one instance of this error on an hour of run time.

Screen Shot 2022-11-18 at 9 37 42 AM

2022-11-18 09:32:52,640 - 6030 - hummingbot.connector.exchange.tokocrypto.tokocrypto_api_user_stream_data_source.TokocryptoAPIUserStreamDataSource - WARNING - Failed to refresh the listen key xKuUaZszvDGgSRmqBoLMVfxP4rqPqUkDFFb0JeEKPbNNWSORcFwzQaA89QXB: {'code': 3702, 'msg': 'Invalid signature.', 'timestamp': 1668735172744}
2022-11-18 09:32:52,643 - 6030 - hummingbot.connector.exchange.tokocrypto.tokocrypto_api_user_stream_data_source.TokocryptoAPIUserStreamDataSource - ERROR - Error occurred renewing listen key ...

Steps To Reproduce

  1. Run the client
  2. Connect Tokocrypto API key
  3. Create and run a pure market making strategy

Release version
Version: dev-1.10.0

Attachments
Logs and config: tokocrypto_logs_config.zip

Tokocrypto: Invalid API response message not detailed

Describe the bug
When an invalid API key for Tokocrypto is added, the following response message is shown:
image
We need a better response message so that users will be aware on what could have possibly happen or the next step to take.

Steps To Reproduce
Here are the steps to reproduce the issue (see attachments in the section below):

  1. Start the Hummingbot client
  2. Connect to Tokocrypto by running connect tokocrypto
  3. Add random keys
    ...

Release version
Version: dev-1.10.0

Attachments

Tokocrypto: Invalid variable type: value should be str or int, got None of type <class 'NoneType'>.

Describe the bug

  • Getting an error during fetching status update Invalid variable type: value should be str or int, got None of type <class 'NoneType'>. Tracking down the orders affected, It seems the bot trying to fetch the order id xTKOTCSUTDI5edbd8769a3d55647cb05 (not yet created) and creating an order with the same order id at the same time.

image

2022-11-18 20:06:00,450 - 1238491 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - NETWORK - Error fetching status update for the order xTKOTCSUTDI5edbd8769a3d55647cb05: Invalid variable type: value should be str or int, got None of type <class 'NoneType'>.
2022-11-18 20:06:00,450 - 1238491 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Failed to fetch status update for the order xTKOTCSUTDI5edbd8769a3d55647cb05.
2022-11-18 20:06:00,533 - 1238491 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT_MAKER SELL order xTKOTCSUTDI5edbd8769a3d55647cb05 for 11.00000000 USDT-DAI.
2022-11-18 20:06:00,543 - 1238491 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668773160.0, "type": "OrderType.LIMIT_MAKER", "trading_pair": "USDT-DAI", "amount": "11.00000000", "price": "1.00910000", "order_id": "xTKOTCSUTDI5edbd8769a3d55647cb05", "creation_timestamp": 1668773160.0, "exchange_order_id": "157117125", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "tokocrypto"}
2022-11-18 20:06:10,002 - 1238491 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Canceling the limit order xTKOTCSUTDI5edbd8769a3d55647cb05. [clock=2022-11-18 12:06:10+00:00]
2022-11-18 20:06:10,202 - 1238491 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668773170.0, "order_id": "xTKOTCSUTDI5edbd8769a3d55647cb05", "exchange_order_id": "157117125", "event_name": "OrderCancelledEvent", "event_source": "tokocrypto"}
2022-11-18 20:06:10,202 - 1238491 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order xTKOTCSUTDI5edbd8769a3d55647cb05.
  • Confirmed that these orders are being created and cancelled on the exchange.
    image

Other order id's captured on the logs with the same issue as above:

xTKOTCSUTDI5edc15b614b695647cb05
xTKOTCSUTDI5edc15b614c1d5647cb05
xTKOTCSUTDI5edc889a484195647cb05

Steps To Reproduce

  1. Create a PMM strategy using tokocrypto
  2. Set order refresh time to 10 sec and disable order refresh tolerance
  3. Enable multiple order level (3 or more)
  4. Start the strategy and run the bot for longer time (overnight)

Release version
Version: dev-1.10.0

Attachments
toko.zip

Tokocrypto: Random instance where it fails to create order and update balance

Describe the bug
Captured a scenario wherein the client stopped placing an order for about 2 min. It turns out that the balance did not update during this period. If we checked the exchanged, there was no open order at that time. So far I've seen it happened twice.
image

In the logs, the client created 4 ask orders (1 fail due to insufficient balance)

2022-11-17 14:23:50,020 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 4 ask orders at (Size, Price): ['15 USDT, 0.9992 DAI', '15 USDT, 1.0092 DAI', '15 USDT, 1.0192 DAI', '4.2 USDT, 1.0292 DAI']
2022-11-17 14:23:50,056 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:23:50,096 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666230.0, "order_id": "xTKOTCSUTDI5eda4a1e39c752ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:23:50,099 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a1e39c752ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666230.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a1e39c752ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:23:50,452 - 15901 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT_MAKER SELL order xTKOTCSUTDI5eda4a1e39c432ebbfafe for 15.00000000 USDT-DAI.
2022-11-17 14:23:50,452 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666230.0, "type": "OrderType.LIMIT_MAKER", "trading_pair": "USDT-DAI", "amount": "15.00000000", "price": "1.00920000", "order_id": "xTKOTCSUTDI5eda4a1e39c432ebbfafe", "creation_timestamp": 1668666230.0, "exchange_order_id": "156974359", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "tokocrypto"}
2022-11-17 14:23:50,458 - 15901 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT_MAKER SELL order xTKOTCSUTDI5eda4a1e39c612ebbfafe for 15.00000000 USDT-DAI.
2022-11-17 14:23:50,459 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666230.0, "type": "OrderType.LIMIT_MAKER", "trading_pair": "USDT-DAI", "amount": "15.00000000", "price": "1.01920000", "order_id": "xTKOTCSUTDI5eda4a1e39c612ebbfafe", "creation_timestamp": 1668666230.0, "exchange_order_id": "156974360", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "tokocrypto"}
2022-11-17 14:23:50,499 - 15901 - hummingbot.connector.client_order_tracker - INFO - Created LIMIT_MAKER SELL order xTKOTCSUTDI5eda4a1e39bdd2ebbfafe for 15.00000000 USDT-DAI.
2022-11-17 14:23:50,499 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666230.0, "type": "OrderType.LIMIT_MAKER", "trading_pair": "USDT-DAI", "amount": "15.00000000", "price": "0.99920000", "order_id": "xTKOTCSUTDI5eda4a1e39bdd2ebbfafe", "creation_timestamp": 1668666230.0, "exchange_order_id": "156974361", "leverage": 1, "position": "NIL", "event_name": "SellOrderCreatedEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:00,083 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Canceling the limit order xTKOTCSUTDI5eda4a1e39bdd2ebbfafe. [clock=2022-11-17 06:24:00+00:00]
2022-11-17 14:24:00,083 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Canceling the limit order xTKOTCSUTDI5eda4a1e39c432ebbfafe. [clock=2022-11-17 06:24:00+00:00]
2022-11-17 14:24:00,083 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Canceling the limit order xTKOTCSUTDI5eda4a1e39c612ebbfafe. [clock=2022-11-17 06:24:00+00:00]
2022-11-17 14:24:00,572 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666240.0, "order_id": "xTKOTCSUTDI5eda4a1e39bdd2ebbfafe", "exchange_order_id": "156974361", "event_name": "OrderCancelledEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:00,576 - 15901 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order xTKOTCSUTDI5eda4a1e39bdd2ebbfafe.
2022-11-17 14:24:00,577 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666240.0, "order_id": "xTKOTCSUTDI5eda4a1e39c612ebbfafe", "exchange_order_id": "156974360", "event_name": "OrderCancelledEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:00,580 - 15901 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order xTKOTCSUTDI5eda4a1e39c612ebbfafe.
2022-11-17 14:24:00,616 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666240.0, "order_id": "xTKOTCSUTDI5eda4a1e39c432ebbfafe", "exchange_order_id": "156974359", "event_name": "OrderCancelledEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:00,619 - 15901 - hummingbot.connector.client_order_tracker - INFO - Successfully canceled order xTKOTCSUTDI5eda4a1e39c432ebbfafe.

After this orders are canceled, the client starts to create a single ask order however it fails due to not meeting the exchange requirement. This is when we can see that there are no orders in the client for about 2min.

2022-11-17 14:24:01,000 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:24:01,001 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:24:01,002 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666241.0, "order_id": "xTKOTCSUTDI5eda4a28b26fe2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:01,004 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a28b26fe2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666241.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a28b26fe2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:24:12,064 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:24:12,065 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:24:12,066 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666252.0, "order_id": "xTKOTCSUTDI5eda4a333f8c52ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:12,068 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a333f8c52ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666252.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a333f8c52ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:24:23,009 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:24:23,009 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:24:23,010 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666263.0, "order_id": "xTKOTCSUTDI5eda4a3daf94e2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:23,013 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a3daf94e2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666263.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a3daf94e2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:24:34,049 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:24:34,050 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:24:34,050 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666274.0, "order_id": "xTKOTCSUTDI5eda4a4836f0f2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:34,053 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a4836f0f2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666274.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a4836f0f2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:24:45,001 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:24:45,002 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:24:45,003 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666285.0, "order_id": "xTKOTCSUTDI5eda4a52a8dbc2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:45,005 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a52a8dbc2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666285.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a52a8dbc2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:24:56,001 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:24:56,002 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:24:56,003 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666296.0, "order_id": "xTKOTCSUTDI5eda4a5d266db2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:24:56,006 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a5d266db2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666296.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a5d266db2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:25:07,029 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:25:07,030 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:25:07,031 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666307.0, "order_id": "xTKOTCSUTDI5eda4a67aae052ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:25:07,034 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a67aae052ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666307.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a67aae052ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:25:18,001 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:25:18,002 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:25:18,003 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666318.0, "order_id": "xTKOTCSUTDI5eda4a722182f2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:25:18,006 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a722182f2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666318.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a722182f2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:25:29,001 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:25:29,003 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:25:29,004 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666329.0, "order_id": "xTKOTCSUTDI5eda4a7c9f5872ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:25:29,006 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a7c9f5872ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666329.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a7c9f5872ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:25:40,055 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:25:40,056 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:25:40,057 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666340.0, "order_id": "xTKOTCSUTDI5eda4a8729c5c2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:25:40,059 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a8729c5c2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666340.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a8729c5c2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:25:51,044 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 1 ask orders at (Size, Price): ['4.2 USDT, 0.9992 DAI']
2022-11-17 14:25:51,045 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:25:51,046 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666351.0, "order_id": "xTKOTCSUTDI5eda4a91a4a1f2ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}
2022-11-17 14:25:51,048 - 15901 - hummingbot.connector.client_order_tracker - INFO - Order xTKOTCSUTDI5eda4a91a4a1f2ebbfafe has failed. Order Update: OrderUpdate(trading_pair='USDT-DAI', update_timestamp=1668666351.0, new_state=<OrderState.FAILED: 6>, client_order_id='xTKOTCSUTDI5eda4a91a4a1f2ebbfafe', exchange_order_id=None, misc_updates=None)
2022-11-17 14:26:02,028 - 15901 - hummingbot.strategy.pure_market_making.pure_market_making - INFO - (USDT-DAI) Creating 4 ask orders at (Size, Price): ['15 USDT, 0.9992 DAI', '15 USDT, 1.0092 DAI', '15 USDT, 1.0192 DAI', '4.2 USDT, 1.0292 DAI']
2022-11-17 14:26:02,057 - 15901 - hummingbot.connector.exchange.tokocrypto.tokocrypto_exchange.TokocryptoExchange - WARNING - Sell order amount 0 is lower than the minimum order size 0.10000000. The order will not be created.
2022-11-17 14:26:02,091 - 15901 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1668666362.0, "order_id": "xTKOTCSUTDI5eda4a9c1e5b92ebbfafe", "order_type": "OrderType.LIMIT_MAKER", "event_name": "MarketOrderFailureEvent", "event_source": "tokocrypto"}

Steps To Reproduce

Possible step on how to replicate the behavior:

  1. Create a PMM strategy using tokocrypto
  2. Set order refresh time to 10 sec and disable order refresh tolerance
  3. Enable multiple order level (3 or more)
  4. Start the strategy and run the status --live command.
  5. Monitor the status
    Note: This is random so it can occur within 10 min or within an hour.

Release version
Version: dev-1.10.0

Attachments
tokocrypto-test-logs-and-config.zip

Tokocrypto: Incorrect filled order timestamp

Describe the bug
Executing trades thru the bot using Tokocrypto results to an incorrect filled order timestamp. Upon further checking I noticed that on all instances the trades are only recorded whenever the orders are about to get cancelled.

Example:

Actual timestamp of this order on the exchange 2022-11-21 09:26:25

Screen Shot 2022-11-21 at 9 26 48 AM

Filled order timestamp on the bot 2022-11-21 09:26:47
Screen Shot 2022-11-21 at 9 27 02 AM

Same result when executing history --verbose command
Screen Shot 2022-11-21 at 9 27 13 AM

Steps To Reproduce

  1. Create and run a pure market making bot using Tokocrypto
  2. Set tight spreads to execute trades faster
  3. Monitor the trade history on the exchange
  4. Check the bot and notice that the filled trade doesn't appear yet and will only be recorded when the order is about to be cancelled

Release version
Version: dev-1.10.0

Attachments
Logs, config and data files:
toko_filled.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.