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

Hedger #105

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open

Hedger #105

wants to merge 73 commits into from

Conversation

mtmuehl
Copy link
Contributor

@mtmuehl mtmuehl commented Jan 30, 2020

No description provided.

Copy link
Member

@hrharder hrharder left a 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}
Copy link
Member

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'},
Copy link
Member

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

Copy link
Member

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}
Copy link
Member

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'])
Copy link
Member

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

Copy link
Member

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'}}
Copy link
Member

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

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.

3 participants