Skip to content

Hedger - #105

Open
mtmuehl wants to merge 73 commits into
masterfrom
hedger
Open

Hedger#105
mtmuehl wants to merge 73 commits into
masterfrom
hedger

Conversation

@mtmuehl

@mtmuehl mtmuehl commented Jan 30, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@pasiphae00 pasiphae00 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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