New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/injective spot with delegation #6493
Feat/injective spot with delegation #6493
Conversation
…, with unit tests
…e use of a very old web3 library version, incompatible with Injective SDK library
…, with unit tests
…e use of a very old web3 library version, incompatible with Injective SDK library
…com/aarmoa/hummingbot into feat/injective_spot_with_delegation
d64ece6
to
cdb5e36
Compare
…to feat/injective_spot_with_delegation
@rapcmia This is induced by errors coming from stderr when grpc library throws exceptions (host unavailable or rate limit) and it breaks the UI. Solution I found to this is to redirect stderr to /dev/null Try running the command you run to start hummingbot like so: This is not related to malfunction of the connector itself but the grpc lib which is the same used by the original injective connector (and which produced the same glitches in previous QA unfortunately) |
Thanks for the info @keithbaum, ill check this with the team 🙇🏼 PR update:
Steps to reproduce:
|
Regarding the first issue @rapcmia (AttributeError: 'NoneType' object has no attribute 'get'), check if in the directory that was the working directory when you executed the command there is a file named |
For the second error, the error message is already describing the problem |
Hi @aarmoa thanks for the help. However when we start the PMM strategy we are getting failed to submit order with the error below:
Steps to reproduce:
When running the script for Steps to reproduce:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job King Kode!
hummingbot/connector/exchange/injective_v2/injective_v2_api_order_book_data_source.py
Show resolved
Hide resolved
@aarmoa I forgot to mention that you need to add the connector to connector_status |
Is possible to add a check in the connect command to remove if it exists? |
Hi @cardosofede. I will add this as part of the logic in the PR we will be submitting as soon as this is merged. It will be easier that way because in the other branch we have made several changes to the logic that initializes the Injective AsyncClient and the path of the cookie file |
…delegation script file
The only way to solve the issue you mention is to remove the Regarding the issue with the delegation script in mainnet, try changing the following lines: |
PR update:
Ran test on
However there are instances of errors on fetching status of order and normally fix itself on the next order cycle
Steps to reproduce:
Ran test on
Steps to reproduce:
|
|
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
Implementation of a new Injective spot connector.
The new connector does not require Gateway (pure Python connector) and has been implemented to trade with delegated accounts (ie: the trading account trades in representation of a granter account, that is the one having the funds).
The current connector implementation does not support market orders (only limit and limit maker). Market orders support will be added in a future version.
In order to use delegated accounts to trade it is necessary to perform a gran onchain. To send the grant transaction please use the script file
hummingbot/connector/exchange/injective_v2/account_delegation_script.py
.NOTE:
There is a problem with the dYdX library. It has very hard restrictions on the possible versions to use for
web3
, forcing the whole Hummingbot project to use an old version of that library and all other crypto related libraries required by web3 in place. Taking into account that it is critical for any crypto project to use the most updated library versions for security reasons, the restrictions imposed bydydx-v3-python
are not acceptable. I think the only solutions the Hummingbot project has are:In this PR, to solve the library issue and allow the use of newer
web3
versions, I changedenvironment.yml
file to point to the branch of a PR sent already to the dYdX library project that solves the issue (dydxprotocol/dydx-v3-python#202). The PR was created in march in all this time the team has not merged it (and they don't show any intentions to merge it in the near future).Tests performed by the developer:
Created unit tests for all new components.
Tested the connector by running pure market making strategies.
Tips for QA testing:
Configure a delegate trading account and teste the connector using spot strategies.
PRP: https://snapshot.org/#/hbot-prp.eth/proposal/0xaf8fa07fbd40c0e92fed0b220c922b1f08416e2e8443e3dfd625ed30c89b6416