-
Notifications
You must be signed in to change notification settings - Fork 1
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: Example of event trading framework using client. #34
Conversation
…ork around the client
…e additional functionality.
…e additional functionality.
Note that this changes a few things in the
Otherwise everything else is just additions! |
starting_quote_asset_amount: Decimal, | ||
starting_base_asset_average_price: Optional[Decimal], | ||
# Grid | ||
fair_price: Decimal, |
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.
discussed offline with @adamamsmith - the ability to update fair_price
, with the necessary actions to happen when updated, will make this a very modular order management system that can be utilized in a variety ways!
@@ -15,3 +15,4 @@ token_addresses: | |||
WETH: "0x4200000000000000000000000000000000000006" | |||
OP: "0xCeE7148028Ff1B08163343794E85883174a61393" | |||
USDC: "0xe432f229521eE954f80C83257485405E3d848d17" | |||
USDT: "0xd70734ba8101ec28b38ab15e30dc9b60e3c6f433" |
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.
confirmed, USDT
address supported by the app. can't wait till we have a token list, will be a programmatic way to approach token validation. can even be a part of the CI pipeline
:return: the max approval amount of a uint256 token in Decimal representation | ||
:rtype: Decimal | ||
""" | ||
max_uint256 = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" |
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 totally works, was wondering if there is a reason we didn't do something like:
return self.to_decimal(number=2**256 - 1)
@@ -418,7 +418,7 @@ def batch_requote( | |||
buy_amts: List[int], | |||
buy_gems: List[ChecksumAddress], | |||
nonce: Optional[int] = None, | |||
gas: int = 3500000, | |||
gas: int = 800000, |
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.
just a cc to: #6
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 is a really solid framework to build off of, had a good conversation offline with @adamamsmith about this and possible next steps. will turn some of the major points into tickets
Demonstrate how to build an event based system around the client in
rubi-py
.The most important components of this are:
Still needs a lot of cleanup atm.