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

Method parse_transaction

python/ccxt/ndax.py:2264–2357  ·  view source on GitHub ↗
(self, transaction: dict, currency: Currency = None)

Source from the content-addressed store, hash-verified

2262 return self.safe_string(statuses, status, status)
2263
2264 def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2265 #
2266 # fetchDeposits
2267 #
2268 # {
2269 # "OMSId": 1,
2270 # "DepositId": 44,
2271 # "AccountId": 449,
2272 # "SubAccountId": 0,
2273 # "ProductId": 4,
2274 # "Amount": 200.00000000000000000000000000,
2275 # "LastUpdateTimeStamp": 637431291261187806,
2276 # "ProductType": "CryptoCurrency",
2277 # "TicketStatus": "FullyProcessed",
2278 # "DepositInfo": "{
2279 # "AccountProviderId":42,
2280 # "AccountProviderName":"USDT_BSC",
2281 # "TXId":"0x3879b02632c69482646409e991149290bc9a58e4603be63c7c2c90a843f45d2b",
2282 # "FromAddress":"0x8894E0a0c962CB723c1976a4421c95949bE2D4E3",
2283 # "ToAddress":"0x5428EcEB1F7Ee058f64158589e27D087149230CB"
2284 # }",
2285 # "DepositCode": "ab0e23d5-a9ce-4d94-865f-9ab464fb1de3",
2286 # "TicketNumber": 71,
2287 # "NotionalProductId": 13,
2288 # "NotionalValue": 200.00000000000000000000000000,
2289 # "FeeAmount": 0.0000000000000000000000000000,
2290 # }
2291 #
2292 # fetchWithdrawals
2293 #
2294 # {
2295 # "Amount": 0.0,
2296 # "FeeAmount": 0.0,
2297 # "NotionalValue": 0.0,
2298 # "WithdrawId": 0,
2299 # "AssetManagerId": 0,
2300 # "AccountId": 0,
2301 # "AssetId": 0,
2302 # "TemplateForm": "{\"TemplateType\": \"TetherRPCWithdraw\",\"Comment\": \"TestWithdraw\",\"ExternalAddress\": \"ms6C3pKAAr8gRCcnVebs8VRkVrjcvqNYv3\"}",
2303 # "TemplateFormType": "TetherRPCWithdraw",
2304 # "omsId": 0,
2305 # "TicketStatus": 0,
2306 # "TicketNumber": 0,
2307 # "WithdrawTransactionDetails": "",
2308 # "WithdrawType": "",
2309 # "WithdrawCode": "490b4fa3-53fc-44f4-bd29-7e16be86fba3",
2310 # "AssetType": 0,
2311 # "Reaccepted": True,
2312 # "NotionalProductId": 0
2313 # }
2314 #
2315 id = None
2316 currencyId = self.safe_string(transaction, 'ProductId')
2317 code = self.safe_currency_code(currencyId, currency)
2318 type = None
2319 if 'DepositId' in transaction:
2320 id = self.safe_string(transaction, 'DepositId')
2321 type = 'deposit'

Callers 1

withdrawMethod · 0.95

Calls 9

safe_stringMethod · 0.80
parse_jsonMethod · 0.80
safe_value_2Method · 0.80
safe_integerMethod · 0.80
safe_string_2Method · 0.80
safe_numberMethod · 0.80
safe_currency_codeMethod · 0.45
iso8601Method · 0.45

Tested by

no test coverage detected