AVAX Blockbook WSS

Get Info

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"2","method":"getInfo","params":{}}	

Response: 200

{
    "id": "2",
    "data": {
        "name": "Avalanche",
        "shortcut": "AVAX",
        "decimals": 18,
        "version": "devel",
        "bestHeight": 43900621,
        "bestHash": "0x5ae046224178501097bca2d77ea69e36c205ab8ac083ffe70155be6d0c857428",
        "block0Hash": "0x31ced5b9beb7f8782b014660da0cb18cc409f121f408186886e1ca3e8eeca96b",
        "testnet": false,
        "backend": {
            "version": "v1.11.3"
        }
    }
}

Ping

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"3","method":"ping","params":{}}	

Response: 200

{
    "id": "3",
    "data": {}
}

Get block hash

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"4","method":"getBlockHash","params":{"height":1000000}}

Response: 200

{
    "id": "4",
    "data": {
        "hash": "0xf4be03c0253c32bfe6b78a96bf13fc71014f28568059da8d3d292957918fff80"
    }
}

Get account info

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{
  "id": "5",
  "method": "getAccountInfo",
  "params": {
    "descriptor": "0xba98d6a5ac827632e3457de7512d211e4ff7e8bd",
    "details": "basic",
    "tokens": "derived",
    "page": null,
    "pageSize": 10,
    "from": null,
    "to": null,
    "contractFilter": ""
  }
}	

Response: 200

{
    "id": "5",
    "data": {
        "address": "0xba98D6a5ac827632E3457De7512d211e4ff7e8bD",
        "balance": "0",
        "unconfirmedBalance": "0",
        "unconfirmedTxs": 0,
        "txs": 0,
        "nonce": "0"
    }
}

Get balance history

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{
  "id": "7",
  "method": "getBalanceHistory",
  "params": {
    "descriptor": "0x00008eb96bbe046aee645d8933adf151c4b7b614",
    "from": null,
    "to": null,
    "currencies": [
      ""
    ],
    "groupBy": null
  }
}

Response: 200

{
    "id": "7",
    "data": []
}

Get transaction

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"9","method":"getTransaction","params":{"txid":"0xdc18ac078e20f5ce8ee72004c89400ffa4bee67e8aa292dce69f5978dce84532"}}	

Response: 200

{
    "id": "9",
    "data": {
        "error": {
            "message": "Transaction '0xdc18ac078e20f5ce8ee72004c89400ffa4bee67e8aa292dce69f5978dce84532' not found"
        }
    }
}

Get transaction specific

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"10","method":"getTransactionSpecific","params":{"txid":"0xdc18ac078e20f5ce8ee72004c89400ffa4bee67e8aa292dce69f5978dce84532"}}	

Response: 200

{
    "id": "10",
    "data": {
        "error": {
            "message": "Tx not found"
        }
    }
}

Estimate fee

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"11","method":"estimateFee","params":{"blocks":[2,5,10,20]}}	

Response: 200

{
    "id": "11",
    "data": [
        {
            "feePerTx": "1325000000000000",
            "feePerUnit": "25000000000",
            "feeLimit": "53000"
        },
        {
            "feePerTx": "70225000000000000000",
            "feePerUnit": "1325000000000000",
            "feeLimit": "53000"
        },
        {
            "feePerTx": "3721925000000000000000000",
            "feePerUnit": "70225000000000000000",
            "feeLimit": "53000"
        },
        {
            "feePerTx": "197262025000000000000000000000",
            "feePerUnit": "3721925000000000000000000",
            "feeLimit": "53000"
        }
    ]
}

Send transaction

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"1","method":"sendTransaction","params":{"hex":"010000000001019d64f0c72a0d206001decbffaa722eb1044534c74eee7a5df8318e42a4323ec10000000017160014550da1f5d25a9dae2eafd6902b4194c4c6500af6ffffffff02809698000000000017a914cd668d781ece600efa4b2404dc91fd26b8b8aed8870553d7360000000017a914246655bdbd54c7e477d0ea2375e86e0db2b8f80a8702473044022076aba4ad559616905fa51d4ddd357fc1fdb428d40cb388e042cdd1da4a1b7357022011916f90c712ead9a66d5f058252efd280439ad8956a967e95d437d246710bc9012102a80a5964c5612bb769ef73147b2cf3c149bc0fd4ecb02f8097629c94ab013ffd00000000"}}		

Response: 200

{
    "id": "1",
    "data": {
        "error": {
            "message": "invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type hexutil.Bytes"
        }
    }
}

Get fiat rates for timestamps

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"13","method":"getFiatRatesForTimestamps","params":{"timestamps":[1575288000,1575550800],"currencies":[""]}}	

Response: 200

