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

Exchange based demands #763

Merged
merged 7 commits into from
Apr 2, 2020
Merged

Conversation

kosecki123
Copy link
Contributor

@kosecki123 kosecki123 commented Apr 1, 2020

This PR provides the API for demands management, API for orders cancellation

Features:

  • Demand creation
  • Order cancellation POST /:id/cancel
  • Order GET /:id
  • Cancellation/edits, demand states

Known issue where consecutive pause/resume/pause with less that ~1sec demand might end up with orders having wrong states #765

@kosecki123 kosecki123 added the enhancement New feature or request label Apr 2, 2020
@kosecki123 kosecki123 marked this pull request as ready for review April 2, 2020 07:35
@kosecki123 kosecki123 self-assigned this Apr 2, 2020
@josipbagaric josipbagaric self-requested a review April 2, 2020 07:46
Copy link
Contributor

@josipbagaric josipbagaric left a comment

Choose a reason for hiding this comment

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

LGTM. Only have a few questions, but can otherwise be merged.

});
});

it('should be able to cancel demand', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Cancelling === Pausing demand?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, typo, should be "pause demand"

@@ -15,3 +15,9 @@ export enum Unit {
GW = 1e9,
GWh = 1e9
}

export enum DemandStatus {
Copy link
Contributor

@josipbagaric josipbagaric Apr 2, 2020

Choose a reason for hiding this comment

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

Can this be moved to the exchange-core package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I though so too, but exchange-core does not have any notion of the demand, it's bids, asks, orders, trades. Demand is a collection of bids.

@kosecki123 kosecki123 merged commit 0b9d0d1 into new-origin-integration Apr 2, 2020
@kosecki123 kosecki123 deleted the feat/exchange-demand-api branch April 2, 2020 07:55
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants