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

Handle min amt for acc/dis algo orders #155

Merged
merged 11 commits into from
Aug 12, 2021

Conversation

avsek477
Copy link
Contributor

@avsek477 avsek477 commented May 26, 2021

Since, submitting order with an order size less than the minimum order size allowed returns an error, this PR prevents this error from occurring by redistributing the remaining amount to the sliced order amounts if possible.

Features covered:

  1. Generate the sliced order amount not less than minimum or greater than maximum order size.
  2. Redistribute the remaining amount whose sliced order cannot be created (this case occurs if the remaining amount is less than the minimum order size allowed for that pair).
  3. confirmOrderSubmit function added in meta of acc/dist algo for UI to show user a pop-up in case the amount entered by user cannot be totalled to sum of individual sliced order amount.

Related PR: #174

Task: https://app.asana.com/0/1125859137800433/1200252416166859

@ghost ghost mentioned this pull request May 28, 2021
lib/ao_host.js Outdated Show resolved Hide resolved
lib/accumulate_distribute/meta/confirm_order_submit.js Outdated Show resolved Hide resolved
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

lgtm

@avsek477 avsek477 force-pushed the handle-min-amt-acc-dis branch 3 times, most recently from 69c495e to ed54cb6 Compare June 28, 2021 11:44
Copy link
Contributor

@vigan-abd vigan-abd left a comment

Choose a reason for hiding this comment

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

changes look good, but where possible could we change math operations with nBN operations please? I know that this degrades performance a bit but from previous experience floating prec was a nightmare

> 0.1 + 0.2
0.30000000000000004

Copy link
Contributor

@vigan-abd vigan-abd left a comment

Choose a reason for hiding this comment

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

lgtm

@vigan-abd vigan-abd merged commit ec4d9d2 into bitfinexcom:master Aug 12, 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.

None yet

3 participants