{
    "id": "13",
    "data": {
        "tickers": [
            {
                "ts": 1600732800,
                "rates": {
                    "aed": 19.410086,
                    "ars": 399.39853,
                    "aud": 7.363235,
                    "bch": 0.024058765,
                    "bdt": 448.39334,
                    "bhd": 1.9927361,
                    "bits": 501.77475,
                    "bmd": 5.2842445,
                    "bnb": 0.2199666,
                    "brl": 28.912214,
                    "btc": 0.0005017748,
                    "cad": 7.0263433,
                    "chf": 4.860633,
                    "clp": 4106.915,
                    "cny": 35.82665,
                    "czk": 121.490585,
                    "dkk": 33.582027,
                    "dot": 1.2678075,
                    "eos": 2.05597,
                    "eth": 0.01536325,
                    "eur": 4.512819,
                    "gbp": 4.1465993,
                    "hkd": 40.95316,
                    "huf": 1638.4857,
                    "idr": 77939.13,
                    "ils": 18.147522,
                    "inr": 388.40915,
                    "jpy": 555.0456,
                    "krw": 6148.7466,
                    "kwd": 1.6163024,
                    "link": 0.6050359,
                    "lkr": 980.154,
                    "ltc": 0.11891757,
                    "mmk": 6934.4604,
                    "mxn": 114.49059,
                    "myr": 21.847708,
                    "ngn": 2027.1019,
                    "nok": 49.388905,
                    "nzd": 7.966881,
                    "php": 256.1802,
                    "pkr": 878.2927,
                    "pln": 20.235754,
                    "rub": 401.88687,
                    "sar": 19.8211,
                    "sats": 50177.477,
                    "sek": 47.09736,
                    "sgd": 7.211382,
                    "thb": 165.88036,
                    "try": 40.544422,
                    "twd": 153.49673,
                    "uah": 149.05933,
                    "usd": 5.2842445,
                    "vef": 1313069.4,
                    "vnd": 123033.17,
                    "xag": 0.21634595,
                    "xau": 0.0027747566,
                    "xdr": 3.7419636,
                    "xlm": 73.737305,
                    "xrp": 22.662376,
                    "yfi": 0.00021136562,
                    "zar": 88.67754
                }
            },
            {
                "ts": 1600732800,
                "rates": {
                    "aed": 19.410086,
                    "ars": 399.39853,
                    "aud": 7.363235,
                    "bch": 0.024058765,
                    "bdt": 448.39334,
                    "bhd": 1.9927361,
                    "bits": 501.77475,
                    "bmd": 5.2842445,
                    "bnb": 0.2199666,
                    "brl": 28.912214,
                    "btc": 0.0005017748,
                    "cad": 7.0263433,
                    "chf": 4.860633,
                    "clp": 4106.915,
                    "cny": 35.82665,
                    "czk": 121.490585,
                    "dkk": 33.582027,
                    "dot": 1.2678075,
                    "eos": 2.05597,
                    "eth": 0.01536325,
                    "eur": 4.512819,
                    "gbp": 4.1465993,
                    "hkd": 40.95316,
                    "huf": 1638.4857,
                    "idr": 77939.13,
                    "ils": 18.147522,
                    "inr": 388.40915,
                    "jpy": 555.0456,
                    "krw": 6148.7466,
                    "kwd": 1.6163024,
                    "link": 0.6050359,
                    "lkr": 980.154,
                    "ltc": 0.11891757,
                    "mmk": 6934.4604,
                    "mxn": 114.49059,
                    "myr": 21.847708,
                    "ngn": 2027.1019,
                    "nok": 49.388905,
                    "nzd": 7.966881,
                    "php": 256.1802,
                    "pkr": 878.2927,
                    "pln": 20.235754,
                    "rub": 401.88687,
                    "sar": 19.8211,
                    "sats": 50177.477,
                    "sek": 47.09736,
                    "sgd": 7.211382,
                    "thb": 165.88036,
                    "try": 40.544422,
                    "twd": 153.49673,
                    "uah": 149.05933,
                    "usd": 5.2842445,
                    "vef": 1313069.4,
                    "vnd": 123033.17,
                    "xag": 0.21634595,
                    "xau": 0.0027747566,
                    "xdr": 3.7419636,
                    "xlm": 73.737305,
                    "xrp": 22.662376,
                    "yfi": 0.00021136562,
                    "zar": 88.67754
                }
            }
        ]
    }
}

Get fiat rates for tickers list

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"15","method":"getFiatRatesTickersList","params":{"timestamp":1676591569}}

Response: 200

