mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
Orders: add meta field and support for aff_code
This commit is contained in:
committed by
Jacob Plaster
parent
821f8831b9
commit
39e79da9a1
@@ -58,6 +58,7 @@ class OrderClosedModel:
|
||||
PRICE_AUX_LIMIT = 19
|
||||
NOTIFY = 23
|
||||
PLACE_ID = 25
|
||||
META = 31
|
||||
|
||||
|
||||
class OrderFlags:
|
||||
@@ -109,7 +110,7 @@ class Order:
|
||||
|
||||
def __init__(self, oid, gid, cid, symbol, mts_create, mts_update, amount,
|
||||
amount_orig, o_type, typePrev, flags, status, price, price_avg,
|
||||
price_trailing, price_aux_limit, notfiy, place_id):
|
||||
price_trailing, price_aux_limit, notfiy, place_id, meta={}):
|
||||
self.id = oid # pylint: disable=invalid-name
|
||||
self.gid = gid
|
||||
self.cid = cid
|
||||
@@ -172,10 +173,11 @@ class Order:
|
||||
price_aux_limit = raw_order[OrderClosedModel.PRICE_AUX_LIMIT]
|
||||
notfiy = raw_order[OrderClosedModel.NOTIFY]
|
||||
place_id = raw_order[OrderClosedModel.PLACE_ID]
|
||||
meta = raw_order[OrderClosedModel.META] or {}
|
||||
|
||||
return Order(oid, gid, cid, symbol, mts_create, mts_update, amount,
|
||||
amount_orig, o_type, type_prev, flags, status, price, price_avg,
|
||||
price_trailing, price_aux_limit, notfiy, place_id)
|
||||
price_trailing, price_aux_limit, notfiy, place_id, meta)
|
||||
|
||||
@staticmethod
|
||||
def from_raw_order_snapshot(raw_order_snapshot):
|
||||
|
||||
Reference in New Issue
Block a user