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

Method parse_ledger_entry

python/ccxt/coinbase.py:2515–2818  ·  view source on GitHub ↗
(self, item: dict, currency: Currency = None)

Source from the content-addressed store, hash-verified

2513 return self.safe_string(types, type, type)
2514
2515 def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
2516 #
2517 # crypto deposit transaction
2518 #
2519 # {
2520 # "id": "34e4816b-4c8c-5323-a01c-35a9fa26e490",
2521 # "type": "send",
2522 # "status": "completed",
2523 # "amount": {amount: "28.31976528", currency: "BCH"},
2524 # "native_amount": {amount: "2799.65", currency: "GBP"},
2525 # "description": null,
2526 # "created_at": "2019-02-28T12:35:20Z",
2527 # "updated_at": "2019-02-28T12:43:24Z",
2528 # "resource": "transaction",
2529 # "resource_path": "/v2/accounts/c01d7364-edd7-5f3a-bd1d-de53d4cbb25e/transactions/34e4816b-4c8c-5323-a01c-35a9fa26e490",
2530 # "instant_exchange": False,
2531 # "network": {
2532 # "status": "confirmed",
2533 # "hash": "56222d865dae83774fccb2efbd9829cf08c75c94ce135bfe4276f3fb46d49701",
2534 # "transaction_url": "https://bch.btc.com/56222d865dae83774fccb2efbd9829cf08c75c94ce135bfe4276f3fb46d49701"
2535 # },
2536 # "from": {resource: "bitcoin_cash_network", currency: "BCH"},
2537 # "details": {title: 'Received Bitcoin Cash', subtitle: "From Bitcoin Cash address"}
2538 # }
2539 #
2540 # crypto withdrawal transaction
2541 #
2542 # {
2543 # "id": "459aad99-2c41-5698-ac71-b6b81a05196c",
2544 # "type": "send",
2545 # "status": "completed",
2546 # "amount": {amount: "-0.36775642", currency: "BTC"},
2547 # "native_amount": {amount: "-1111.65", currency: "GBP"},
2548 # "description": null,
2549 # "created_at": "2019-03-20T08:37:07Z",
2550 # "updated_at": "2019-03-20T08:49:33Z",
2551 # "resource": "transaction",
2552 # "resource_path": "/v2/accounts/c6afbd34-4bd0-501e-8616-4862c193cd84/transactions/459aad99-2c41-5698-ac71-b6b81a05196c",
2553 # "instant_exchange": False,
2554 # "network": {
2555 # "status": "confirmed",
2556 # "hash": "2732bbcf35c69217c47b36dce64933d103895277fe25738ffb9284092701e05b",
2557 # "transaction_url": "https://blockchain.info/tx/2732bbcf35c69217c47b36dce64933d103895277fe25738ffb9284092701e05b",
2558 # "transaction_fee": {amount: "0.00000000", currency: "BTC"},
2559 # "transaction_amount": {amount: "0.36775642", currency: "BTC"},
2560 # "confirmations": 15682
2561 # },
2562 # "to": {
2563 # "resource": "bitcoin_address",
2564 # "address": "1AHnhqbvbYx3rnZx8uC7NbFZaTe4tafFHX",
2565 # "currency": "BTC",
2566 # "address_info": {address: "1AHnhqbvbYx3rnZx8uC7NbFZaTe4tafFHX"}
2567 # },
2568 # "idem": "da0a2f14-a2af-4c5a-a37e-d4484caf582bsend",
2569 # "application": {
2570 # "id": "5756ab6e-836b-553b-8950-5e389451225d",
2571 # "resource": "application",
2572 # "resource_path": "/v2/applications/5756ab6e-836b-553b-8950-5e389451225d"

Callers

nothing calls this directly

Calls 14

safe_dictMethod · 0.80
safe_stringMethod · 0.80
string_ltMethod · 0.80
string_negMethod · 0.80
safe_currencyMethod · 0.80
safe_numberMethod · 0.80
splitMethod · 0.80
safe_ledger_entryMethod · 0.80
parse_numberMethod · 0.80
safe_currency_codeMethod · 0.45

Tested by

no test coverage detected