{
    "id": "15",
    "data": {
        "ts": 1676592000,
        "available_currencies": [
            "aed",
            "ars",
            "aud",
            "bch",
            "bdt",
            "bhd",
            "bits",
            "bmd",
            "bnb",
            "brl",
            "btc",
            "cad",
            "chf",
            "clp",
            "cny",
            "czk",
            "dkk",
            "dot",
            "eos",
            "eth",
            "eur",
            "gbp",
            "hkd",
            "huf",
            "idr",
            "ils",
            "inr",
            "jpy",
            "krw",
            "kwd",
            "link",
            "lkr",
            "ltc",
            "mmk",
            "mxn",
            "myr",
            "ngn",
            "nok",
            "nzd",
            "php",
            "pkr",
            "pln",
            "rub",
            "sar",
            "sats",
            "sek",
            "sgd",
            "thb",
            "try",
            "twd",
            "uah",
            "usd",
            "vef",
            "vnd",
            "xag",
            "xau",
            "xdr",
            "xlm",
            "xrp",
            "yfi",
            "zar"
        ]
    }
}

Get current fiat rates

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"6","method":"getCurrentFiatRates","params":{"currencies":[""]}}	

Response: 200

{
    "id": "6",
    "data": {
        "ts": 1712497504,
        "rates": {
            "aed": 178.68,
            "ars": 41870,
            "aud": 73.93,
            "bch": 0.07090247,
            "bdt": 5332.46,
            "bhd": 18.32,
            "bits": 700.7,
            "bmd": 48.65,
            "bnb": 0.08272248,
            "brl": 246.49,
            "btc": 0.0007007,
            "cad": 66.12,
            "chf": 43.88,
            "clp": 45725,
            "cny": 351.89,
            "czk": 1136.57,
            "dkk": 334.86,
            "dot": 5.605913,
            "eos": 47.04499,
            "eth": 0.0142765,
            "eur": 44.85,
            "gbp": 38.5,
            "gel": 130.39,
            "hkd": 380.96,
            "huf": 17518.5,
            "idr": 773003,
            "ils": 182.4,
            "inr": 4052.74,
            "jpy": 7376.19,
            "krw": 65745,
            "kwd": 14.95,
            "link": 2.73893,
            "lkr": 14528.72,
            "ltc": 0.47127527,
            "mmk": 102030,
            "mxn": 800.53,
            "myr": 230.99,
            "ngn": 62989,
            "nok": 522.03,
            "nzd": 80.9,
            "php": 2753.33,
            "pkr": 13503.48,
            "pln": 192.15,
            "rub": 4500.84,
            "sar": 182.5,
            "sats": 70070,
            "sek": 519.48,
            "sgd": 65.65,
            "thb": 1781.84,
            "try": 1560.41,
            "twd": 1563.07,
            "uah": 1886.89,
            "usd": 48.65,
            "vef": 4.87,
            "vnd": 1214681,
            "xag": 1.77,
            "xau": 0.02088231,
            "xdr": 36.7,
            "xlm": 374.047,
            "xrp": 81.095,
            "yfi": 0.00577341,
            "zar": 909.68
        }
    }
}

Subscribe new block

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"16","method":"subscribeNewBlock","params":{}}

Response: 200

{
    "id": "17",
    "data": {
        "subscribed": true
    }
}

Unsubscribe new block

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"16","method":"unsubscribeNewBlock","params":{}}	

Response: 200

{
    "id": "16",
    "data": {
        "subscribed": false
    }
}

Subscribe new transaction

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"17","method":"subscribeNewTransaction","params":{}}	

Response: 200

{
    "id": "17",
    "data": {
        "subscribed": true
    }
}

Unsubscribe new transaction

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"17","method":"unsubscribeNewTransaction","params":{}}	

Response: 200

{
    "id": "17",
    "data": {
        "subscribed": false
    }
}

Subscribe address

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"18","method":"subscribeAddresses","params":{"addresses":["0xba98d6a5ac827632e3457de7512d211e4ff7e8bd","0x73d0385f4d8e00c5e6504c6030f47bf6212736a8"]}}	

Response: 200

{
    "id": "18",
    "data": {
        "subscribed": true
    }
}

Unsubscribe address

wss://avax-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"18","method":"unsubscribeAddresses","params":{}}		

Response: 200

{
    "id": "18",
    "data": {
        "subscribed": false
    }
}

Subscribe new fiat rates

wss://arb-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"19","method":"subscribeFiatRates","params":{"currency":"usd"}}		

Response: 200

{
    "id": "19",
    "data": {
        "subscribed": true
    }
}

Unsubscribe new fiat rates

wss://arb-blockbook.nownodes.io/wss/{{api_key}}

Body

{"id":"19","method":"unsubscribeFiatRates","params":{}}		

Response: 200

{
    "id": "19",
    "data": {
        "subscribed": false
    }
}

Last updated