-
Notifications
You must be signed in to change notification settings - Fork 40
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
Update/unregister ao #14
Conversation
@@ -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) => { |
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.
What is label here?
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.
label of an AO: 'Ping/pong', 'Iceberg' etc.
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.
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
…hf-algo into update/unregister-ao
lib/host/ui/unregister_ao_uis.js
Outdated
* | ||
* @param {Object} aoHost - algo order host | ||
*/ | ||
module.exports = async (aoHost = {}, aoID) => { |
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.
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
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.
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
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.
Sorry, we need to delete this file, it's unused
outdated |
No description provided.