-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hedger #105
base: master
Are you sure you want to change the base?
Conversation
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.
looking good so far. let me know if you want to/need to chat about switching from the HTTP calls to the gRPC clients
|
||
req = ExchangeOrderRequest(exchange=exchange, id=order_id) | ||
response = self.em_stub.CancelOrder(req) | ||
return {'cancelled':True} |
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.
is there a way to pull the status from the response? or is the response empty
?
import grpc | ||
|
||
ENVIRONMENT = getenv("ENVIRONMENT", 'TEST') | ||
PRICE_PAIRS = {'WETH/DAI': {'COINBASE': 'ETH/USD'}, |
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.
lets move this to config.json
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.
(see comment below about adding a config manager to the hedger)
PRICE_PAIRS = {'WETH/DAI': {'COINBASE': 'ETH/USD'}, | ||
'ZRX/DAI': {'COINBASE': 'ZRX/USD'}, 'USDC/USDT': {'BINANCE': 'USDC/USDT'}, | ||
'DAI/USDC': {'COINBASE': 'DAI/USDC'}} | ||
MAX_BOOK_AGES = {'ETH/USD': 10, 'ZRX/USD': 15, 'USDC/USDT': 15, 'DAI/USDC': 25} |
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.
config.json
OBM_CHANNEL = os.environ.get('OBM_CHANNEL', 'localhost:8000') | ||
|
||
try: | ||
SUPPORTED_EXCHANGES = json.loads(os.environ['SUPPORTED_EXCHANGES']) |
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.
I know this is carried over from the old impl., but before merge lets move this to the config manger
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.
^ meaning lets also add a hedger config manager, similar to the maker
MYSQL_USER = getenv('MYSQL_USER', default=None) | ||
MYSQL_PASSWORD = getenv('MYSQL_PASSWORD', default=None) | ||
|
||
PRICE_PAIRS = {'WETH/DAI': {'BINANCE': 'ETH/USDT', 'COINBASE': 'ETH/USD'}, 'ZRX/WETH': {'BINANCE': 'ZRX/ETH'}, 'ZRX/DAI': {'COINBASE': 'ZRX/USD', 'BINANCE': 'ZRX/USDT'}} |
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.
from this line down to 42 should all be through some sort of config manager, like the maker
…transaction parameter
No description provided.