Skip to content
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

Update/unregister ao #14

Closed

Conversation

AntonNazarenko
Copy link

No description provided.

@@ -10,7 +10,7 @@ const { PLATFORM = 'bitfinex' } = process.env
*
* @param {Object} aoHost - algo order host
*/
module.exports = async (aoHost = {}) => {
module.exports = async (aoHost = {}, label = null) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is label here?

Copy link
Author

@AntonNazarenko AntonNazarenko Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label of an AO: 'Ping/pong', 'Iceberg' etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right got you, I dont this is the best solution either as this means we can only ever disable one order at a time and it also creates a bit of a confusing side effect. Leave this with me, im going to do a spike to see if we can add this logic to the hf-server instead, Im thinking we could totally destroy and re-create the hf-algo instance when a user re-registers. This way, not only will it be re-registered from the UI but it also wont be able to perform any updates

*
* @param {Object} aoHost - algo order host
*/
module.exports = async (aoHost = {}, aoID) => {
Copy link
Contributor

@JacobPlaster JacobPlaster Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm im not sure if this is the best way to handle this, maybe we should introduce an 'Active' flag similar to the orders? The problem with this is that there isnt any state of the definition being de-registered. So if the AOs are re-registed to the UI via (https://github.com/bitfinexcom/bfx-hf-algo/blob/master/lib/host/ui/register_ao_uis.js) then previously de-registered AO will appear in the UI again

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause a problem in the future when we start allowing the user to create new AOs and therefore promp a call to register_ao_uis

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we need to delete this file, it's unused

@vigan-abd
Copy link
Contributor

outdated

@vigan-abd vigan-abd closed this Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants