Closed elsewhat closed 2 years ago
REQUEST: https://api.opensea.io/api/v1/events?account_address=0x68b42e44079D1d0A4a037e8c6eCd62c48967e69f&event_type=transfer&only_opensea=False&offset=9600&limit=300 Failed parsing transaction strptime() argument 1 must be str, not None { "approved_account": null, "asset": { "id": 14008993, "token_id": "1823915", "num_sales": 0, "background_color": "faeefa", "image_url": "https://lh3.googleusercontent.com/QCUGFzCbpApoAw2lEMI_yQJSYG9Z4Cti68lyWmPVT2cT_wucuwscDyxOuQK_dJEhIGA58kFWveis3IwLU2hP5tWD", "image_preview_url": "https://lh3.googleusercontent.com/QCUGFzCbpApoAw2lEMI_yQJSYG9Z4Cti68lyWmPVT2cT_wucuwscDyxOuQK_dJEhIGA58kFWveis3IwLU2hP5tWD=s250", "image_thumbnail_url": "https://lh3.googleusercontent.com/QCUGFzCbpApoAw2lEMI_yQJSYG9Z4Cti68lyWmPVT2cT_wucuwscDyxOuQK_dJEhIGA58kFWveis3IwLU2hP5tWD=s128", "image_original_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1823915.png", "animation_url": null, "animation_original_url": null, "name": "Susi Sizzlecutie", "description": "I'm Susi Sizzlecutie, who's asking? Can we PLEASE watch Sixteen Candles together? My only policy is no politics.", "external_link": "https://www.cryptokitties.co/kitty/1823915", "asset_contract": { "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d", "asset_contract_type": "non-fungible", "created_date": "2018-01-23T04:51:38.832339", "name": "CryptoKitties", "nft_version": "1.0", "opensea_version": null, "owner": 463841, "schema_name": "ERC721", "symbol": "CKITTY", "total_supply": null, "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", "external_link": "https://www.cryptokitties.co/", "image_url": "https://lh3.googleusercontent.com/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg=s60", "default_to_fiat": false, "dev_buyer_fee_basis_points": 0, "dev_seller_fee_basis_points": 0, "only_proxied_transfers": false, "opensea_buyer_fee_basis_points": 0, "opensea_seller_fee_basis_points": 250, "buyer_fee_basis_points": 0, "seller_fee_basis_points": 250, "payout_address": null }, "permalink": "https://opensea.io/assets/0x06012c8cf97bead5deae237070f9587f8e7a266d/1823915", "collection": { "banner_image_url": "https://storage.opensea.io/static/banners/cryptokitties-banner2.png", "chat_url": null, "created_date": "2019-04-26T22:13:04.207050", "default_to_fiat": false, "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", "dev_buyer_fee_basis_points": "0", "dev_seller_fee_basis_points": "0", "discord_url": "https://discord.gg/cryptokitties", "display_data": { "card_display_style": "padded" }, "external_url": "https://www.cryptokitties.co/", "featured": false, "featured_image_url": "https://storage.opensea.io/0x06012c8cf97bead5deae237070f9587f8e7a266d-featured-1556589429.png", "hidden": false, "safelist_request_status": "verified", "image_url": "https://lh3.googleusercontent.com/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg=s60", "is_subject_to_whitelist": false, "large_image_url": "https://lh3.googleusercontent.com/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg", "medium_username": null, "name": "CryptoKitties", "only_proxied_transfers": false, "opensea_buyer_fee_basis_points": "0", "opensea_seller_fee_basis_points": "250", "payout_address": null, "require_email": false, "short_description": null, "slug": "cryptokitties", "telegram_url": null, "twitter_username": "CryptoKitties", "instagram_username": null, "wiki_url": "https://opensea.readme.io/page/cryptokitties" }, "decimals": null, "token_metadata": null, "owner": { "user": { "username": "KittenMittens" }, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/8.png", "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", "config": "" } }, "asset_bundle": null, "auction_type": null, "bid_amount": null, "collection_slug": "cryptokitties", "contract_address": "0x06012c8cf97bead5deae237070f9587f8e7a266d", "created_date": "2020-01-30T22:48:44.993813", "custom_event_name": null, "dev_fee_payment_event": null, "duration": null, "ending_price": null, "event_type": "transfer", "from_account": { "user": { "username": "NullAddress" }, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/1.png", "address": "0x0000000000000000000000000000000000000000", "config": "" }, "id": 31421689, "is_private": null, "owner_account": null, "payment_token": null, "quantity": null, "seller": null, "starting_price": null, "to_account": { "user": { "username": "KittenMittens" }, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/8.png", "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", "config": "" }, "total_price": null, "transaction": { "block_hash": null, "block_number": null, "from_account": { "user": null, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/17.png", "address": "0xc5b373618d4d01a38f822f56ca6d2ff5080cc4f2", "config": "" }, "id": 14733920, "timestamp": null, "to_account": { "user": null, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/7.png", "address": "0x896b516eb300e61cfc96ee1de4b297374e7b70ed", "config": "" }, "transaction_hash": "0xb7fbd30256e5adb2c26f8c4857f7446d852d3d8248bef3e9855dac18117d8217", "transaction_index": null }, "winner_account": null } Traceback (most recent call last): File "nft-crypto-taxes.py", line 334, in main() File "nft-crypto-taxes.py", line 321, in main walletNFTHistory.processOpenseaAPIResponse(openseaEvents) File "nft-crypto-taxes.py", line 38, in processOpenseaAPIResponse transactionDate = datetime.strptime(openseaEvent['transaction']['timestamp'],'%Y-%m-%dT%H:%M:%S') TypeError: strptime() argument 1 must be str, not None
Use "created_date": "2020-01-30T22:48:44.993813" or skip ?
Fixed
REQUEST: https://api.opensea.io/api/v1/events?account_address=0x68b42e44079D1d0A4a037e8c6eCd62c48967e69f&event_type=transfer&only_opensea=False&offset=9600&limit=300 Failed parsing transaction strptime() argument 1 must be str, not None { "approved_account": null, "asset": { "id": 14008993, "token_id": "1823915", "num_sales": 0, "background_color": "faeefa", "image_url": "https://lh3.googleusercontent.com/QCUGFzCbpApoAw2lEMI_yQJSYG9Z4Cti68lyWmPVT2cT_wucuwscDyxOuQK_dJEhIGA58kFWveis3IwLU2hP5tWD", "image_preview_url": "https://lh3.googleusercontent.com/QCUGFzCbpApoAw2lEMI_yQJSYG9Z4Cti68lyWmPVT2cT_wucuwscDyxOuQK_dJEhIGA58kFWveis3IwLU2hP5tWD=s250", "image_thumbnail_url": "https://lh3.googleusercontent.com/QCUGFzCbpApoAw2lEMI_yQJSYG9Z4Cti68lyWmPVT2cT_wucuwscDyxOuQK_dJEhIGA58kFWveis3IwLU2hP5tWD=s128", "image_original_url": "https://img.cryptokitties.co/0x06012c8cf97bead5deae237070f9587f8e7a266d/1823915.png", "animation_url": null, "animation_original_url": null, "name": "Susi Sizzlecutie", "description": "I'm Susi Sizzlecutie, who's asking? Can we PLEASE watch Sixteen Candles together? My only policy is no politics.", "external_link": "https://www.cryptokitties.co/kitty/1823915", "asset_contract": { "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d", "asset_contract_type": "non-fungible", "created_date": "2018-01-23T04:51:38.832339", "name": "CryptoKitties", "nft_version": "1.0", "opensea_version": null, "owner": 463841, "schema_name": "ERC721", "symbol": "CKITTY", "total_supply": null, "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", "external_link": "https://www.cryptokitties.co/", "image_url": "https://lh3.googleusercontent.com/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg=s60", "default_to_fiat": false, "dev_buyer_fee_basis_points": 0, "dev_seller_fee_basis_points": 0, "only_proxied_transfers": false, "opensea_buyer_fee_basis_points": 0, "opensea_seller_fee_basis_points": 250, "buyer_fee_basis_points": 0, "seller_fee_basis_points": 250, "payout_address": null }, "permalink": "https://opensea.io/assets/0x06012c8cf97bead5deae237070f9587f8e7a266d/1823915", "collection": { "banner_image_url": "https://storage.opensea.io/static/banners/cryptokitties-banner2.png", "chat_url": null, "created_date": "2019-04-26T22:13:04.207050", "default_to_fiat": false, "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.", "dev_buyer_fee_basis_points": "0", "dev_seller_fee_basis_points": "0", "discord_url": "https://discord.gg/cryptokitties", "display_data": { "card_display_style": "padded" }, "external_url": "https://www.cryptokitties.co/", "featured": false, "featured_image_url": "https://storage.opensea.io/0x06012c8cf97bead5deae237070f9587f8e7a266d-featured-1556589429.png", "hidden": false, "safelist_request_status": "verified", "image_url": "https://lh3.googleusercontent.com/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg=s60", "is_subject_to_whitelist": false, "large_image_url": "https://lh3.googleusercontent.com/C272ZRW1RGGef9vKMePFSCeKc1Lw6U40wl9ofNVxzUxFdj84hH9xJRQNf-7wgs7W8qw8RWe-1ybKp-VKuU5D-tg", "medium_username": null, "name": "CryptoKitties", "only_proxied_transfers": false, "opensea_buyer_fee_basis_points": "0", "opensea_seller_fee_basis_points": "250", "payout_address": null, "require_email": false, "short_description": null, "slug": "cryptokitties", "telegram_url": null, "twitter_username": "CryptoKitties", "instagram_username": null, "wiki_url": "https://opensea.readme.io/page/cryptokitties" }, "decimals": null, "token_metadata": null, "owner": { "user": { "username": "KittenMittens" }, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/8.png", "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", "config": "" } }, "asset_bundle": null, "auction_type": null, "bid_amount": null, "collection_slug": "cryptokitties", "contract_address": "0x06012c8cf97bead5deae237070f9587f8e7a266d", "created_date": "2020-01-30T22:48:44.993813", "custom_event_name": null, "dev_fee_payment_event": null, "duration": null, "ending_price": null, "event_type": "transfer", "from_account": { "user": { "username": "NullAddress" }, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/1.png", "address": "0x0000000000000000000000000000000000000000", "config": "" }, "id": 31421689, "is_private": null, "owner_account": null, "payment_token": null, "quantity": null, "seller": null, "starting_price": null, "to_account": { "user": { "username": "KittenMittens" }, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/8.png", "address": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f", "config": "" }, "total_price": null, "transaction": { "block_hash": null, "block_number": null, "from_account": { "user": null, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/17.png", "address": "0xc5b373618d4d01a38f822f56ca6d2ff5080cc4f2", "config": "" }, "id": 14733920, "timestamp": null, "to_account": { "user": null, "profile_img_url": "https://storage.googleapis.com/opensea-static/opensea-profile/7.png", "address": "0x896b516eb300e61cfc96ee1de4b297374e7b70ed", "config": "" }, "transaction_hash": "0xb7fbd30256e5adb2c26f8c4857f7446d852d3d8248bef3e9855dac18117d8217", "transaction_index": null }, "winner_account": null } Traceback (most recent call last): File "nft-crypto-taxes.py", line 334, in
main()
File "nft-crypto-taxes.py", line 321, in main
walletNFTHistory.processOpenseaAPIResponse(openseaEvents)
File "nft-crypto-taxes.py", line 38, in processOpenseaAPIResponse
transactionDate = datetime.strptime(openseaEvent['transaction']['timestamp'],'%Y-%m-%dT%H:%M:%S')
TypeError: strptime() argument 1 must be str, not None