MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / __from_json__

Method __from_json__

projects/Python/proto/protoex.py:510–522  ·  view source on GitHub ↗
(fields)

Source from the content-addressed store, hash-verified

508
509 @staticmethod
510 def __from_json__(fields):
511 if fields is None:
512 return None
513 return Order(
514 None if "id" not in fields else fields["id"],
515 None if "symbol" not in fields else fields["symbol"],
516 None if "side" not in fields else OrderSide.__from_json__(fields["side"]),
517 None if "type" not in fields else OrderType.__from_json__(fields["type"]),
518 None if "price" not in fields else fields["price"],
519 None if "volume" not in fields else fields["volume"],
520 None if "tp" not in fields else fields["tp"],
521 None if "sl" not in fields else fields["sl"],
522 )
523
524 # Get the FBE type
525 @property

Callers 11

from_jsonMethod · 0.45
from_jsonMethod · 0.45
__from_json__Method · 0.45
from_jsonMethod · 0.45
__from_json__Method · 0.45
from_jsonMethod · 0.45
__from_json__Method · 0.45
from_jsonMethod · 0.45
__from_json__Method · 0.45
from_jsonMethod · 0.45
__from_json__Method · 0.45

Calls 1

OrderClass · 0.70

Tested by

no test coverage detected