MATIC Blockbook WSS
Get Info
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"2","method":"getInfo","params":{}}
Response: 200
{
"id": "2",
"data": {
"name": "Polygon",
"shortcut": "MATIC",
"decimals": 18,
"version": "devel",
"bestHeight": 56686249,
"bestHash": "0x0e849e8e23848efa5645e09ce8030fd6845c92d955a1184bea32a7bf1efa2cab",
"block0Hash": "0xa9c28ce2141b56c474f1dc504bee9b01eb1bd7d1a507580d5519d4437a97de1b",
"testnet": false,
"backend": {
"version": "bor/v1.3.1/linux-amd64/go1.22.2"
}
}
}
Ping
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"3","method":"ping","params":{}}
Response: 200
{
"id": "3",
"data": {}
}
Get block hash
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"4","method":"getBlockHash","params":{"height":100000}}
Response: 200
{
"id": "4",
"data": {
"hash": "0x0ea2bb5513cde43e1cecebe7d9778ea2a03d24ed1d6646a0f146904d80671848"
}
}
Get account info
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "5",
"method": "getAccountInfo",
"params": {
"descriptor": "0xc60266bABcE39b8ce4D0cDA617469A252B2AA77E",
"details": "basic",
"tokens": "derived",
"page": null,
"pageSize": 10,
"from": null,
"to": null,
"contractFilter": ""
}
}
Response: 200
{
"id": "5",
"data": {
"address": "0xc60266bABcE39b8ce4D0cDA617469A252B2AA77E",
"balance": "202034398838992436",
"unconfirmedBalance": "0",
"unconfirmedTxs": 0,
"txs": 224,
"nonTokenTxs": 193,
"nonce": "192"
}
}
Get balance history
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{
"id": "7",
"method": "getBalanceHistory",
"params": {
"descriptor": "0xc60266bABcE39b8ce4D0cDA617469A252B2AA77E",
"from": null,
"to": null,
"currencies": [
""
],
"groupBy": null
}
}
Response: 200
{
"id": "7",
"data": [
{
"time": 1709060400,
"txs": 2,
"received": "424698",
"sent": "424698",
"sentToSelf": "0",
"rates": {
"aed": 209833.72,
"ars": 48053356,
"aud": 87301.23,
"bdt": 6268058,
"bhd": 21533.064,
"bmd": 57128.703,
"brl": 281867.3,
"btc": 1.002196,
"cad": 77320.84,
"chf": 50213.785,
"clp": 56008536,
"cny": 411240.94,
"czk": 1334252.2,
"dkk": 392754.1,
"eth": 17.62155,
"eur": 52689.227,
"gbp": 45049.58,
"hkd": 446998.97,
"huf": 20594874,
"idr": 894614300,
"ils": 206136.92,
"inr": 4738737,
"jpy": 8598212,
"krw": 76056030,
"kwd": 17577.36,
"lkr": 17736670,
"mmk": 119932680,
"mxn": 975180.6,
"myr": 273189.47,
"ngn": 89963450,
"nok": 601643.56,
"nzd": 92593.34,
"php": 3204320.5,
"pkr": 15967472,
"pln": 226908.58,
"rub": 5255630.5,
"sar": 214290.95,
"sek": 588895.75,
"sgd": 76780.98,
"thb": 2050577.6,
"try": 1779664.5,
"twd": 1804752.9,
"uah": 2186323.5,
"usd": 57128.703,
"vef": 5720.2974,
"vnd": 1407284400,
"zar": 1090552.6
}
},
{
"time": 1709071200,
"txs": 2,
"received": "2238267",
"sent": "2238267",
"sentToSelf": "0",
"rates": {
"aed": 208075.56,
"ars": 47650724,
"aud": 86569.75,
"bdt": 6215539,
"bhd": 21352.643,
"bmd": 56650.03,
"brl": 279505.6,
"btc": 0.9937987,
"cad": 76672.984,
"chf": 49793.055,
"clp": 55539250,
"cny": 407795.22,
"czk": 1323072.8,
"dkk": 389463.28,
"eth": 17.473902,
"eur": 52247.754,
"gbp": 44672.117,
"hkd": 443253.62,
"huf": 20422314,
"idr": 887118460,
"ils": 204409.73,
"inr": 4699032,
"jpy": 8526170,
"krw": 75418770,
"kwd": 17430.082,
"lkr": 17588056,
"mmk": 118927784,
"mxn": 967009.8,
"myr": 270900.47,
"ngn": 89209660,
"nok": 596602.44,
"nzd": 91817.52,
"php": 3177471.8,
"pkr": 15833684,
"pln": 225007.34,
"rub": 5211594,
"sar": 212495.45,
"sek": 583961.5,
"sgd": 76137.65,
"thb": 2033396.1,
"try": 1764753.1,
"twd": 1789631.1,
"uah": 2168004.8,
"usd": 56650.03,
"vef": 5672.3677,
"vnd": 1395493000,
"zar": 1081415.1
}
},
...
Get transaction
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"9","method":"getTransaction","params":{"txid":"0x9c02fc60d962f6c0b4fc25e46e62376761a49f1fa53fe5570f7442511e0c56af"}}
Response: 200
{
"id": "9",
"data": {
"txid": "0x9c02fc60d962f6c0b4fc25e46e62376761a49f1fa53fe5570f7442511e0c56af",
"vin": [
{
"n": 0,
"addresses": [
"0xc60266bABcE39b8ce4D0cDA617469A252B2AA77E"
],
"isAddress": true
}
],
"vout": [
{
"value": "0",
"n": 0,
"addresses": [
"0x0f3284bFEbc5f55B849c8CF792D39cC0f729e0BC"
],
"isAddress": true
}
],
"blockHash": "0xc5f2ae86e55de75db0bf9d81a2383e6108fec3090c4db755ec598790acd79420",
"blockHeight": 56682868,
"confirmations": 3510,
"blockTime": 1715084287,
"value": "0",
"fees": "1014000002568800",
"ethereumSpecific": {
"status": 1,
"nonce": 189,
"gasLimit": 33881,
"gasUsed": 33800,
"gasPrice": "30000000076",
"data": "0x2c29f64e",
"parsedData": {
"methodId": "0x2c29f64e",
"name": ""
}
}
}
}
Get transaction specific
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"10","method":"getTransactionSpecific","params":{"txid":"0x9c02fc60d962f6c0b4fc25e46e62376761a49f1fa53fe5570f7442511e0c56af"}}
Response: 200
{
"id": "10",
"data": {
"tx": {
"nonce": "0xbd",
"gasPrice": "0x6fc23ac4c",
"gas": "0x8459",
"to": "0x0f3284bFEbc5f55B849c8CF792D39cC0f729e0BC",
"value": "0x0",
"input": "0x2c29f64e",
"hash": "0x9c02fc60d962f6c0b4fc25e46e62376761a49f1fa53fe5570f7442511e0c56af",
"blockNumber": "0x360e974",
"blockHash": "0xc5f2ae86e55de75db0bf9d81a2383e6108fec3090c4db755ec598790acd79420",
"from": "0xc60266bABcE39b8ce4D0cDA617469A252B2AA77E",
"transactionIndex": "0xa9"
},
"receipt": {
"gasUsed": "0x8408",
"status": "0x1",
"logs": [
{
"address": "0x0f3284bFEbc5f55B849c8CF792D39cC0f729e0BC",
"topics": [
"0x1be6aa8048be4c6d54939d2fd6cc18062a4fbfc6d586ff2a1a519c7ba9cc46a0"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c60266babce39b8ce4d0cda617469a252b2aa77e00000000000000000000000000000000000000000000000000000000663a1bff0000000000000000000000000000000000000000000000000000000000000008636c61696d4b6579000000000000000000000000000000000000000000000000"
},
{
"address": "0x0000000000000000000000000000000000001010",
"topics": [
"0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
"0x0000000000000000000000000000000000000000000000000000000000001010",
"0x000000000000000000000000c60266babce39b8ce4d0cda617469a252b2aa77e",
"0x000000000000000000000000b95d435df3f8b2a8d8b9c2b7c8766c9ae6ed8cc9"
],
"data": "0x00000000000000000000000000000000000000000000000000039a3a45cd600000000000000000000000000000000000000000000000000002d893e5f11aa1cc0000000000000000000000000000000000000000000000072abe4443b39ca49000000000000000000000000000000000000000000000000002d4f9abab4d41cc0000000000000000000000000000000000000000000000072ac1de7df96a0490"
}
]
}
}
}
Send transaction
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"1","method":"sendTransaction","params":{"hex":"010000000001019d64f0c72a0d206001decbffaa722eb1044534c74eee7a5df8318e42a4323ec10000000017160014550da1f5d25a9dae2eafd6902b4194c4c6500af6ffffffff02809698000000000017a914cd668d781ece600efa4b2404dc91fd26b8b8aed8870553d7360000000017a914246655bdbd54c7e477d0ea2375e86e0db2b8f80a8702473044022076aba4ad559616905fa51d4ddd357fc1fdb428d40cb388e042cdd1da4a1b7357022011916f90c712ead9a66d5f058252efd280439ad8956a967e95d437d246710bc9012102a80a5964c5612bb769ef73147b2cf3c149bc0fd4ecb02f8097629c94ab013ffd00000000"}}
Response: 200
{
"id": "1",
"data": {
"result": "622ed4e93b25fdb699115ed5a698f410ddeddd7aa7d5e835762905425d2a6de3"
}
}
Get fiat rates for timestamps
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"13","method":"getFiatRatesForTimestamps","params":{"timestamps":[1575288000,1575550800],"currencies":[""]}}
Response: 200
{
"id": "13",
"data": {
"tickers": [
{
"ts": 1575331200,
"rates": {
"aed": 0.09680703,
"ars": 1.5782324,
"aud": 0.038655527,
"bdt": 2.237963,
"bhd": 0.009937057,
"bmd": 0.026354957,
"brl": 0.1113128,
"btc": 0.0000036072818,
"cad": 0.03506917,
"chf": 0.026130045,
"clp": 21.184076,
"cny": 0.18552046,
"czk": 0.6078837,
"dkk": 0.17777044,
"eth": 0.0001770554,
"eur": 0.023793098,
"gbp": 0.020368112,
"hkd": 0.2063211,
"huf": 7.904441,
"idr": 372.33725,
"ils": 0.0915334,
"inr": 1.88794,
"jpy": 2.8733907,
"krw": 31.225353,
"kwd": 0.008014121,
"lkr": 4.77935,
"mmk": 39.71355,
"mxn": 0.51606697,
"myr": 0.1101321,
"ngn": 9.556877,
"nok": 0.24168538,
"nzd": 0.0405592,
"php": 1.3448935,
"pkr": 4.092185,
"pln": 0.10201071,
"rub": 1.6921543,
"sar": 0.0988308,
"sek": 0.25152305,
"sgd": 0.036019135,
"thb": 0.7976309,
"try": 0.15134071,
"twd": 0.8024557,
"uah": 0.63152325,
"usd": 0.026354957,
"vef": 6548.8813,
"vnd": 607.03784,
"zar": 0.38341984
}
},
{
"ts": 1575590400,
"rates": {
"aed": 0.12139889,
"ars": 1.9818372,
"aud": 0.048368227,
"bdt": 2.804783,
"bhd": 0.012461728,
"bmd": 0.033049896,
"brl": 0.13834357,
"btc": 0.0000044779126,
"cad": 0.043551505,
"chf": 0.032625638,
"clp": 25.88468,
"cny": 0.23282991,
"czk": 0.7603162,
"dkk": 0.22235641,
"eth": 0.00022401643,
"eur": 0.029761434,
"gbp": 0.025114385,
"hkd": 0.25874424,
"huf": 9.844243,
"idr": 461.7482,
"ils": 0.114518225,
"inr": 2.3544745,
"jpy": 3.5935595,
"krw": 39.266914,
"kwd": 0.010036494,
"lkr": 5.9947963,
"mmk": 49.55734,
"mxn": 0.64010954,
"myr": 0.13791722,
"ngn": 11.980588,
"nok": 0.3019277,
"nzd": 0.05049641,
"php": 1.6786363,
"pkr": 5.1240735,
"pln": 0.1272579,
"rub": 2.1052222,
"sar": 0.12393639,
"sek": 0.3136204,
"sgd": 0.044969443,
"thb": 1.0040559,
"try": 0.19000386,
"twd": 1.0057083,
"uah": 0.78793615,
"usd": 0.033049896,
"vef": 8212.491,
"vnd": 764.61255,
"zar": 0.48385713
}
}
]
}
}
Get fiat rates for tickers list
wss://maticbook.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",
"bdt",
"bhd",
"bmd",
"brl",
"btc",
"cad",
"chf",
"clp",
"cny",
"czk",
"dkk",
"eth",
"eur",
"gbp",
"hkd",
"huf",
"idr",
"ils",
"inr",
"jpy",
"krw",
"kwd",
"lkr",
"mmk",
"mxn",
"myr",
"ngn",
"nok",
"nzd",
"php",
"pkr",
"pln",
"rub",
"sar",
"sek",
"sgd",
"thb",
"try",
"twd",
"uah",
"usd",
"vef",
"vnd",
"zar"
]
}
}
Get current fiat rates
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"6","method":"getCurrentFiatRates","params":{"currencies":[""]}}
Response: 200
{
"id": "6",
"data": {
"ts": 1715092203,
"rates": {
"aed": 2.59,
"ars": 621.44,
"aud": 1.066,
"bdt": 77.45,
"bhd": 0.265956,
"bmd": 0.70558,
"brl": 3.57,
"btc": 0.00001114,
"cad": 0.965935,
"chf": 0.639758,
"clp": 659.82,
"cny": 5,
"czk": 16.38,
"dkk": 4.88,
"eth": 0.0002305,
"eur": 0.654805,
"gbp": 0.562127,
"hkd": 5.52,
"huf": 254.69,
"idr": 11322.62,
"ils": 2.61,
"inr": 58.89,
"jpy": 108.93,
"krw": 958.54,
"kwd": 0.216888,
"lkr": 209.47,
"mmk": 1481.97,
"mxn": 11.89,
"myr": 3.34,
"ngn": 871.39,
"nok": 7.68,
"nzd": 1.17,
"php": 40.35,
"pkr": 196.22,
"pln": 2.82,
"rub": 64.55,
"sar": 2.65,
"sek": 7.64,
"sgd": 0.954616,
"thb": 26,
"try": 22.77,
"twd": 22.83,
"uah": 27.74,
"usd": 0.70558,
"vef": 0.07065,
"vnd": 17928.59,
"zar": 13.02
}
}
}
Subscribe new block
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"16","method":"subscribeNewBlock","params":{}}
Response: 200
{
"id": "17",
"data": {
"subscribed": true
}
}
Unsubscribe new block
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"16","method":"unsubscribeNewBlock","params":{}}
Response: 200
{
"id": "16",
"data": {
"subscribed": false
}
}
Subscribe new transaction
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"17","method":"subscribeNewTransaction","params":{}}
Response: 200
{
"id": "17",
"data": {
"subscribed": true
}
}
Unsubscribe new transaction
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"17","method":"unsubscribeNewTransaction","params":{}}
Response: 200
{
"id": "17",
"data": {
"subscribed": false
}
}
Subscribe address
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"18","method":"subscribeAddresses","params":{"addresses":["bc1qrhsext2jjaczc26etu58fry28ycatznn2zv706","bc1pvan3ka9p3fqln8277hp0m9qts4h7qpcupvz3z2s0v9687tfulcfs9aydm5"]}}
Response: 200
{
"id": "18",
"data": {
"subscribed": true
}
}
Unsubscribe address
wss://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"18","method":"unsubscribeAddresses","params":{}}
Response: 200
{
"id": "18",
"data": {
"subscribed": false
}
}
Subscribe new fiat rates
wss://maticbook.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://maticbook.nownodes.io/wss/{{api_key}}
Body
{"id":"19","method":"unsubscribeFiatRates","params":{}}
Response: 200
{
"id": "19",
"data": {
"subscribed": false
}
}
Last updated