Use ccxt order format

This commit is contained in:
enenn
2018-03-13 22:29:22 +01:00
parent a6ce6ef2c4
commit 421cd76272
7 changed files with 48 additions and 31 deletions

View File

@@ -98,10 +98,11 @@ def buy(pair: str, rate: float, amount: float) -> Dict:
'pair': pair,
'rate': rate,
'amount': amount,
'type': 'LIMIT_BUY',
'type': 'limit',
'side': 'buy',
'remaining': 0.0,
'opened': arrow.utcnow().datetime,
'closed': arrow.utcnow().datetime,
'datetime': arrow.utcnow().isoformat(),
'status': 'closed'
}
return {'id': order_id}
@@ -135,10 +136,11 @@ def sell(pair: str, rate: float, amount: float) -> Dict:
'pair': pair,
'rate': rate,
'amount': amount,
'type': 'LIMIT_SELL',
'type': 'limit',
'side': 'sell',
'remaining': 0.0,
'opened': arrow.utcnow().datetime,
'closed': arrow.utcnow().datetime,
'datetime': arrow.utcnow().isoformat(),
'status': 'closed'
}
return {'id': order_id}