Perp Connector QA Checklist

Before approving new connectors, the Hummingbot Foundation Qualtiy Assurance (QA) team will do test pull requests to ensure it is working as expected. Below is our test template for perp connectors.

Title Steps Expected result
Connect a valid or invalid API key Run command connect xxx where xxx is the connector and add your API keys 1. The client should return an error if it's invalid.
2. The client should return a message of successfully connected when valid API keys are used.
3. If the client has the correct APIs connected and user tried to update it, the client will not update and still use the last working API keys.
Balance output Run command balance and to see the correct tokens that have assets
Create a strategy Run command create and select between Perpetual market making or Spot - Perpetual arbitrage strategy The connector should work on any of the strategies available in the client unless the connector is intended for a specific strategy.
Start a strategy Run command start to start the imported strategy The client should be able to start connecting to the exchange connector and create/cancel orders.
Check status Run command status and it should display the current orders created and running time, available balance, best/bid ask order, etc.. When running status command, the client should display the best bid and best ask orders, available balance and orders that are created on the exchange connector.
Order cancellation The client should cancel the order successfully without error or orders stuck on the exchange portal when checked. The orders created by the client should only be closed and not of those created manually by the user.
Check data integrity Run command order-book, status and ticker then add --live and compare the best bid/ask orders or list of orders from client and connector
Broker ID This is the part where the foundation needs to speak with the connector team (business related)
Order filled events Setup a market-making bot with spreads tight enough for filled trade event.
  1. Run history command while there are no field orders
  2. Run history or history --verbose command after getting a fill
    - You can increase the decimal value by setting up history --verbose --precision 5 where 5 is the added number of decimal
  3. Review history --verbose command, CSV or sqlite file and exchange’s trade history
1. Full and partial fills are both tracked and recorded properly.
2. Filled order information should match the trade history in the exchange.
Data aggregate TBA
Funding payment It depends on the connector’s funding time, make sure there is an open position and monitor the log panel for notification for funding time Check logs during the funding period.
Verify fee calculation After getting trades on the client:
  1. Run history --verbose command
  2. Record total fee
  3. Login to the exchange website and check the trade history
  4. Manually compute the fees of all the filled trades done by the bot
1. Should use the trade fee if available otherwise an estimate fee is used.
2. The transaction fee recorded in the client (CSV or SQLite) should match the fee shown in the trade history in the exchange.
Position retrieval
  1. Make sure the client has created an open position
  2. Relaunch the client and import the strategy
The expected behavior is that the client should be able to retrieve the open position on the exchange and create an exit price order to close the position. The only time the bot creates an exit price order to close the position is when the unrealize PNL is a positive value.