MCPcopy Create free account
hub / github.com/ccxt/ccxt / parse_transaction

Method parse_transaction

python/ccxt/coinbase.py:965–1174  ·  view source on GitHub ↗
(self, transaction: dict, currency: Currency = None)

Source from the content-addressed store, hash-verified

963 return self.safe_string(statuses, status, status)
964
965 def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
966 #
967 # fiat deposit
968 #
969 # {
970 # "id": "f34c19f3-b730-5e3d-9f72",
971 # "status": "completed",
972 # "payment_method": {
973 # "id": "a022b31d-f9c7-5043-98f2",
974 # "resource": "payment_method",
975 # "resource_path": "/v2/payment-methods/a022b31d-f9c7-5043-98f2"
976 # },
977 # "transaction": {
978 # "id": "04ed4113-3732-5b0c-af86-b1d2146977d0",
979 # "resource": "transaction",
980 # "resource_path": "/v2/accounts/91cd2d36-3a91-55b6-a5d4-0124cf105483/transactions/04ed4113-3732-5b0c-af86"
981 # },
982 # "user_reference": "2VTYTH",
983 # "created_at": "2017-02-09T07:01:18Z",
984 # "updated_at": "2017-02-09T07:01:26Z",
985 # "resource": "deposit",
986 # "resource_path": "/v2/accounts/91cd2d36-3a91-55b6-a5d4-0124cf105483/deposits/f34c19f3-b730-5e3d-9f72",
987 # "committed": True,
988 # "payout_at": "2017-02-12T07:01:17Z",
989 # "instant": False,
990 # "fee": {"amount": "0.00", "currency": "EUR"},
991 # "amount": {"amount": "114.02", "currency": "EUR"},
992 # "subtotal": {"amount": "114.02", "currency": "EUR"},
993 # "hold_until": null,
994 # "hold_days": 0,
995 # "hold_business_days": 0,
996 # "next_step": null
997 # }
998 #
999 # fiat_withdrawal
1000 #
1001 # {
1002 # "id": "cfcc3b4a-eeb6-5e8c-8058",
1003 # "status": "completed",
1004 # "payment_method": {
1005 # "id": "8b94cfa4-f7fd-5a12-a76a",
1006 # "resource": "payment_method",
1007 # "resource_path": "/v2/payment-methods/8b94cfa4-f7fd-5a12-a76a"
1008 # },
1009 # "transaction": {
1010 # "id": "fcc2550b-5104-5f83-a444",
1011 # "resource": "transaction",
1012 # "resource_path": "/v2/accounts/91cd2d36-3a91-55b6-a5d4-0124cf105483/transactions/fcc2550b-5104-5f83-a444"
1013 # },
1014 # "user_reference": "MEUGK",
1015 # "created_at": "2018-07-26T08:55:12Z",
1016 # "updated_at": "2018-07-26T08:58:18Z",
1017 # "resource": "withdrawal",
1018 # "resource_path": "/v2/accounts/91cd2d36-3a91-55b6-a5d4-0124cf105483/withdrawals/cfcc3b4a-eeb6-5e8c-8058",
1019 # "committed": True,
1020 # "payout_at": "2018-07-31T08:55:12Z",
1021 # "instant": False,
1022 # "fee": {"amount": "0.15", "currency": "EUR"},

Callers 3

withdrawMethod · 0.95
depositMethod · 0.95
fetch_depositMethod · 0.95

Calls 13

safe_stringMethod · 0.80
safe_dictMethod · 0.80
string_absMethod · 0.80
safe_boolMethod · 0.80
in_arrayMethod · 0.80
string_gtMethod · 0.80
string_ltMethod · 0.80
parse_numberMethod · 0.80
safe_numberMethod · 0.80
safe_currency_codeMethod · 0.45
parse8601Method · 0.45

Tested by

no test coverage detected