0

I'm using the following Covalent API endpoint: https://api.covalenthq.com/v1/137/address/<walletaddress>/transactions_v2/?&key=<apikey>

It returns tons of data. I'd like to query particular fields. When I append the URL with &fields=data.address on Postman, I get an error ":

{
"data": null,
"error": true,
"error_message": "Query parameter 'fields' not allowed.",
"error_code": 400
}

Without the append, I get a ton of data. Here's a snippet of the first bit:

{
"data": {
    "address": "0x00000000",
    "updated_at": "2021-06-09T21:56:45.989226038Z",
    "next_update_at": "2021-06-09T22:01:45.989226838Z",
    "quote_currency": "USD",
    "chain_id": 137,
    "items": [
        {
            "block_signed_at": "2021-06-09T13:14:10Z",
            "block_height": 0,
            "tx_hash": "0xblahblahblah",
            "tx_offset": 209,
            "successful": true,
            "from_address": "0xblahblahblah",
            "from_address_label": null,
            "to_address": "blahblahblah",
            "to_address_label": null,
            "value": "0",
            "value_quote": null,
            "gas_offered": 1000000,
            "gas_spent": 245136,
            "gas_price": 1000000000,
            "gas_quote": null,
            "gas_quote_rate": null,
            "log_events": [
                {
                    "block_signed_at": "2021-06-09T13:14:10Z",
                    "block_height": 15514343,
                    "tx_offset": 209,
                    "log_offset": 451,
                    "tx_hash": "0xblahblbahblah",
                    "_raw_log_topics_bytes": null,
                    "raw_log_topics": [
                        "0x000000000",
                        "0x0000000000000000000000000000000000000000000000000000000000001010",
                        "0x00000000000000000000000000000000",
                        "0x0000000000000000000000000000000"
                    ],
                    "sender_contract_decimals": null,
                    "sender_name": null,
                    "sender_contract_ticker_symbol": null,
                    "sender_address": "0x000000000000000000000000000000000000000",
                    "sender_address_label": null,
                    "sender_logo_url": null,
                    "raw_log_data": "0x00000000000",
                    "decoded": null
                },
                {
                    "block_signed_at": "2021-06-09T13:14:10Z",
                    "block_height": 15514343,
                    "tx_offset": 209,
                    "log_offset": 450,
                    "tx_hash": "00000000000",
                    "_raw_log_topics_bytes": null,
                    "raw_log_topics": [
                        "000000000",
                        "0x0000000000",
                        "0x00000000000000",
                        "0x0000000000000000000000000000000000000000000000000000000000000000"
                    ],
                    "sender_contract_decimals": null,
                    "sender_name": null,
                    "sender_contract_ticker_symbol": null,
                    "sender_address": "0x00000000000",
                    "sender_address_label": null,
                    "sender_logo_url": null,
                    "raw_log_data": "0x000000000000000",
                    "decoded": {
                        "name": "Deposit",
                        "signature": "Deposit(indexed address reserve, address user, indexed address onBehalfOf, uint256 amount, indexed uint16 referral)",
                        "params": [
                            {
                                "name": "reserve",
                                "type": "address",
                                "indexed": true,
                                "decoded": true,
                                "value": "0x00000000"
                            },
                            {
                                "name": "user",
                                "type": "address",
                                "indexed": false,
                                "decoded": true,
                                "value": "0x00000000"
                            },
                            {
                                "name": "onBehalfOf",
                                "type": "address",
                                "indexed": true,
                                "decoded": true,
                                "value": "0x000000000"
                            },
                            {
                                "name": "amount",
                                "type": "uint256",
                                "indexed": false,
                                "decoded": true,
                                "value": "546136184500153602"
                            },..........

All I want are the date, amount, token, from address, and to address. I guess value is the field I want. Is there a way to query just for those fields? I'm using google script for google sheets.

EDIT

I found Polyscan and will report what I find.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.